#include <RemoveRowsVMatrix.h>
Inheritance diagram for PLearn::RemoveRowsVMatrix:
Public Member Functions | |
virtual void | reset_dimensions () |
in case the dimensions of an underlying vmat has changed, recompute it | |
RemoveRowsVMatrix () | |
RemoveRowsVMatrix (VMat the_distr, Vec the_indices=Vec()) | |
Copy the original fieldinfos upon construction. | |
PLEARN_DECLARE_OBJECT (RemoveRowsVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
void | remove (int rownum) |
the given rownum of the underlying distr will also be excluded | |
void | unremove (int rownum) |
virtual real | get (int i, int j) const |
returns element (i,j) | |
virtual void | getSubRow (int i, int j, Vec v) const |
fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive) | |
virtual real | dot (int i1, int i2, int inputsize) const |
virtual real | dot (int i, const Vec &v) const |
returns the result of the dot product between row i and the given vec (only v.length() first elements of row i are considered). | |
Static Public Member Functions | |
void | declareOptions (OptionList &ol) |
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) | |
Protected Member Functions | |
int | getrownum (int i) const |
returns the row number in distr corresponding to i in this VMat | |
Protected Attributes | |
VMat | distr |
Vec | indices |
Private Types | |
typedef VMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 53 of file RemoveRowsVMatrix.h.
|
Reimplemented from PLearn::VMatrix. Definition at line 55 of file RemoveRowsVMatrix.h. Referenced by RemoveRowsVMatrix(). |
|
Definition at line 70 of file RemoveRowsVMatrix.h. |
|
Copy the original fieldinfos upon construction.
Definition at line 50 of file RemoveRowsVMatrix.cc. References build(), std::copy(), inherited, and PLearn::Vec. |
|
Should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object. Reimplemented from PLearn::VMatrix. Definition at line 58 of file RemoveRowsVMatrix.cc. References build_(). Referenced by RemoveRowsVMatrix(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 65 of file RemoveRowsVMatrix.cc. References distr, indices, and PLearn::sortElements(). Referenced by build(). |
|
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); } Reimplemented from PLearn::VMatrix. Definition at line 74 of file RemoveRowsVMatrix.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
returns the result of the dot product between row i and the given vec (only v.length() first elements of row i are considered).
Reimplemented from PLearn::VMatrix. Definition at line 101 of file RemoveRowsVMatrix.cc. References distr, and getrownum(). |
|
returns the dot product between row i1 and row i2 (considering only the inputsize first elements). The default version in VMatrix is somewhat inefficient, as it repeatedly calls get(i,j) The default version in RowBufferedVMatrix is a little better as it buffers the 2 Vecs between calls in case one of them is needed again. But the real strength of this method is for specialised and efficient versions in subbclasses. This method is typically used by SmartKernels so that they can compute kernel values between input samples efficiently. Reimplemented from PLearn::VMatrix. Definition at line 98 of file RemoveRowsVMatrix.cc. References distr, and getrownum(). |
|
returns element (i,j)
Reimplemented from PLearn::VMatrix. Definition at line 92 of file RemoveRowsVMatrix.cc. References distr, and getrownum(). |
|
returns the row number in distr corresponding to i in this VMat
Definition at line 81 of file RemoveRowsVMatrix.cc. References indices, k, and PLearn::TVec< T >::length(). Referenced by dot(), get(), and getSubRow(). |
|
fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)
Reimplemented from PLearn::VMatrix. Definition at line 95 of file RemoveRowsVMatrix.cc. References distr, getrownum(), and PLearn::VMat::getSubRow(). |
|
|
|
the given rownum of the underlying distr will also be excluded
Definition at line 81 of file RemoveRowsVMatrix.h. References indices, and PLearn::TVec< T >::insertSorted(). |
|
in case the dimensions of an underlying vmat has changed, recompute it
Reimplemented from PLearn::VMatrix. Definition at line 65 of file RemoveRowsVMatrix.h. References distr, and PLearn::VMat::width(). |
|
Definition at line 87 of file RemoveRowsVMatrix.h. References indices, PLearn::TVec< T >::removeSorted(), and unremove(). Referenced by unremove(). |
|
Definition at line 58 of file RemoveRowsVMatrix.h. Referenced by build_(), dot(), get(), getSubRow(), and reset_dimensions(). |
|
Definition at line 59 of file RemoveRowsVMatrix.h. Referenced by build_(), getrownum(), remove(), and unremove(). |