Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

linbox/vector


Detailed Description

All LinBox dense vectors must implement the dense vector common object interface as it is defined in the dense vector archetype. It is basically the non-resizing subset of functionality of the STL vector<T> container. For information on the STL vector, see SGI's [Standard Template Library Programmer's Guide]{http://www.sgi.com/Technology/STL/}.

All LinBox sparse vectors must implement the sparse vector common object interface as it is defined in the sparse vector archetype.

The LinBox sparse vector common object interface is the same as either the STL sequence of pairs of { size} and a field element or an STL unique and pair associative container. (That is, an STL map without the operator[].) It is also always assumed that the entries in the sparse vector are in ascending order starting with the first index no less than zero.

LinBox vectors are indexed starting at zero, not one, just like STL vectors and C-style arrays.

See also:
Archetypes


Classes

class  BitVector
class  ReverseVector
class  Sparse_Vector
 vector< Pair<T> > and actualsize More...

class  VectorStream
 Vector factory. More...

class  Subiterator
 Subvector iterator class provides striding iterators. More...

class  Subvector
 Dense subvector. More...

struct  VectorCategories
 List of vector categories. More...


Functions

template<class Field, class Vector> Vector LinBox::randomVector (Field &F, size_t n, typename Field::RandIter &r)


Function Documentation

Vector randomVector Field &  F,
size_t  n,
typename Field::RandIter r
[inline]
 

Random vector generator This templated function takes a field and a random field element generator and returns a vector of random field elements. The vector is dense in the field elements, even if the vector is a sparse LinBox vector. The funtion is templatized by the field and the vector types being used. This function calls another function by the same name with an additional parameter of the vector category of the vector it is called with. This mechanism is used because functions cannot have partial template specializations like classes can. This new, extended function can be specialized for specific fields and vectors to allow for better performance.

Returns:
v vector of random field elements
Parameters:
F Field in which arithmetic is done
n integer number of elements in vector
r Random field element generator


Generated on Thu Feb 8 22:32:56 2007 for linbox by doxygen 1.3.4