Public Member Functions | |
size_t | allocatedSize () const |
void | append (const Scalar &v, int i) |
Scalar | at (int key, Scalar defaultValue=Scalar(0)) const |
Scalar | atInRange (size_t start, size_t end, int key, Scalar defaultValue=Scalar(0)) const |
Scalar & | atWithInsertion (int key, Scalar defaultValue=Scalar(0)) |
void | clear () |
CompressedStorage (const CompressedStorage &other) | |
CompressedStorage (size_t size) | |
const int & | index (size_t i) const |
int & | index (size_t i) |
CompressedStorage & | operator= (const CompressedStorage &other) |
void | prune (Scalar reference, RealScalar epsilon=precision< RealScalar >()) |
void | reserve (size_t size) |
void | resize (size_t size, float reserveSizeFactor=0) |
int | searchLowerIndex (size_t start, size_t end, int key) const |
int | searchLowerIndex (int key) const |
size_t | size () const |
void | squeeze () |
void | swap (CompressedStorage &other) |
const Scalar & | value (size_t i) const |
Scalar & | value (size_t i) |
Static Public Member Functions | |
static CompressedStorage | Map (int *indices, Scalar *values, size_t size) |
Protected Member Functions | |
void | reallocate (size_t size) |
Protected Attributes | |
size_t | m_allocatedSize |
int * | m_indices |
size_t | m_size |
Scalar * | m_values |
Scalar at | ( | int | key, | |
Scalar | defaultValue = Scalar(0) | |||
) | const [inline] |
Scalar atInRange | ( | size_t | start, | |
size_t | end, | |||
int | key, | |||
Scalar | defaultValue = Scalar(0) | |||
) | const [inline] |
Like at(), but the search is performed in the range [start,end)
Scalar& atWithInsertion | ( | int | key, | |
Scalar | defaultValue = Scalar(0) | |||
) | [inline] |
int searchLowerIndex | ( | size_t | start, | |
size_t | end, | |||
int | key | |||
) | const [inline] |
k
in [start,end) such that for all j
in [start,k) index[j
]<key int searchLowerIndex | ( | int | key | ) | const [inline] |
k
such that for all j
in [0,k) index[j
]<key