#include <JoinVMatrix.h>
Inheritance diagram for PLearn::JoinVMatrix:
Public Member Functions | |
JoinVMatrix () | |
JoinVMatrix (VMat mas, VMat sla, TVec< int > mi, TVec< int > si) | |
void | addStatField (const string &statis, const string &namefrom, const string &nameto) |
PLEARN_DECLARE_OBJECT (JoinVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
virtual string | getValString (int col, real val) const |
returns the string associated with value val for field# col. | |
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 | 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 | |
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 | |
virtual void | getNewRow (int idx, const Vec &v) const |
This is the only method requiring implementation in subclasses. | |
Private Types | |
typedef RowBufferedVMatrix | inherited |
typedef hash_multimap< Vec, int > | Maptype |
the fields generated by the join operation (declared with addStatField) | |
Private Member Functions | |
void | build_ () |
This does the actual building. | |
Private Attributes | |
vector< JoinFieldStat > | fld |
VMat | master |
VMat | slave |
Vec | temp |
Vec | tempkey |
TVec< int > | master_idx |
TVec< int > | slave_idx |
Maptype | mp |
|
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 72 of file JoinVMatrix.h. Referenced by JoinVMatrix(). |
|
the fields generated by the join operation (declared with addStatField)
Definition at line 75 of file JoinVMatrix.h. |
|
Definition at line 86 of file JoinVMatrix.h. |
|
Definition at line 48 of file JoinVMatrix.cc. |
|
Definition at line 93 of file JoinVMatrix.cc. References fld, PLERROR, slave, and PLearn::VMatrix::width(). Referenced by PLearn::VVMatrix::processJoinSection(). |
|
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 55 of file JoinVMatrix.cc. References build_(). Referenced by JoinVMatrix(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 62 of file JoinVMatrix.cc. References PLearn::VMat::fieldName(), PLearn::VMat::length(), master, master_idx, mp, PLERROR, PLearn::TVec< T >::resize(), PLearn::TVec< int >::size(), slave, slave_idx, temp, tempkey, PLearn::VMat::width(), and PLearn::VMatrix::width(). 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 84 of file JoinVMatrix.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
This is the only method requiring implementation in subclasses.
Implements PLearn::RowBufferedVMatrix. Definition at line 126 of file JoinVMatrix.cc. References count, fld, PLearn::is_missing(), master, master_idx, PLearn::max(), PLearn::min(), mp, PLERROR, PLearn::TVec< int >::size(), slave, PLearn::sqrt(), PLearn::TVec< T >::subVec(), PLearn::sum(), PLearn::sumsquare(), temp, tempkey, val, PLearn::VMatrix::width(), and PLearn::VMat::width(). |
|
returns the value->string mapping for field 'fld'
Reimplemented from PLearn::VMatrix. Definition at line 232 of file JoinVMatrix.cc. References master, slave, and PLearn::VMat::width(). |
|
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 241 of file JoinVMatrix.cc. References master, slave, and PLearn::VMat::width(). |
|
returns the string->value mapping for field 'fld'
Reimplemented from PLearn::VMatrix. Definition at line 223 of file JoinVMatrix.cc. References master, slave, and PLearn::VMat::width(). |
|
returns value associated with a string (or MISSING_VALUE if there's no association for this string)
Reimplemented from PLearn::VMatrix. Definition at line 215 of file JoinVMatrix.cc. References master, slave, and PLearn::VMat::width(). |
|
returns the string associated with value val for field# col. Or returns "" if no string is associated. Reimplemented from PLearn::VMatrix. Definition at line 207 of file JoinVMatrix.cc. References master, slave, val, and PLearn::VMat::width(). |
|
|
|
Definition at line 77 of file JoinVMatrix.h. Referenced by addStatField(), and getNewRow(). |
|
Definition at line 78 of file JoinVMatrix.h. Referenced by build_(), getNewRow(), getRealToStringMapping(), getString(), getStringToRealMapping(), getStringVal(), and getValString(). |
|
Definition at line 80 of file JoinVMatrix.h. Referenced by build_(), and getNewRow(). |
|
Definition at line 82 of file JoinVMatrix.h. Referenced by build_(), and getNewRow(). |
|
Definition at line 78 of file JoinVMatrix.h. Referenced by addStatField(), build_(), getNewRow(), getRealToStringMapping(), getString(), getStringToRealMapping(), getStringVal(), and getValString(). |
|
Definition at line 81 of file JoinVMatrix.h. Referenced by build_(). |
|
Definition at line 79 of file JoinVMatrix.h. Referenced by build_(), and getNewRow(). |
|
Definition at line 79 of file JoinVMatrix.h. Referenced by build_(), and getNewRow(). |