39 #ifndef SHARK_LINALG_EXAMPLEMODIFIEDKERNELMATRIX_H 40 #define SHARK_LINALG_EXAMPLEMODIFIEDKERNELMATRIX_H 59 template <
typename InputType,
typename CacheType>
76 std::iota(
x.begin(),
x.end(),data.
elements().begin());
81 {
return entry(i, j); }
102 QpFloatType
entry(std::size_t i, std::size_t j)
const 112 *
x[j]) * (1.0 / m_scalingCoefficients[i]) * (1.0 / m_scalingCoefficients[j]);
119 void row(std::size_t i, std::size_t start,std::size_t end, QpFloatType* storage)
const{
120 for(std::size_t j = start; j < end; j++){
121 storage[j-start] =
entry(i,j);
128 blas::matrix_expression<M, blas::cpu_tag> & storage
130 for(std::size_t i = 0; i !=
size(); ++i){
131 for(std::size_t j = 0; j !=
size(); ++j){
132 storage(i,j) =
entry(i,j);
140 m_scalingCoefficients = scalingCoefficients;
150 std::vector<PointerType>
x;
157 RealVector m_scalingCoefficients;