pm::SparseVector< E, Predicate > Class Template Reference

Inheritance diagram for pm::SparseVector< E, Predicate >:
Collaboration diagram for pm::SparseVector< E, Predicate >:

List of all members.


Public Member Functions

 SparseVector (const GenericVector< SparseVector > &v)
 Copy of a disguised SparseVector object.
void clear ()
 truncate to zero size
void resize (int n)
 change the size, initialize appended elements with default constructor
SparseVector & operator= (const SparseVector &v)
 assignment
reference operator[] (int i)
 random access, may cost O(log(n)) time; Performance Comparison of Vector Classes
const E & operator[] (int i) const
 constant random access, may cost O(log(n)) time; Performance Comparison of Vector Classes
template<typename Vector2>
SparseVector & operator|= (const GenericVector< Vector2, E > &v)
 appending a GenericVector
SparseVector & operator|= (const E &r)
 appending an element

Detailed Description

template<typename E, typename Predicate>
class pm::SparseVector< E, Predicate >

Vector type class which is an associative container with element indices (coordinates) as keys; elements equal to the default value (ElementType(), which is 0 for most numerical types) are not stored, but implicitly encoded by the gaps in the key set. It is based on an AVL tree.
The documentation for this class was generated from the following file:
  • include/core/polymake/SparseVector.h
Generated on Wed Mar 30 23:31:46 2011 for Polymake Template Library (PTL) by doxygen 1.5.6