yat  0.14.5pre
Public Types | Public Member Functions | Related Functions | List of all members
theplu::yat::classifier::DataLookup1D Class Reference

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 &)
 

Detailed Description

Class for general vector view.

Member Typedef Documentation

const_reference type is const double&

Since
New in yat 0.5

value_type is double

Since
New in yat 0.5

Constructor & Destructor Documentation

theplu::yat::classifier::DataLookup1D::DataLookup1D ( const MatrixLookup m,
const size_t  index,
const bool  row_vector 
)

Constructor.

Parameters
mMatrixLookup to look into
row_vectorif true DataLookup1D is looking into a row of MatrixLookup, otherwise looking into a column.
indexwhich 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 $ x(i) = vec(index(i)) $

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 $ x(i) = vec(i) $

Member Function Documentation

const_iterator theplu::yat::classifier::DataLookup1D::begin ( ) const
Returns
'Read Only' iterator to first element.
const_iterator theplu::yat::classifier::DataLookup1D::end ( ) const
Returns
'Read Only' iterator to end of DataLookup1D.
double theplu::yat::classifier::DataLookup1D::operator* ( const DataLookup1D ) const

scalar product

size_t theplu::yat::classifier::DataLookup1D::size ( void  ) const
Returns
number of elements

Friends And Related Function Documentation

void convert ( const DataLookup1D ,
utility::Vector  
)
related

Converts a DataLookup1D to a utility::vector

std::ostream & operator<< ( std::ostream &  s,
const DataLookup1D v 
)
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); 

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

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5