
Public Member Functions | |
| IntVec () | |
| IntVec (const Array< int > &d) | |
| IntVec (int n) | |
| int | size () const | 
| int | operator[] (int i) const | 
| int & | operator[] (int i) | 
| IntVec | operator+ (const IntVec &other) const | 
| IntVec | operator* (int alpha) const | 
| int | factorial () const | 
| int | pow (const IntVec &other) const | 
| int | abs () const | 
| int | norm () const | 
| bool | operator== (const IntVec &other) const | 
| bool | operator< (const IntVec &other) const | 
| void | print (std::ostream &os) const | 
| void | getPartitions (int M, Array< Array< IntVec > > &parts) const | 
Private Attributes | |
| Array< int > | data_ | 
Related Functions | |
| (Note that these are not member functions.)  | |
| IntVec | operator* (int a, const IntVec &x) | 
| std::ostream & | operator<< (std::ostream &os, const IntVec &v) | 
Definition at line 48 of file SundanceIntVec.hpp.
| Sundance::IntVec::IntVec | ( | ) |  [inline] | 
        
| Sundance::IntVec::IntVec | ( | const Array< int > & | d | ) |  [inline] | 
        
Definition at line 54 of file SundanceIntVec.hpp.
| Sundance::IntVec::IntVec | ( | int | n | ) | 
| int Sundance::IntVec::abs | ( | ) | const | 
Return the sum of elements in this vector
Definition at line 61 of file SundanceIntVec.cpp.
Referenced by getPartitions(), norm(), and operator<().
| int Sundance::IntVec::factorial | ( | ) | const | 
Return the factorial of this vector, as defined by CS
Definition at line 34 of file SundanceIntVec.cpp.
| void Sundance::IntVec::getPartitions | ( | int | M, | |
| Array< Array< IntVec > > & | parts | |||
| ) | const | 
Get the length-M partitions of this vector. These are all list of exactly M vectors 
 such that 
Definition at line 113 of file SundanceIntVec.cpp.
References abs(), data_, IntVec(), Sundance::nextNum(), Sundance::restrictedCompositions(), and size().
Referenced by Sundance::pSet().
| int Sundance::IntVec::norm | ( | ) | const | 
Return the infinity norm of this vector
Definition at line 71 of file SundanceIntVec.cpp.
| IntVec Sundance::IntVec::operator* | ( | int | alpha | ) | const | 
| bool Sundance::IntVec::operator< | ( | const IntVec & | other | ) | const | 
| bool Sundance::IntVec::operator== | ( | const IntVec & | other | ) | const | 
| int& Sundance::IntVec::operator[] | ( | int | i | ) |  [inline] | 
        
| int Sundance::IntVec::operator[] | ( | int | i | ) |  const [inline] | 
        
| int Sundance::IntVec::pow | ( | const IntVec & | other | ) | const | 
| void Sundance::IntVec::print | ( | std::ostream & | os | ) |  const [virtual] | 
        
Implements Playa::Printable.
Definition at line 107 of file SundanceIntVec.cpp.
References data_.
Referenced by operator<<().
| int Sundance::IntVec::size | ( | ) |  const [inline] | 
        
Definition at line 59 of file SundanceIntVec.hpp.
References data_.
Referenced by abs(), factorial(), getPartitions(), norm(), operator*(), operator+(), operator<(), operator==(), pow(), and Sundance::weightedOrderedPartitions().
Definition at line 107 of file SundanceIntVec.hpp.
| std::ostream & operator<< | ( | std::ostream & | os, | |
| const IntVec & | v | |||
| ) |  [related] | 
        
Array<int> Sundance::IntVec::data_ [private]           | 
        
Definition at line 101 of file SundanceIntVec.hpp.
Referenced by abs(), factorial(), getPartitions(), IntVec(), norm(), operator*(), operator+(), operator<(), operator==(), operator[](), pow(), print(), and size().