1 #ifndef _theplu_yat_utility_kernel_matrix_
2 #define _theplu_yat_utility_kernel_matrix_
25 #include "Container2DIterator.h"
26 #include "StrideIterator.h"
63 template <
class RandomAccessRange1,
class RandomAccessRange2,
90 KernelMatrix(
const RandomAccessRange1& r1,
const RandomAccessRange2& r2)
91 : range1_(r1), range2_(r2) {}
96 KernelMatrix(
const RandomAccessRange1& r1,
const RandomAccessRange2& r2,
97 const BinaryFunctor& bf)
98 : range1_(r1), range2_(r2), func_(bf) {}
159 typename RandomAccessRange2::size_type
columns(
void)
const
160 {
return range2_.size(); }
168 typename RandomAccessRange1::size_type
rows(
void)
const
169 {
return range1_.size(); }
182 {
return func_(range1_[row], range2_[column]); }
185 RandomAccessRange1 range1_;
186 RandomAccessRange2 range2_;
KernelMatrix(const RandomAccessRange1 &r1, const RandomAccessRange2 &r2)
constructor
Definition: KernelMatrix.h:90
const_iterator begin(void) const
Definition: KernelMatrix.h:106
const_iterator end(void) const
Definition: KernelMatrix.h:133
Container2DIterator< const KernelMatrix, value_type, const_reference > const_iterator
const_iterator
Definition: KernelMatrix.h:76
const_column_iterator end_column(size_t column) const
Definition: KernelMatrix.h:140
const_iterator const_row_iterator
const_row_iterator_iterator
Definition: KernelMatrix.h:82
Iterator for a Container2D.
Definition: Container2DIterator.h:61
const_column_iterator begin_column(size_t column) const
Definition: KernelMatrix.h:114
StrideIterator< const_iterator > const_column_iterator
const_column_iterator
Definition: KernelMatrix.h:79
BinaryFunctor::result_type value_type
value_type is same as BinaryFunctor's result_type
Definition: KernelMatrix.h:69
value_type const_reference
const_reference is same as value_type
Definition: KernelMatrix.h:72
const_row_iterator end_row(size_t row) const
Definition: KernelMatrix.h:150
KernelMatrix(const RandomAccessRange1 &r1, const RandomAccessRange2 &r2, const BinaryFunctor &bf)
constructor
Definition: KernelMatrix.h:96
const_row_iterator begin_row(size_t row) const
Definition: KernelMatrix.h:126
RandomAccessRange1::size_type rows(void) const
Definition: KernelMatrix.h:168
const_reference operator()(size_t row, size_t column) const
Element access operator.
Definition: KernelMatrix.h:181
RandomAccessRange2::size_type columns(void) const
Definition: KernelMatrix.h:159
A KernelMatrix is a Container2D.
Definition: KernelMatrix.h:65
Adaptor using a stride on underlying iterator.
Definition: StrideIterator.h:50