![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
A base class for ovector and ovector_view. More...
#include <ovector_tlate.h>
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_tlate & | operator= (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. |
ovector_base_tlate< data_t, vparent_t, block_t >::ovector_base_tlate | ( | ) | [inline, protected] |
Definition at line 898 of file ovector_tlate.h.
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.
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.
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.
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.
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.
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.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).