SVM ranking matrix. More...
#include <shark/LinAlg/DifferenceKernelMatrix.h>
| Public Types | |
| typedef CacheType | QpFloatType | 
| Public Member Functions | |
| DifferenceKernelMatrix (AbstractKernelFunction< InputType > const &kernel, Data< InputType > const &dataset, std::vector< std::pair< std::size_t, std::size_t > > const &pairs) | |
| Constructor. | |
| QpFloatType | operator() (std::size_t i, std::size_t j) const | 
| return a single matrix entry | |
| QpFloatType | entry (std::size_t i, std::size_t j) const | 
| return a single matrix entry | |
| void | row (std::size_t i, std::size_t start, std::size_t end, QpFloatType *storage) const | 
| Computes the i-th row of the kernel matrix. | |
| template<class M > | |
| void | matrix (blas::matrix_expression< M, blas::cpu_tag > &storage) const | 
| Computes the kernel-matrix. | |
| void | flipColumnsAndRows (std::size_t i, std::size_t j) | 
| swap two variables | |
| std::size_t | size () const | 
| return the size of the quadratic matrix | |
| Protected Attributes | |
| AbstractKernelFunction< InputType > const & | m_kernel | 
| underlying kernel function | |
| Data< InputType > const & | m_dataset | 
| underlying set of points | |
| std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > | m_indices | 
| pairs of points defining the matrix components | |
SVM ranking matrix.
Definition at line 64 of file DifferenceKernelMatrix.h.
| typedef CacheType shark::DifferenceKernelMatrix< InputType, CacheType >::QpFloatType | 
Definition at line 67 of file DifferenceKernelMatrix.h.
| 
 | inline | 
Constructor.
Definition at line 70 of file DifferenceKernelMatrix.h.
References shark::DataView< DatasetType >::batch(), shark::DifferenceKernelMatrix< InputType, CacheType >::m_indices, and shark::DataView< DatasetType >::positionInBatch().
| 
 | inline | 
return a single matrix entry
Definition at line 94 of file DifferenceKernelMatrix.h.
References shark::Data< Type >::batch(), shark::getBatchElement(), shark::DifferenceKernelMatrix< InputType, CacheType >::m_dataset, shark::DifferenceKernelMatrix< InputType, CacheType >::m_indices, and shark::DifferenceKernelMatrix< InputType, CacheType >::m_kernel.
Referenced by shark::DifferenceKernelMatrix< InputType, CacheType >::matrix(), shark::DifferenceKernelMatrix< InputType, CacheType >::operator()(), and shark::DifferenceKernelMatrix< InputType, CacheType >::row().
| 
 | inline | 
swap two variables
Definition at line 137 of file DifferenceKernelMatrix.h.
References shark::DifferenceKernelMatrix< InputType, CacheType >::m_indices, and shark::swap().
| 
 | inline | 
Computes the kernel-matrix.
Definition at line 128 of file DifferenceKernelMatrix.h.
References shark::DifferenceKernelMatrix< InputType, CacheType >::entry(), and shark::DifferenceKernelMatrix< InputType, CacheType >::size().
| 
 | inline | 
return a single matrix entry
Definition at line 90 of file DifferenceKernelMatrix.h.
References shark::DifferenceKernelMatrix< InputType, CacheType >::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 122 of file DifferenceKernelMatrix.h.
References shark::DifferenceKernelMatrix< InputType, CacheType >::entry().
| 
 | inline | 
return the size of the quadratic matrix
Definition at line 144 of file DifferenceKernelMatrix.h.
References shark::DifferenceKernelMatrix< InputType, CacheType >::m_indices.
Referenced by shark::DifferenceKernelMatrix< InputType, CacheType >::matrix().
| 
 | protected | 
underlying set of points
Definition at line 152 of file DifferenceKernelMatrix.h.
Referenced by shark::DifferenceKernelMatrix< InputType, CacheType >::entry().
| 
 | protected | 
pairs of points defining the matrix components
Definition at line 155 of file DifferenceKernelMatrix.h.
Referenced by shark::DifferenceKernelMatrix< InputType, CacheType >::DifferenceKernelMatrix(), shark::DifferenceKernelMatrix< InputType, CacheType >::entry(), shark::DifferenceKernelMatrix< InputType, CacheType >::flipColumnsAndRows(), and shark::DifferenceKernelMatrix< InputType, CacheType >::size().
| 
 | protected | 
underlying kernel function
Definition at line 149 of file DifferenceKernelMatrix.h.
Referenced by shark::DifferenceKernelMatrix< InputType, CacheType >::entry().