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

Class for general weighted vector view. More...

#include <yat/classifier/DataLookupWeighted1D.h>

Public Types

typedef utility::DataWeight value_type
 
typedef const utility::DataWeight const_reference
 
typedef MatrixLookupWeighted::const_row_iterator const_iterator
 'Read Only' iterator
 

Public Member Functions

 DataLookupWeighted1D (const MatrixLookupWeighted &m, const size_t index, const bool row_vector)
 
 DataLookupWeighted1D (const DataLookupWeighted1D &)
 
 DataLookupWeighted1D (const size_t size, double value=0, double weight=1)
 
virtual ~DataLookupWeighted1D ()
 Destructor.
 
const_iterator begin () const
 
double data (const size_t i) const
 
const_iterator end () const
 
size_t size (void) const
 
double weight (const size_t i) const
 
const_reference operator() (const size_t i) const
 access operator
 

Related Functions

(Note that these are not member functions.)

double sum_weight (const DataLookupWeighted1D &)
 
void convert (const DataLookupWeighted1D &, utility::Vector &value, utility::Vector &weight)
 

Detailed Description

Class for general weighted vector view.

See also
MatrixLookupWeighted

Member Typedef Documentation

const_reference type is const DataWeight

Since
New in yat 0.5

value_type is DataWeight

Since
New in yat 0.5

Constructor & Destructor Documentation

theplu::yat::classifier::DataLookupWeighted1D::DataLookupWeighted1D ( const MatrixLookupWeighted m,
const size_t  index,
const bool  row_vector 
)

Constructor.

Parameters
mMatrixLookupWeighted to look into
row_vectorif true (default) DataLookup1D is looking into a row of MatrixLookupWeighted, otherwise looking into a column.
indexwhich row/column to look into.
theplu::yat::classifier::DataLookupWeighted1D::DataLookupWeighted1D ( const DataLookupWeighted1D )

Copy constructor

theplu::yat::classifier::DataLookupWeighted1D::DataLookupWeighted1D ( const size_t  size,
double  value = 0,
double  weight = 1 
)

Construct DataLookup1D that owns its underlying matrix. Object has size size and all its element is equal to value.

Member Function Documentation

const_iterator theplu::yat::classifier::DataLookupWeighted1D::begin ( ) const
Returns
'Read Only' iterator to beginning of DataLookupWeighted1D.
double theplu::yat::classifier::DataLookupWeighted1D::data ( const size_t  i) const
Returns
data(i)
const_iterator theplu::yat::classifier::DataLookupWeighted1D::end ( ) const
Returns
'Read Only' iterator to end of DataLookupWeighted1D.
size_t theplu::yat::classifier::DataLookupWeighted1D::size ( void  ) const
Returns
number of elements
double theplu::yat::classifier::DataLookupWeighted1D::weight ( const size_t  i) const
Returns
weight(i)

Friends And Related Function Documentation

void convert ( const DataLookupWeighted1D ,
utility::Vector value,
utility::Vector weight 
)
related

Converts a DataLookupWeighted1D to two utility::vector

double sum_weight ( const DataLookupWeighted1D )
related
Returns
sum of weights

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

Generated on Wed May 23 2018 02:32:35 for yat by  doxygen 1.8.11