yat
0.14.5pre
|
Class for general vector view. More...
#include <yat/classifier/DataLookup1D.h>
Public Types | |
typedef MatrixLookup::value_type | value_type |
typedef MatrixLookup::const_reference | const_reference |
typedef MatrixLookup::const_row_iterator | const_iterator |
'Read Only' iterator | |
Public Member Functions | |
DataLookup1D (const MatrixLookup &m, const size_t index, const bool row_vector) | |
DataLookup1D (const DataLookup1D &) | |
DataLookup1D (const size_t size, const double value=0) | |
DataLookup1D (const utility::VectorBase &vec, const std::vector< size_t > &index) | |
Create general view from utility::VectorBase. More... | |
DataLookup1D (const utility::VectorBase &vec) | |
Create general view from utility::VectorBase. More... | |
virtual | ~DataLookup1D () |
Destructor deletes underlying MatrixLookup if object is owner. | |
const_iterator | begin () const |
const_iterator | end () const |
size_t | size (void) const |
double | operator() (const size_t i) const |
access operator | |
double | operator* (const DataLookup1D &) const |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &s, const DataLookup1D &v) |
The output operator for DataLookup1D. More... | |
void | convert (const DataLookup1D &, utility::Vector &) |
Class for general vector view.
const_reference type is const double&
value_type is double
theplu::yat::classifier::DataLookup1D::DataLookup1D | ( | const MatrixLookup & | m, |
const size_t | index, | ||
const bool | row_vector | ||
) |
Constructor.
m | MatrixLookup to look into |
row_vector | if true DataLookup1D is looking into a row of MatrixLookup, otherwise looking into a column. |
index | which row/column to look into. |
theplu::yat::classifier::DataLookup1D::DataLookup1D | ( | const DataLookup1D & | ) |
Copy constructor
theplu::yat::classifier::DataLookup1D::DataLookup1D | ( | const size_t | size, |
const double | value = 0 |
||
) |
Construct DataLookup1D that owns its underlying matrix. Object has size @ size and all its element is equal to value.
theplu::yat::classifier::DataLookup1D::DataLookup1D | ( | const utility::VectorBase & | vec, |
const std::vector< size_t > & | index | ||
) |
Create general view from utility::VectorBase.
Constructor creates a proper MatrixLookup that object can view into. Object is owner of this underlying MatrixLookup. Object fulfills
theplu::yat::classifier::DataLookup1D::DataLookup1D | ( | const utility::VectorBase & | vec | ) |
Create general view from utility::VectorBase.
Constructor creates a proper MatrixLookup that object can view into. Object is owner of this underlying MatrixLookup. Object fulfills
const_iterator theplu::yat::classifier::DataLookup1D::begin | ( | ) | const |
const_iterator theplu::yat::classifier::DataLookup1D::end | ( | ) | const |
double theplu::yat::classifier::DataLookup1D::operator* | ( | const DataLookup1D & | ) | const |
scalar product
size_t theplu::yat::classifier::DataLookup1D::size | ( | void | ) | const |
|
related |
Converts a DataLookup1D to a utility::vector
|
related |
The output operator for DataLookup1D.
Elements are separated by the character from the omanip fill. The following example will write the elements separated by tab.
char prev=s.fill('\t'); s << v; s.fill(prev);