PLearn 0.1
|
Outputs scalar samples (length 1) starting at start, up to end (inclusive) with step. When end is reached it starts over again. More...
#include <RangeVMatrix.h>
Public Member Functions | |
RangeVMatrix () | |
default constructor (for automatic deserialization) | |
RangeVMatrix (real the_start, real the_end, real the_step=1.0) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual RangeVMatrix * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Simply calls inherited::build() then build_(). | |
virtual real | get (int i, int j) const |
This method must be implemented in all subclasses. | |
Static Public Member Functions | |
static string | _classname_ () |
Range VMatrix. | |
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 () |
static void | declareOptions (OptionList &ol) |
Declare this class' options. | |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Protected Attributes | |
real | start |
real | end |
real | step |
Private Types | |
typedef VMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Outputs scalar samples (length 1) starting at start, up to end (inclusive) with step. When end is reached it starts over again.
Definition at line 54 of file RangeVMatrix.h.
typedef VMatrix PLearn::RangeVMatrix::inherited [private] |
Reimplemented from PLearn::VMatrix.
Definition at line 56 of file RangeVMatrix.h.
PLearn::RangeVMatrix::RangeVMatrix | ( | ) |
default constructor (for automatic deserialization)
Definition at line 50 of file RangeVMatrix.cc.
string PLearn::RangeVMatrix::_classname_ | ( | ) | [static] |
OptionList & PLearn::RangeVMatrix::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 48 of file RangeVMatrix.cc.
RemoteMethodMap & PLearn::RangeVMatrix::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 48 of file RangeVMatrix.cc.
Reimplemented from PLearn::VMatrix.
Definition at line 48 of file RangeVMatrix.cc.
Object * PLearn::RangeVMatrix::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 48 of file RangeVMatrix.cc.
StaticInitializer RangeVMatrix::_static_initializer_ & PLearn::RangeVMatrix::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::VMatrix.
Definition at line 48 of file RangeVMatrix.cc.
void PLearn::RangeVMatrix::build | ( | ) | [virtual] |
Simply calls inherited::build() then build_().
Reimplemented from PLearn::VMatrix.
Definition at line 62 of file RangeVMatrix.cc.
References PLearn::VMatrix::build(), and build_().
Referenced by RangeVMatrix().
{ inherited::build(); build_(); }
void PLearn::RangeVMatrix::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::VMatrix.
Definition at line 69 of file RangeVMatrix.cc.
References end, PLearn::VMatrix::length_, start, step, and PLearn::VMatrix::width_.
Referenced by build().
string PLearn::RangeVMatrix::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 48 of file RangeVMatrix.cc.
void PLearn::RangeVMatrix::declareOptions | ( | OptionList & | ol | ) | [static] |
Declare this class' options.
Reimplemented from PLearn::VMatrix.
Definition at line 78 of file RangeVMatrix.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::VMatrix::declareOptions(), end, start, and step.
{ declareOption(ol, "start", &RangeVMatrix::start, OptionBase::buildoption, ""); declareOption(ol, "end", &RangeVMatrix::end, OptionBase::buildoption, ""); declareOption(ol, "step", &RangeVMatrix::step, OptionBase::buildoption, ""); inherited::declareOptions(ol); }
static const PPath& PLearn::RangeVMatrix::declaringFile | ( | ) | [inline, static] |
RangeVMatrix * PLearn::RangeVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::VMatrix.
Definition at line 48 of file RangeVMatrix.cc.
This method must be implemented in all subclasses.
Returns element (i,j).
Implements PLearn::VMatrix.
Definition at line 86 of file RangeVMatrix.cc.
References PLearn::VMatrix::length(), PLERROR, start, and step.
{ #ifdef BOUNDCHECK if(j!=0 || i<0 || i>=length()) PLERROR("In RangeVMatrix::get OUT OF BOUNDS"); #endif return start+i*step; }
OptionList & PLearn::RangeVMatrix::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 48 of file RangeVMatrix.cc.
OptionMap & PLearn::RangeVMatrix::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 48 of file RangeVMatrix.cc.
RemoteMethodMap & PLearn::RangeVMatrix::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 48 of file RangeVMatrix.cc.
Reimplemented from PLearn::VMatrix.
Definition at line 71 of file RangeVMatrix.h.
real PLearn::RangeVMatrix::end [protected] |
Definition at line 60 of file RangeVMatrix.h.
Referenced by build_(), and declareOptions().
real PLearn::RangeVMatrix::start [protected] |
Definition at line 59 of file RangeVMatrix.h.
Referenced by build_(), declareOptions(), and get().
real PLearn::RangeVMatrix::step [protected] |
Definition at line 61 of file RangeVMatrix.h.
Referenced by build_(), declareOptions(), and get().