hdnum::Vector< T > Class Template Reference

A flexible vector class. More...

#include <vector.hh>

List of all members.

Public Types

typedef T value_type
 Remember the storage type.
typedef value_typereference
 Reference to an object.
typedef const value_typeconst_reference
 Const reference to an object.
typedef std::size_t size_type
 Type used for array indices.
typedef std::ptrdiff_t difference_type
 Difference type.

Public Member Functions

 Vector ()
 make empty vector
 Vector (size_type _n)
 make vector with _n uninitialized components
 Vector (size_type _n, const T &_t)
 make vector with _n initialized components
 Vector (const Vector &v)
 copy constructor with reference semantics
Vectoroperator= (const Vector &v)
 assignment operator with reference semantics
Vector< T > sub (size_type i, size_type m) const
 make a vector that is identical to components i ... i+m-1
void resize (size_type _n)
 reallocate vector to given size, any data is lost
void resize (size_type _n, const T &_t)
 reallocate vector to given size, any data is lost
reference operator[] (size_type i)
 Component access.
const_reference operator[] (size_type i) const
 Const component access.
size_type size () const
 get array size
int iwidth () const
 get index field width for pretty-printing
int width () const
 get data field width for pretty-printing
int precision () const
 get data precision for pretty-printing
void iwidth (int i) const
 set index field width for pretty-printing
void width (int i) const
 set data field width for pretty-printing
void precision (int i) const
 set data precision for pretty-printing
iterator begin ()
 begin iterator
iterator end ()
 end iterator
iterator rbegin ()
 begin iterator
iterator rend ()
 end iterator
const_iterator begin () const
 const begin iterator
const_iterator end () const
 const end iterator
const_iterator rbegin () const
 const begin iterator
const_iterator rend () const
 const end iterator
Vectoroperator+= (const Vector &y)
 vector addition
Vectoroperator-= (const Vector &y)
 vector subtraction
Vectoroperator*= (const T &s)
 vector scalar multiplication
Vectoroperator/= (const T &s)
 vector divide by scalar
Vectorupdate (const T &a, const Vector &y)
 add scalar times vector
operator* (const Vector &y)
 scalar multiplication

Classes

class  const_iterator
 const random access iterator More...
class  iterator
 random access iterator More...


Detailed Description

template<class T>
class hdnum::Vector< T >

A flexible vector class.

with the following features:


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

Generated on Mon Oct 12 21:45:50 2009 for Heidelberg Educational Numerics Library by  doxygen 1.5.5