#include <ConcatColumnsVMatrix.h>
Inheritance diagram for PLearn::ConcatColumnsVMatrix:
Public Member Functions | |
ConcatColumnsVMatrix (Array< VMat > the_array=Array< VMat >()) | |
The lists of VMFields are appended upon construction. | |
ConcatColumnsVMatrix (VMat d1, VMat d2) | |
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) | |
const map< string, real > & | getStringMapping (int col) const |
returns the whole string->value mapping | |
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 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). | |
PLEARN_DECLARE_OBJECT (ConcatColumnsVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
Public Attributes | |
bool | no_duplicate_fieldnames |
Protected Member Functions | |
virtual void | getNewRow (int i, const Vec &samplevec) const |
This is the only method requiring implementation in subclasses. | |
Static Protected 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 | |
Array< VMat > | array |
Private Types | |
typedef RowBufferedVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 56 of file ConcatColumnsVMatrix.h. |
|
The lists of VMFields are appended upon construction. The case where some VMat may have some fields and others not is handled properly. Definition at line 50 of file ConcatColumnsVMatrix.cc. References array, build_(), and PLearn::TVec< VMat >::size(). |
|
Definition at line 55 of file ConcatColumnsVMatrix.cc. References build_(). |
|
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 69 of file ConcatColumnsVMatrix.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 75 of file ConcatColumnsVMatrix.cc. References array, PLearn::TVec< VMat >::length(), no_duplicate_fieldnames, PLERROR, PLearn::TVec< VMField >::resize(), PLearn::TVec< VMat >::size(), PLearn::tostring(), and PLearn::VMatrix::unduplicateFieldNames(). Referenced by build(), and ConcatColumnsVMatrix(). |
|
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 61 of file ConcatColumnsVMatrix.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 210 of file ConcatColumnsVMatrix.cc. References array, PLearn::TVec< T >::length(), PLERROR, PLearn::TVec< VMat >::size(), PLearn::TVec< T >::subVec(), and PLearn::VMatrix::width(). |
|
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 189 of file ConcatColumnsVMatrix.cc. References array, k, and PLearn::VMat::width(). |
|
This is the only method requiring implementation in subclasses.
Implements PLearn::RowBufferedVMatrix. Definition at line 117 of file ConcatColumnsVMatrix.cc. References array, PLERROR, PLearn::TVec< VMat >::size(), PLearn::TVec< T >::subVec(), and PLearn::Vec. |
|
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 173 of file ConcatColumnsVMatrix.cc. |
|
returns the whole string->value mapping
Definition at line 159 of file ConcatColumnsVMatrix.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 131 of file ConcatColumnsVMatrix.cc. |
|
returns the string associated with value val for field# col. Or returns "" if no string is associated. Reimplemented from PLearn::VMatrix. Definition at line 145 of file ConcatColumnsVMatrix.cc. |
|
|
|
in case the dimensions of an underlying vmat has changed, recompute it
Reimplemented from PLearn::VMatrix. Definition at line 82 of file ConcatColumnsVMatrix.h. References PLERROR. |
|
Definition at line 59 of file ConcatColumnsVMatrix.h. Referenced by build_(), ConcatColumnsVMatrix(), dot(), getNewRow(), getString(), getStringMapping(), getStringVal(), and getValString(). |
|
Definition at line 63 of file ConcatColumnsVMatrix.h. Referenced by build_(). |