specialized container class for multi-class SVM problems More...
#include <shark/Algorithms/QP/QpSparseArray.h>
| Classes | |
| struct | Entry | 
| Non-default (non-zero) array entry.  More... | |
| struct | Row | 
| Data structure describing a row of the sparse array.  More... | |
| Public Member Functions | |
| QpSparseArray (std::size_t height, std::size_t width, std::size_t space) | |
| QpSparseArray () | |
| std::size_t | width () const | 
| number of columns | |
| std::size_t | height () const | 
| number of rows | |
| QpFloatType | operator() (std::size_t row, std::size_t col) const | 
| obtain an element of the matrix | |
| Row const & | row (std::size_t row) const | 
| obtain a row of the matrix | |
| void | setDefaultValue (std::size_t row, QpFloatType defaultvalue) | 
| void | add (std::size_t row, std::size_t col, QpFloatType value) | 
| void | resize (std::size_t height, std::size_t width, std::size_t space) | 
| Protected Attributes | |
| std::size_t | m_width | 
| number of columns | |
| std::size_t | m_height | 
| number of rows | |
| std::size_t | m_used | 
| current total number of non-default components | |
| std::vector< Entry > | m_data | 
| storage for Entry structures | |
| std::vector< Row > | m_row | 
| storage for Row structures | |
specialized container class for multi-class SVM problems
Definition at line 56 of file QpSparseArray.h.
| 
 | inline | 
Constructor. The space parameter is an upper limit on the number of non-default (aka non-zero) entries of the array. 
 
Definition at line 81 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::height(), and shark::QpSparseArray< QpFloatType >::m_row.
| 
 | inline | 
Definition at line 94 of file QpSparseArray.h.
| 
 | inline | 
Set a specific value. Note that entries can not be changed once they are added, and that adding elements must be done row-wise, and in order within each row. However, the order of rows does not matter.
Definition at line 130 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::Row::entry, shark::QpSparseArray< QpFloatType >::m_data, shark::QpSparseArray< QpFloatType >::m_row, shark::QpSparseArray< QpFloatType >::m_used, shark::QpSparseArray< QpFloatType >::row(), shark::QpSparseArray< QpFloatType >::Row::size, and SIZE_CHECK.
| 
 | inline | 
number of rows
Definition at line 101 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::m_height.
Referenced by shark::QpSparseArray< QpFloatType >::QpSparseArray(), and shark::QpSparseArray< QpFloatType >::resize().
| 
 | inline | 
obtain an element of the matrix
Definition at line 105 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::Row::defaultvalue, shark::QpSparseArray< QpFloatType >::Row::entry, shark::QpSparseArray< QpFloatType >::Entry::index, shark::QpSparseArray< QpFloatType >::m_row, shark::QpSparseArray< QpFloatType >::row(), shark::QpSparseArray< QpFloatType >::Row::size, and shark::QpSparseArray< QpFloatType >::Entry::value.
| 
 | inline | 
Definition at line 144 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::height(), shark::QpSparseArray< QpFloatType >::m_data, shark::QpSparseArray< QpFloatType >::m_height, shark::QpSparseArray< QpFloatType >::m_row, shark::QpSparseArray< QpFloatType >::m_used, shark::QpSparseArray< QpFloatType >::m_width, and shark::QpSparseArray< QpFloatType >::width().
| 
 | inline | 
obtain a row of the matrix
Definition at line 117 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::m_row, and shark::QpSparseArray< QpFloatType >::row().
Referenced by shark::QpSparseArray< QpFloatType >::add(), shark::QpSparseArray< QpFloatType >::operator()(), shark::QpSparseArray< QpFloatType >::row(), shark::QpSparseArray< QpFloatType >::setDefaultValue(), shark::BiasSolver< Matrix >::solve(), and shark::BiasSolverSimplex< Matrix >::solve().
| 
 | inline | 
set the default value, that is, the value of all implicitly defined elements of a row
Definition at line 122 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::m_row, and shark::QpSparseArray< QpFloatType >::row().
| 
 | inline | 
number of columns
Definition at line 97 of file QpSparseArray.h.
References shark::QpSparseArray< QpFloatType >::m_width.
Referenced by shark::QpSparseArray< QpFloatType >::resize(), and shark::CSvmTrainer< InputType, CacheType >::train().
| 
 | protected | 
storage for Entry structures
Definition at line 164 of file QpSparseArray.h.
Referenced by shark::QpSparseArray< QpFloatType >::add(), and shark::QpSparseArray< QpFloatType >::resize().
| 
 | protected | 
number of rows
Definition at line 158 of file QpSparseArray.h.
Referenced by shark::QpSparseArray< QpFloatType >::height(), and shark::QpSparseArray< QpFloatType >::resize().
| 
 | protected | 
storage for Row structures
Definition at line 167 of file QpSparseArray.h.
Referenced by shark::QpSparseArray< QpFloatType >::add(), shark::QpSparseArray< QpFloatType >::operator()(), shark::QpSparseArray< QpFloatType >::QpSparseArray(), shark::QpSparseArray< QpFloatType >::resize(), shark::QpSparseArray< QpFloatType >::row(), and shark::QpSparseArray< QpFloatType >::setDefaultValue().
| 
 | protected | 
current total number of non-default components
Definition at line 161 of file QpSparseArray.h.
Referenced by shark::QpSparseArray< QpFloatType >::add(), and shark::QpSparseArray< QpFloatType >::resize().
| 
 | protected | 
number of columns
Definition at line 155 of file QpSparseArray.h.
Referenced by shark::QpSparseArray< QpFloatType >::resize(), and shark::QpSparseArray< QpFloatType >::width().