Object-oriented Scientific Computing Library: Version 0.910
Public Types | Public Member Functions | Protected Member Functions
ovector_base_tlate< data_t, vparent_t, block_t > Class Template Reference

A base class for ovector and ovector_view. More...

#include <ovector_tlate.h>

Inheritance diagram for ovector_base_tlate< data_t, vparent_t, block_t >:
ovector_const_view_tlate< data_t, vparent_t, block_t > ovector_reverse_tlate< data_t, vparent_t, block_t > ovector_subvector_reverse_tlate< data_t, vparent_t, block_t > ovector_tlate< data_t, vparent_t, block_t > ovector_view_tlate< data_t, vparent_t, block_t > ofvector< N > omatrix_col_tlate< data_t, mparent_t, vparent_t, block_t > omatrix_diag_tlate< data_t, mparent_t, vparent_t, block_t > omatrix_row_tlate< data_t, mparent_t, vparent_t, block_t > ovector_array_stride_tlate< data_t, vparent_t, block_t > ovector_array_tlate< data_t, vparent_t, block_t > ovector_cx_imag_tlate< data_t, vparent_t, block_t, cvparent_t, cblock_t, complex_t > ovector_cx_real_tlate< data_t, vparent_t, block_t, cvparent_t, cblock_t, complex_t > ovector_subvector_tlate< data_t, vparent_t, block_t >

Detailed Description

template<class data_t, class vparent_t, class block_t>
class ovector_base_tlate< data_t, vparent_t, block_t >

This class provides a base class for ovector and ovector_view, mostly useful for creating function arguments which accept either ovector or ovector_view.

Definition at line 640 of file ovector_tlate.h.

Public Types

typedef
ovector_const_view_tlate
< data_t, vparent_t, block_t >
::const_iterator 
const_iterator
 Desc.
typedef
ovector_const_view_tlate
< data_t, vparent_t, block_t >
::iterator 
iterator
 Desc.

Public Member Functions

const_iterator begin () const
 Desc.
const_iterator end () const
 Desc.
iterator begin ()
 Desc.
iterator end ()
 Desc.
Copy constructors
 ovector_base_tlate (ovector_base_tlate &v)
 Shallow copy constructor - create a new view of the same vector.
ovector_base_tlateoperator= (ovector_base_tlate &v)
 Shallow copy constructor - create a new view of the same vector.
Get and set methods
const data_t & operator[] (size_t i) const
 Array-like indexing.
const data_t & operator() (size_t i) const
 Array-like indexing with operator()
data_t & operator[] (size_t i)
 Array-like indexing.
data_t & operator() (size_t i)
 Array-like indexing with operator()
data_t * get_ptr (size_t i)
 Get pointer (with optional range-checking)
int set (size_t i, data_t val)
 Set (with optional range-checking)
int set_all (data_t val)
 Set all of the value to be the value val.
Arithmetic
ovector_base_tlate< data_t,
vparent_t, block_t > & 
operator+= (const ovector_base_tlate< data_t, vparent_t, block_t > &x)
 operator+=
ovector_base_tlate< data_t,
vparent_t, block_t > & 
operator-= (const ovector_base_tlate< data_t, vparent_t, block_t > &x)
 operator-=
ovector_base_tlate< data_t,
vparent_t, block_t > & 
operator+= (const data_t &x)
 operator+=
ovector_base_tlate< data_t,
vparent_t, block_t > & 
operator-= (const data_t &x)
 operator-=
ovector_base_tlate< data_t,
vparent_t, block_t > & 
operator*= (const data_t &y)
 operator*=
Other methods
vparent_t * get_gsl_vector ()
 Return a gsl vector.
const vparent_t * get_gsl_vector_const () const
 Return a const gsl vector.

Protected Member Functions

 ovector_base_tlate ()
 Empty constructor for use by children.

Constructor & Destructor Documentation

template<class data_t, class vparent_t, class block_t>
ovector_base_tlate< data_t, vparent_t, block_t >::ovector_base_tlate ( ) [inline, protected]

Definition at line 898 of file ovector_tlate.h.


Member Function Documentation

template<class data_t, class vparent_t, class block_t>
int ovector_base_tlate< data_t, vparent_t, block_t >::set_all ( data_t  val) [inline]

If the vector is empty, this function does not perform any assignment and does not call the error handler.

Definition at line 801 of file ovector_tlate.h.

template<class data_t, class vparent_t, class block_t>
ovector_base_tlate<data_t,vparent_t,block_t>& ovector_base_tlate< data_t, vparent_t, block_t >::operator+= ( const ovector_base_tlate< data_t, vparent_t, block_t > &  x) [inline]

This operator only operates on elements which are present in both vectors, i.e. elements which are present in one vector but missing in the other will be ignored. If one of the two vectors is empty, this function does nothing and does not call the error handler.

Definition at line 820 of file ovector_tlate.h.

template<class data_t, class vparent_t, class block_t>
ovector_base_tlate<data_t,vparent_t,block_t>& ovector_base_tlate< data_t, vparent_t, block_t >::operator-= ( const ovector_base_tlate< data_t, vparent_t, block_t > &  x) [inline]

This operator only operates on elements which are present in both vectors, i.e. elements which are present in one vector but missing in the other will be ignored. If one of the two vectors is empty, this function does nothing and does not call the error handler.

Definition at line 837 of file ovector_tlate.h.

template<class data_t, class vparent_t, class block_t>
ovector_base_tlate<data_t,vparent_t,block_t>& ovector_base_tlate< data_t, vparent_t, block_t >::operator+= ( const data_t &  x) [inline]

If the vector is empty, this function does not perform any modifications and does not call the error handler.

Definition at line 850 of file ovector_tlate.h.

template<class data_t, class vparent_t, class block_t>
ovector_base_tlate<data_t,vparent_t,block_t>& ovector_base_tlate< data_t, vparent_t, block_t >::operator-= ( const data_t &  x) [inline]

If the vector is empty, this function does not perform any modifications and does not call the error handler.

Definition at line 860 of file ovector_tlate.h.

template<class data_t, class vparent_t, class block_t>
ovector_base_tlate<data_t,vparent_t,block_t>& ovector_base_tlate< data_t, vparent_t, block_t >::operator*= ( const data_t &  y) [inline]

If the vector is empty, this function does not perform any modifications and does not call the error handler.

Definition at line 871 of file ovector_tlate.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.