#include <SelectColumnsVMatrix.h>
Inheritance diagram for PLearn::SelectColumnsVMatrix:
Public Member Functions | |
SelectColumnsVMatrix () | |
Default constructor. | |
SelectColumnsVMatrix (VMat the_source, TVec< string > the_fields) | |
The appropriate fieldinfos are copied upon construction. | |
SelectColumnsVMatrix (VMat the_source, TVec< int > the_indices) | |
The appropriate fieldinfos are copied upon construction Here the indices will be shared for efficiency. | |
SelectColumnsVMatrix (VMat the_source, Vec the_indices) | |
Here the indices will be copied locally into an integer vector. | |
PLEARN_DECLARE_OBJECT (SelectColumnsVMatrix) | |
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 void | reset_dimensions () |
in case the dimensions of an underlying vmat has changed, recompute it | |
virtual const map< string, real > & | getStringToRealMapping (int col) const |
returns the string->value mapping for field 'fld' | |
virtual const map< real, string > & | getRealToStringMapping (int col) const |
returns the value->string mapping for field 'fld' | |
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. | |
Public Attributes | |
TVec< int > | indices |
Public build options. | |
TVec< string > | fields |
Protected Member Functions | |
void | getNewRow (int i, const Vec &v) const |
Must be implemented in subclasses: default version returns an error. | |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Private Types | |
typedef SourceVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
NC: removed the unused field raw_sample.
Definition at line 56 of file SelectColumnsVMatrix.h.
|
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::GetInputVMatrix. Definition at line 61 of file SelectColumnsVMatrix.h. |
|
Default constructor.
Definition at line 57 of file SelectColumnsVMatrix.cc. |
|
The appropriate fieldinfos are copied upon construction. Here the indices will be shared for efficiency. But you should not modify them afterwards! Definition at line 60 of file SelectColumnsVMatrix.cc. References build_(). |
|
The appropriate fieldinfos are copied upon construction Here the indices will be shared for efficiency. But you should not modify them afterwards! Definition at line 67 of file SelectColumnsVMatrix.cc. References build_(). |
|
Here the indices will be copied locally into an integer vector.
Definition at line 74 of file SelectColumnsVMatrix.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::GetInputVMatrix. Definition at line 112 of file SelectColumnsVMatrix.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::GetInputVMatrix. Definition at line 121 of file SelectColumnsVMatrix.cc. References PLearn::TVec< int >::append(), PLearn::TVec< int >::clear(), fields, PLearn::VMat::getFieldIndex(), indices, PLearn::TVec< string >::isNotEmpty(), PLearn::VMat::length(), PLearn::TVec< int >::length(), PLearn::TVec< string >::length(), PLearn::TVec< VMField >::resize(), and PLearn::VMatrix::width(). Referenced by build(), and SelectColumnsVMatrix(). |
|
Declares this class' options.
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::GetInputVMatrix. Definition at line 92 of file SelectColumnsVMatrix.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
returns element (i,j)
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 83 of file SelectColumnsVMatrix.cc. References indices. |
|
Must be implemented in subclasses: default version returns an error.
Reimplemented from PLearn::SourceVMatrix. Definition at line 93 of file SelectColumnsVMatrix.h. References getNewRow(), and getSubRow(). Referenced by getNewRow(). |
|
returns the value->string mapping for field 'fld'
Reimplemented from PLearn::VMatrix. Definition at line 160 of file SelectColumnsVMatrix.cc. References indices. |
|
returns the string->value mapping for field 'fld'
Reimplemented from PLearn::VMatrix. Definition at line 145 of file SelectColumnsVMatrix.cc. References indices. |
|
returns value associated with a string (or MISSING_VALUE if there's no association for this string)
Reimplemented from PLearn::VMatrix. Definition at line 152 of file SelectColumnsVMatrix.cc. References indices. |
|
fills v with the subrow i laying between columns j (inclusive) and j+v.length() (exclusive)
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 86 of file SelectColumnsVMatrix.cc. References indices, and PLearn::TVec< T >::length(). 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 167 of file SelectColumnsVMatrix.cc. |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::SourceVMatrix. Reimplemented in PLearn::GetInputVMatrix. Definition at line 103 of file SelectColumnsVMatrix.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 99 of file SelectColumnsVMatrix.h. References indices, PLearn::TVec< int >::length(), PLearn::VMat::length(), PLERROR, and PLearn::VMat::width(). |
|
Definition at line 67 of file SelectColumnsVMatrix.h. Referenced by build_(). |
|
Public build options.
Definition at line 66 of file SelectColumnsVMatrix.h. Referenced by build_(), get(), getRealToStringMapping(), getStringToRealMapping(), getStringVal(), getSubRow(), getValString(), makeDeepCopyFromShallowCopy(), reset_dimensions(), and SelectColumnsVMatrix(). |