PLearn 0.1
|
This VMatrix returns a constant element (specified upon construction) More...
#include <ConstantVMatrix.h>
Public Member Functions | |
ConstantVMatrix () | |
Default constructor (default return value is missing value) | |
ConstantVMatrix (int the_length, int the_width, real constant_output=MISSING_VALUE) | |
Initialize with a given size. | |
virtual void | build () |
Simply calls inherited::build() then build_() | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual ConstantVMatrix * | deepCopy (CopiesMap &copies) const |
virtual real | get (int i, int j) const |
Get element at i-th row, j-th column. | |
virtual void | getSubRow (int i, int j, Vec v) const |
Get part or all of the i-th, starting at the j-th column, with v.length() elements; these elements are put in v. | |
Static Public Member Functions | |
static string | _classname_ () |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Public Attributes | |
real | constant_output |
The constant output to return. | |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Private Types | |
typedef VMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
This VMatrix returns a constant element (specified upon construction)
Definition at line 55 of file ConstantVMatrix.h.
typedef VMatrix PLearn::ConstantVMatrix::inherited [private] |
Reimplemented from PLearn::VMatrix.
Definition at line 57 of file ConstantVMatrix.h.
PLearn::ConstantVMatrix::ConstantVMatrix | ( | ) |
Default constructor (default return value is missing value)
Definition at line 54 of file ConstantVMatrix.cc.
: inherited(), constant_output(MISSING_VALUE) { }
PLearn::ConstantVMatrix::ConstantVMatrix | ( | int | the_length, |
int | the_width, | ||
real | constant_output = MISSING_VALUE |
||
) |
Initialize with a given size.
Definition at line 58 of file ConstantVMatrix.cc.
: inherited(the_length, the_width), constant_output(constant) { }
string PLearn::ConstantVMatrix::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 52 of file ConstantVMatrix.cc.
OptionList & PLearn::ConstantVMatrix::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 52 of file ConstantVMatrix.cc.
RemoteMethodMap & PLearn::ConstantVMatrix::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 52 of file ConstantVMatrix.cc.
Reimplemented from PLearn::VMatrix.
Definition at line 52 of file ConstantVMatrix.cc.
Object * PLearn::ConstantVMatrix::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 52 of file ConstantVMatrix.cc.
StaticInitializer ConstantVMatrix::_static_initializer_ & PLearn::ConstantVMatrix::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 52 of file ConstantVMatrix.cc.
void PLearn::ConstantVMatrix::build | ( | ) | [virtual] |
Simply calls inherited::build() then build_()
Reimplemented from PLearn::VMatrix.
Definition at line 78 of file ConstantVMatrix.cc.
References PLearn::VMatrix::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::ConstantVMatrix::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::VMatrix.
Definition at line 87 of file ConstantVMatrix.cc.
References PLearn::VMatrix::computeMissingSizeValue().
Referenced by build().
{ computeMissingSizeValue(false); }
string PLearn::ConstantVMatrix::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 52 of file ConstantVMatrix.cc.
void PLearn::ConstantVMatrix::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::VMatrix.
Definition at line 65 of file ConstantVMatrix.cc.
References PLearn::OptionBase::buildoption, constant_output, PLearn::declareOption(), and PLearn::VMatrix::declareOptions().
{ declareOption(ol, "constant_output", &ConstantVMatrix::constant_output, OptionBase::buildoption, "The constant output to return"); // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::ConstantVMatrix::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::VMatrix.
Definition at line 96 of file ConstantVMatrix.h.
ConstantVMatrix * PLearn::ConstantVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::VMatrix.
Definition at line 52 of file ConstantVMatrix.cc.
Get element at i-th row, j-th column.
Implements PLearn::VMatrix.
Definition at line 95 of file ConstantVMatrix.cc.
References constant_output.
{ return constant_output; }
OptionList & PLearn::ConstantVMatrix::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 52 of file ConstantVMatrix.cc.
OptionMap & PLearn::ConstantVMatrix::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 52 of file ConstantVMatrix.cc.
RemoteMethodMap & PLearn::ConstantVMatrix::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 52 of file ConstantVMatrix.cc.
Get part or all of the i-th, starting at the j-th column, with v.length() elements; these elements are put in v.
Reimplemented from PLearn::VMatrix.
Definition at line 103 of file ConstantVMatrix.cc.
References constant_output, and PLearn::TVec< T >::fill().
{ v.fill(constant_output); }
void PLearn::ConstantVMatrix::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::VMatrix.
Definition at line 111 of file ConstantVMatrix.cc.
References PLearn::VMatrix::makeDeepCopyFromShallowCopy().
{ inherited::makeDeepCopyFromShallowCopy(copies); }
Reimplemented from PLearn::VMatrix.
Definition at line 96 of file ConstantVMatrix.h.
The constant output to return.
Definition at line 63 of file ConstantVMatrix.h.
Referenced by declareOptions(), get(), and getSubRow().