#include <SelectRowsVMatrix.h>
Inheritance diagram for PLearn::SelectRowsVMatrix:
Public Member Functions | |
SelectRowsVMatrix () | |
SelectRowsVMatrix (VMat the_source, TVec< int > the_indices) | |
Also copies the original fieldinfos upon construction Here the indices will be shared for efficiency. | |
SelectRowsVMatrix (VMat the_source, Vec the_indices) | |
Here the indices will be copied locally into an integer vector. | |
PLEARN_DECLARE_OBJECT (SelectRowsVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
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 laying between columns j (inclusive) and j+v.length() (exclusive) | |
virtual real | getStringVal (int col, const string &str) const |
returns value associated with a string (or MISSING_VALUE if there's no association for this string) | |
virtual string | getValString (int col, real val) const |
returns the string associated with value val for field# col. | |
virtual string | getString (int row, int col) const |
returns element as a string, even if value doesn't map to a string, in which case tostring(value) is returned | |
virtual const map< string, real > & | getStringToRealMapping (int col) const |
returns the whole string->value mapping | |
virtual const map< real, string > & | getRealToStringMapping (int col) const |
returns the value->string mapping for field 'fld' | |
virtual void | reset_dimensions () |
in case the dimensions of an underlying vmat has changed, recompute it | |
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) |
Declares this class' options. | |
Public Attributes | |
TVec< int > | indices |
Public build options. | |
Protected Member Functions | |
void | getNewRow (int i, const Vec &v) const |
Must be implemented in subclasses: default version returns an error. | |
Private Types | |
typedef SourceVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 55 of file SelectRowsVMatrix.h.
|
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::BootstrapVMatrix, PLearn::RemoveDuplicateVMatrix, and PLearn::SortRowsVMatrix. Definition at line 60 of file SelectRowsVMatrix.h. |
|
Definition at line 54 of file SelectRowsVMatrix.cc. |
|
Also copies the original fieldinfos upon construction Here the indices will be shared for efficiency. But you should not modify them afterwards! Definition at line 58 of file SelectRowsVMatrix.cc. References build_(). |
|
Here the indices will be copied locally into an integer vector.
Definition at line 66 of file SelectRowsVMatrix.cc. References build_(), indices, PLearn::TVec< T >::length(), PLearn::TVec< int >::resize(), 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::SourceVMatrix. Reimplemented in PLearn::BootstrapVMatrix, PLearn::RemoveDuplicateVMatrix, and PLearn::SortRowsVMatrix. Definition at line 117 of file SelectRowsVMatrix.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::BootstrapVMatrix, PLearn::RemoveDuplicateVMatrix, and PLearn::SortRowsVMatrix. Definition at line 126 of file SelectRowsVMatrix.cc. References indices, PLearn::TVec< int >::length(), and PLearn::VMat::width(). Referenced by build(), and SelectRowsVMatrix(). |
|
Declares this class' options.
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::BootstrapVMatrix, PLearn::RemoveDuplicateVMatrix, and PLearn::SortRowsVMatrix. Definition at line 101 of file SelectRowsVMatrix.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::RowBufferedVMatrix. Definition at line 83 of file SelectRowsVMatrix.cc. References indices. |
|
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::RowBufferedVMatrix. Definition at line 80 of file SelectRowsVMatrix.cc. References indices. |
|
returns element (i,j)
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 74 of file SelectRowsVMatrix.cc. References indices. |
|
Must be implemented in subclasses: default version returns an error.
Reimplemented from PLearn::SourceVMatrix. Definition at line 89 of file SelectRowsVMatrix.h. References getNewRow(), and getSubRow(). Referenced by getNewRow(). |
|
returns the value->string mapping for field 'fld'
Reimplemented from PLearn::VMatrix. Definition at line 98 of file SelectRowsVMatrix.cc. |
|
returns element as a string, even if value doesn't map to a string, in which case tostring(value) is returned
Reimplemented from PLearn::VMatrix. Definition at line 92 of file SelectRowsVMatrix.cc. References indices. |
|
returns the whole string->value mapping
Reimplemented from PLearn::VMatrix. Definition at line 95 of file SelectRowsVMatrix.cc. |
|
returns value associated with a string (or MISSING_VALUE if there's no association for this string)
Reimplemented from PLearn::VMatrix. Definition at line 86 of file SelectRowsVMatrix.cc. |
|
fills v with the subrow i laying between columns j (inclusive) and j+v.length() (exclusive)
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 77 of file SelectRowsVMatrix.cc. References PLearn::VMat::getSubRow(), and indices. Referenced by getNewRow(). |
|
returns the string associated with value val for field# col. Or returns "" if no string is associated. Reimplemented from PLearn::VMatrix. Definition at line 89 of file SelectRowsVMatrix.cc. References val. |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::RemoveDuplicateVMatrix, and PLearn::SortRowsVMatrix. Definition at line 108 of file SelectRowsVMatrix.cc. References PLearn::deepCopyField(), and indices. |
|
|
|
in case the dimensions of an underlying vmat has changed, recompute it
Reimplemented from PLearn::VMatrix. Definition at line 102 of file SelectRowsVMatrix.h. References PLearn::VMat::width(). |
|
Public build options.
Definition at line 65 of file SelectRowsVMatrix.h. Referenced by build_(), dot(), get(), getString(), getSubRow(), makeDeepCopyFromShallowCopy(), and SelectRowsVMatrix(). |