Public Member Functions
|vdiff (std::vector< const field * > &fields)|
|Constructor that calculates difference vectors. |
|field||operator (int col) const|
|Retrieve a difference operator. |
|bool||operator< (const vdiff &d) const|
|Compare sets of vector differences. |
|size_t||num_cols () const|
|Retrieve number of difference vecors. |
|Number of rows in the matrix of difference vectors. |
|Number of columns in the matrix of difference vectors. |
|std::set< triplet< rational > >||elements|
|Matrix elements of the matrix of difference vectors. |
The class vdiff describes a set of difference vectors.
The most important use of this class is the ability to compare sets of difference vectors, so that these sets can be used as a map key.
|vdiff::vdiff||(||std::vector< const field * > &||fields||)|
Constructor that calculates difference vectors.
Given a set of input vectors (field descriptions), this constructor sorts them, calculates differences between the first and subsequent vectors, and stores these difference vectors internally.
|[in,out]||fields||a collection of fields, will be sorted.|
|size_t vdiff::num_cols||(||)|| const
Compare sets of vector differences.
The comparison is implemented as a lexicographical comparison over matrix element triplets. However, any total order should do.
|d||the other set of difference vectors.|
Retrieve a difference operator.
The difference vector with the given index is constructed on the fly. Assuming input consisted of vectors v thrugh v[n], then for a given argument i this method here will return the vector v[i+1]-v. Obviously the maximum index is two less than the number of input vectors to the constructor.
|col||the index of the difference vector to be returned.|