linalg_vec<RepType, RepPtr = RepType*, int NN = 0> [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:containers,adaptors Component type:type
Description
This captures the main functionality of a dense MTL vector. The dense1D and external1D derive from this class, and specialize this class to use either internal or external storage.
Example
Definition
linalg_vector.h
Template Parameters

ParameterDescriptionDefault
RepTypethe underlying representation 
Model of
Linalg_Vector
Members
Member Where defined Description
self    
rep_type    
rep_ptr    
enum { N = NN }    
dimension    
sparsity   The sparsity tag
scaled_type Scalable The scaled type of this container
value_type Container The value type
reference Container The reference type
const_reference Container The const reference type
pointer Container The pointer (to the value_type) type
size_type Container The size type (non negative)
difference_type Container The difference type (an integral type)
iterator Container The iterator type
const_iterator Container The const iterator type
const_iterator Container The const iterator type
reverse_iterator Reversible Container The reverse iterator type
const_reverse_iterator Reversible Container The const reverse iterator type
Vec    
Vec_size_type    
Vec_difference_type    
Vec_iterator    
Vec_const_iterator    
class IndexArray    
IndexArrayRef Vector The type for an array of the indices of the element in the vector
subrange_type Vector The type for a subrange vector-view of the original vector
range    
linalg_vec () Container Default Constructor (allocates the container)
linalg_vec (rep_ptr x, size_type start_index)   Normal Constructor
linalg_vec (const self& x) ContainerRef Copy Constructor (shallow copy)
~linalg_vec () Container The destructor.
self& operator= (const self& x) AssignableRef Assignment Operator (shallow copy)
iterator begin () Container Return an iterator pointing to the beginning of the vector
iterator end () Container Return an iterator pointing past the end of the vector
const_iterator begin () const Container Return a const iterator pointing to the begining of the vector
const_iterator end () const Container Return a const iterator pointing past the end of the vector
reverse_iterator rbegin () Reversible Container Return a reverse iterator pointing to the last element of the vector
reverse_iterator rend () Reversible Container Return a reverse iterator pointing past the end of the vector
const_reverse_iterator rbegin () const Reversible Container Return a const reverse iterator pointing to the last element of the vector
const_reverse_iterator rend () const Reversible Container Return a const reverse iterator pointing past the end of the vector
reference operator[] (size_type i) Vector Return a reference to the element with the ith index
subrange_type operator() (range r)    
subrange_type operator() (size_type s, size_type f)    
const_reference operator[] (size_type i) const Vector Return a const reference to the element with the ith index
size_type size () const Container The size of the vector
size_type nnz () const   The number of non-zeroes in the vector
void resize (size_type n)   Resize the vector to n
void resize (size_type n, const value_type& x)   Resize the vector to n, and assign x to the new positions
size_type capacity () const   Return the total capacity of the vector
void reserve (size_type n)   Reserve more space in the vector
const value_type* data () const   Raw Memory Access
value_type* data ()   Raw Memory Access
iterator insert (iterator position, const value_type& x = value_type()) Container Insert x at the indicated position in the vector
IndexArrayRef nz_struct () const    
self& adjust_index (size_type i)    
New members
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.