yat  0.14.5pre
Public Types | Public Member Functions | List of all members
theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor > Class Template Reference

A KernelMatrix is a Container2D. More...

#include <yat/utility/KernelMatrix.h>

Public Types

typedef BinaryFunctor::result_type value_type
 value_type is same as BinaryFunctor's result_type
 
typedef value_type const_reference
 const_reference is same as value_type
 
typedef Container2DIterator
< const KernelMatrix,
value_type, const_reference
const_iterator
 const_iterator
 
typedef StrideIterator
< const_iterator
const_column_iterator
 const_column_iterator
 
typedef const_iterator const_row_iterator
 const_row_iterator_iterator
 

Public Member Functions

 KernelMatrix (const RandomAccessRange1 &r1, const RandomAccessRange2 &r2)
 constructor More...
 
 KernelMatrix (const RandomAccessRange1 &r1, const RandomAccessRange2 &r2, const BinaryFunctor &bf)
 constructor
 
const_iterator begin (void) const
 
const_column_iterator begin_column (size_t column) const
 
const_row_iterator begin_row (size_t row) const
 
const_iterator end (void) const
 
const_column_iterator end_column (size_t column) const
 
const_row_iterator end_row (size_t row) const
 
RandomAccessRange2::size_type columns (void) const
 
RandomAccessRange1::size_type rows (void) const
 
const_reference operator() (size_t row, size_t column) const
 Element access operator. More...
 

Detailed Description

template<class RandomAccessRange1, class RandomAccessRange2, class BinaryFunctor>
class theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >

A KernelMatrix is a Container2D.

A matrix-like object constructed from two RandomAccessContainers and Functor. Each row in the matrix correspond to an element in the RandomAccessRange1 and each column correspond to an element in RandomAccessRange2. Number of rows in the matrix equals number of element in RandomAccessRange1 and number of columns equals number of elements in RandomAccessRange2. An element in row row and column column is calculated by taking the element row in RandomAccessRange1 and element column in RandomAccessRange2, and passing these elements to BinaryFunctor.

Type Requirements:

Constructor & Destructor Documentation

template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::KernelMatrix ( const RandomAccessRange1 &  r1,
const RandomAccessRange2 &  r2 
)
inline

constructor

Same as three-argument constructor, but using default constructor of class BinaryFunctor.

Member Function Documentation

template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_iterator theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::begin ( void  ) const
inline

Iterator iterates along a row. When end of row is reached it jumps to beginning of next row.

Returns
const_iterator pointing to upper-left element.
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_column_iterator theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::begin_column ( size_t  column) const
inline

Iterator iterates along a column.

Returns
const_iterator pointing to first element of column column.
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_row_iterator theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::begin_row ( size_t  row) const
inline

Iterator iterates along a row.

Returns
const_iterator pointing to first element of row row.
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
RandomAccessRange2::size_type theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::columns ( void  ) const
inline

Number of rows is defined by RandomAccessRange2::size(void)

Returns
The number of columns in the matrix.
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_iterator theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::end ( void  ) const
inline
Returns
const_iterator pointing to end of matrix
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_column_iterator theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::end_column ( size_t  column) const
inline
Returns
const_iterator pointing to end of column i
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_row_iterator theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::end_row ( size_t  row) const
inline
Returns
const_iterator pointing to end of row i
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
const_reference theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::operator() ( size_t  row,
size_t  column 
) const
inline

Element access operator.

Element is calculated using BinaryFunctor passing row th element of RandomAccessRange1 and column th element in RandomAccessRange2.

Returns
Reference to the element position (row, column).
template<class RandomAccessRange1 , class RandomAccessRange2 , class BinaryFunctor >
RandomAccessRange1::size_type theplu::yat::utility::KernelMatrix< RandomAccessRange1, RandomAccessRange2, BinaryFunctor >::rows ( void  ) const
inline

Number of rows is defined by RandomAccessRange1::size(void)

Returns
The number of rows in the matrix.

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

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