VectDse< C, R > Struct Template Reference

List of all members.

Detailed Description

template<class C, class R = linalg::rep1d<C>>
struct VectDse< C, R >

The standard class of vectors. The container type R should provide the following signature:
  typedef size_type;   // type of the index.
  typedef value_type;  // type of the coefficients.
  typedef iterator;    // type of the iterator.
  R(size_type n);
  R(size_type n, value_type* t);
  R(iterator b,iterator e);
  R& R::operator=(const R &)
  size_type    R::size()
  void R::resize(size_type);
  iterator       R::begin();
  const_iterator R::begin() const;
  iterator       R::end();
  const_iterator R::end() const;
  value_type & R::operator[] (size_type i);
  value_type   R::operator[] (size_type i) const;

The constructor R(size_type i) allocate the memory but nothing is supposed to be known about the allocated values. The constructor R(iterator_t b, iterator_t e) allocates the memory and fill it with the values from the iterator from b to e. The constructor R(size_type n, const char* str) build the array of size n from the string str. The function void R::resize(size_type s) reallocate the memory if necessary and copies the elements of *this, or use the current memory space if s is less that the actual space.

Definition at line 61 of file VectDse.h.

Public Types

typedef R::size_type size_type
typedef C value_type
typedef R::iterator iterator
typedef R::const_iterator const_iterator
typedef R::reverse_iterator reverse_iterator
typedef R::const_reverse_iterator const_reverse_iterator
typedef R rep_type
typedef VectDse< C, R > self_t

Public Member Functions

R & rep ()
const R & rep () const
 operator arithm::template_expression ()
 VectDse ()
 VectDse (const R &r)
 VectDse (R *r)
 VectDse (const shared_object< R > &r)
 VectDse (size_type s)
 VectDse (size_type s, const type::AsSize &mth)
 VectDse (size_type s, value_type *t)
 VectDse (iterator b, iterator e)
 VectDse (size_type m, const char *str)
 VectDse (const self_t &r)
template<class X>
 VectDse (const arithm::template_expression< X > &x)
template<class C1, class R1>
 VectDse (const VectDse< C1, R1 > &v)
template<class X>
self_toperator= (const X &exp)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
self_toperator= (const self_t &V)
self_toperator+= (const self_t &v)
self_toperator-= (const self_t &v)
self_toperator *= (const value_type &c)
self_toperator/= (const value_type &c)
template<class X>
self_toperator+= (const X &x)
template<class X>
self_toperator-= (const X &x)
template<class X>
self_toperator *= (const X &x)
template<class X>
self_toperator/= (const X &x)
value_typeoperator[] (size_type i)
const value_typeoperator[] (size_type i) const
bool operator== (const self_t &v)
template<class S>
self_toperator= (const VAL< S > &V)
bool operator!= (const self_t &v)
VectDse< C, seq1d< value_type,
iterator > > 
operator[] (const Range &I)
size_type size () const
self_t resize (int n)

Public Attributes

shared_object< R > data


Constructor & Destructor Documentation

template<class C, class R>
VectDse< C, R >::VectDse ( size_type  m,
const char *  str 
)

Constructor for a size m and a string containing the elements. Example: VectDse(3,"1 2 3").

Definition at line 211 of file VectDse.h.

References VectDse< C, R >::rep().


The documentation for this struct was generated from the following file:

SYNAPS DOCUMENTATION
logo