KrisLibrary
1.0.0
|
An integer tuple class. More...
#include <IntTuple.h>
Public Types | |
typedef std::vector< int > | BaseT |
typedef std::vector< int >::const_iterator | const_iterator |
typedef std::vector< int >::iterator | iterator |
Public Member Functions | |
IntTuple (int e1) | |
IntTuple (int e1, int e2) | |
IntTuple (int e1, int e2, int e3) | |
IntTuple (const std::vector< int > &t) | |
size_t | size () const |
bool | empty () const |
void | resize (size_t s) |
void | resize (size_t s, int fillVal) |
int | operator[] (int i) const |
int & | operator[] (int i) |
operator BaseT & () | |
operator const BaseT & () const | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
bool | operator< (const IntTuple &t) const |
bool | operator== (const IntTuple &t) const |
void | fill (int val) |
void | set (int e1) |
void | set (int e1, int e2) |
void | set (int e1, int e2, int e3) |
int | getIndex (int x) const |
bool | contains (int x, int &index) const |
bool | contains (int x) const |
int | count (int x) const |
void | operator+= (int ofs) |
void | operator-= (int ofs) |
Public Attributes | |
std::vector< int > | elements |
An integer tuple class.
Warning: The constructor IntTuple(int) doesn't resize the tuple, it creates a 1-tuple.