#include <RemapLastColumnVMatrix.h>
Inheritance diagram for PLearn::RemapLastColumnVMatrix:
Public Member Functions | |
RemapLastColumnVMatrix () | |
default constructor (for automatic deserialization) | |
RemapLastColumnVMatrix (VMat the_underlying_distr, Mat the_mapping) | |
full explicit mapping. | |
RemapLastColumnVMatrix (VMat the_underlying_distr, real if_equals_value, real then_value=+1, real else_value=-1) | |
if-then-else mapping. | |
PLEARN_DECLARE_OBJECT (RemapLastColumnVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
virtual void | getNewRow (int i, const Vec &samplevec) const |
This is the only method requiring implementation in subclasses. | |
virtual void | reset_dimensions () |
in case the dimensions of an underlying vmat has changed, recompute it | |
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 | underlying_distr |
Mat | mapping |
If this is not empty, then it represents the mapping to apply. | |
real | if_equals_val |
real | then_val |
real | else_val |
Private Types | |
typedef RowBufferedVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 55 of file RemapLastColumnVMatrix.h. Referenced by RemapLastColumnVMatrix(). |
|
default constructor (for automatic deserialization)
Definition at line 51 of file RemapLastColumnVMatrix.cc. |
|
full explicit mapping. Warning: VMFields are NOT YET handled by this constructor Definition at line 56 of file RemapLastColumnVMatrix.cc. References inherited, and PLearn::Mat. |
|
if-then-else mapping. Warning: VMFields are NOT YET handled by this constructor Definition at line 62 of file RemapLastColumnVMatrix.cc. |
|
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 70 of file RemapLastColumnVMatrix.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 77 of file RemapLastColumnVMatrix.cc. 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 82 of file RemapLastColumnVMatrix.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
This is the only method requiring implementation in subclasses.
Implements PLearn::RowBufferedVMatrix. Definition at line 92 of file RemapLastColumnVMatrix.cc. References else_val, if_equals_val, PLearn::TMat< T >::isEmpty(), k, PLearn::TVec< T >::lastElement(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::VMatrix::length(), mapping, PLERROR, PLearn::TVec< T >::subVec(), then_val, underlying_distr, val, PLearn::Vec, PLearn::TMat< T >::width(), PLearn::VMat::width(), and PLearn::VMatrix::width(). |
|
|
|
in case the dimensions of an underlying vmat has changed, recompute it
Reimplemented from PLearn::VMatrix. Definition at line 92 of file RemapLastColumnVMatrix.h. References PLearn::VMat::length(), underlying_distr, and PLearn::VMat::width(). |
|
Definition at line 70 of file RemapLastColumnVMatrix.h. Referenced by getNewRow(). |
|
These are used only if mapping is an empty Mat, in which case the value in the last column will be replaced by 'then_val' if it is equal to 'if_equals_val', otherwise it will be replaced by 'else_val' Definition at line 68 of file RemapLastColumnVMatrix.h. Referenced by getNewRow(). |
|
If this is not empty, then it represents the mapping to apply.
Definition at line 61 of file RemapLastColumnVMatrix.h. Referenced by getNewRow(). |
|
Definition at line 69 of file RemapLastColumnVMatrix.h. Referenced by getNewRow(). |
|
Definition at line 58 of file RemapLastColumnVMatrix.h. Referenced by getNewRow(), and reset_dimensions(). |