Precomputed version of a matrix for quadratic programming. More...
#include <shark/LinAlg/PrecomputedMatrix.h>
Public Types | |
typedef Matrix::QpFloatType | QpFloatType |
Public Member Functions | |
PrecomputedMatrix (Matrix *base) | |
void | row (std::size_t k, std::size_t start, std::size_t end, QpFloatType *storage) const |
Computes the i-th row of the kernel matrix. More... | |
QpFloatType * | row (std::size_t k, std::size_t begin, std::size_t end) |
Return a subset of a matrix row. More... | |
QpFloatType | operator() (std::size_t i, std::size_t j) const |
return a single matrix entry More... | |
QpFloatType | entry (std::size_t i, std::size_t j) const |
return a single matrix entry More... | |
void | flipColumnsAndRows (std::size_t i, std::size_t j) |
swap two variables More... | |
std::size_t | size () const |
return the size of the quadratic matrix More... | |
std::size_t | getMaxCacheSize () |
for compatibility with CachedMatrix More... | |
std::size_t | getCacheSize () const |
for compatibility with CachedMatrix More... | |
std::size_t | getCacheRowSize (std::size_t k) const |
for compatibility with CachedMatrix More... | |
bool | isCached (std::size_t) |
for compatibility with CachedMatrix More... | |
void | setMaxCachedIndex (std::size_t n) |
for compatibility with CachedMatrix More... | |
void | clear () |
for compatibility with CachedMatrix More... | |
Protected Attributes | |
blas::matrix< QpFloatType > | matrix |
container for precomputed values More... | |
Precomputed version of a matrix for quadratic programming.
Definition at line 77 of file PrecomputedMatrix.h.
typedef Matrix::QpFloatType shark::PrecomputedMatrix< Matrix >::QpFloatType |
Definition at line 80 of file PrecomputedMatrix.h.
|
inline |
Constructor
base | matrix to be precomputed |
Definition at line 84 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
|
inline |
for compatibility with CachedMatrix
Definition at line 156 of file PrecomputedMatrix.h.
|
inline |
return a single matrix entry
Definition at line 120 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
Referenced by shark::PrecomputedMatrix< Matrix >::operator()().
|
inline |
swap two variables
Definition at line 126 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
|
inline |
for compatibility with CachedMatrix
Definition at line 145 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
|
inline |
for compatibility with CachedMatrix
Definition at line 141 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::getMaxCacheSize().
|
inline |
for compatibility with CachedMatrix
Definition at line 137 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
Referenced by shark::PrecomputedMatrix< Matrix >::getCacheSize().
|
inline |
for compatibility with CachedMatrix
Definition at line 149 of file PrecomputedMatrix.h.
|
inline |
return a single matrix entry
Definition at line 116 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::entry().
|
inline |
Computes the i-th row of the kernel matrix.
The entries start,...,end of the i-th row are computed and stored in storage. There must be enough room for this operation preallocated.
Definition at line 94 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
|
inline |
Return a subset of a matrix row.
k | matrix row |
begin | first column to be filled in |
end | last column to be filled in +1 |
Definition at line 110 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
|
inline |
for compatibility with CachedMatrix
Definition at line 153 of file PrecomputedMatrix.h.
|
inline |
return the size of the quadratic matrix
Definition at line 133 of file PrecomputedMatrix.h.
References shark::PrecomputedMatrix< Matrix >::matrix.
|
protected |
container for precomputed values
Definition at line 161 of file PrecomputedMatrix.h.
Referenced by shark::PrecomputedMatrix< Matrix >::entry(), shark::PrecomputedMatrix< Matrix >::flipColumnsAndRows(), shark::PrecomputedMatrix< Matrix >::getCacheRowSize(), shark::PrecomputedMatrix< Matrix >::getMaxCacheSize(), shark::PrecomputedMatrix< Matrix >::PrecomputedMatrix(), shark::PrecomputedMatrix< Matrix >::row(), and shark::PrecomputedMatrix< Matrix >::size().