#include <TemporalHorizonVMatrix.h>
Inheritance diagram for PLearn::TemporalHorizonVMatrix:
Public Member Functions | |
TemporalHorizonVMatrix () | |
Also copies the original fieldinfos upon construction. | |
TemporalHorizonVMatrix (VMat the_distr, int the_horizon, int target_size) | |
PLEARN_DECLARE_OBJECT (TemporalHorizonVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
virtual real | get (int i, int j) const |
returns element (i,j) | |
virtual void | put (int i, int j, real value) |
sets element (i,j) to value | |
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) |
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) | |
Protected Attributes | |
VMat | distr |
int | horizon |
int | targetsize |
TVec< int > | row_delay |
Private Types | |
typedef VMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 54 of file TemporalHorizonVMatrix.h.
|
Reimplemented from PLearn::VMatrix. Definition at line 56 of file TemporalHorizonVMatrix.h. Referenced by TemporalHorizonVMatrix(). |
|
Also copies the original fieldinfos upon construction.
Definition at line 67 of file TemporalHorizonVMatrix.h. |
|
Definition at line 52 of file TemporalHorizonVMatrix.cc. References distr, horizon, inherited, PLearn::TVec< int >::resize(), row_delay, targetsize, and PLearn::VMatrix::width(). |
|
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 121 of file TemporalHorizonVMatrix.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 130 of file TemporalHorizonVMatrix.cc. References distr, horizon, PLearn::VMat::length(), PLearn::TVec< int >::resize(), row_delay, targetsize, PLearn::VMatrix::width(), and PLearn::VMat::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 101 of file TemporalHorizonVMatrix.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 78 of file TemporalHorizonVMatrix.cc. References distr, k, PLearn::TVec< T >::length(), row_delay, and PLearn::Vec. |
|
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 70 of file TemporalHorizonVMatrix.cc. |
|
returns element (i,j)
Reimplemented from PLearn::VMatrix. Definition at line 64 of file TemporalHorizonVMatrix.cc. |
|
returns the value->string mapping for field 'fld'
Reimplemented from PLearn::VMatrix. Definition at line 98 of file TemporalHorizonVMatrix.cc. References distr. |
|
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 TemporalHorizonVMatrix.cc. |
|
returns the whole string->value mapping
Reimplemented from PLearn::VMatrix. Definition at line 95 of file TemporalHorizonVMatrix.cc. References distr. |
|
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 TemporalHorizonVMatrix.cc. References distr. |
|
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 TemporalHorizonVMatrix.cc. |
|
Reimplemented from PLearn::VMatrix. Definition at line 112 of file TemporalHorizonVMatrix.cc. References PLearn::deepCopyField(), and distr. |
|
|
|
sets element (i,j) to value
Reimplemented from PLearn::VMatrix. Definition at line 67 of file TemporalHorizonVMatrix.cc. |
|
in case the dimensions of an underlying vmat has changed, recompute it
Reimplemented from PLearn::VMatrix. Definition at line 87 of file TemporalHorizonVMatrix.h. References distr, and PLearn::VMat::width(). |
|
Definition at line 59 of file TemporalHorizonVMatrix.h. Referenced by build_(), dot(), get(), getRealToStringMapping(), getString(), getStringToRealMapping(), getStringVal(), getValString(), makeDeepCopyFromShallowCopy(), put(), reset_dimensions(), and TemporalHorizonVMatrix(). |
|
Definition at line 60 of file TemporalHorizonVMatrix.h. Referenced by build_(), and TemporalHorizonVMatrix(). |
|
Definition at line 62 of file TemporalHorizonVMatrix.h. Referenced by build_(), dot(), get(), getString(), put(), and TemporalHorizonVMatrix(). |
|
Definition at line 61 of file TemporalHorizonVMatrix.h. Referenced by build_(), and TemporalHorizonVMatrix(). |