PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Types | Private Member Functions
PLearn::RangeVMatrix Class Reference

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>

Inheritance diagram for PLearn::RangeVMatrix:
Inheritance graph
[legend]
Collaboration diagram for PLearn::RangeVMatrix:
Collaboration graph
[legend]

List of all members.

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 OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual RangeVMatrixdeepCopy (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 PPathdeclaringFile ()
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.

Detailed Description

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.


Member Typedef Documentation

Reimplemented from PLearn::VMatrix.

Definition at line 56 of file RangeVMatrix.h.


Constructor & Destructor Documentation

PLearn::RangeVMatrix::RangeVMatrix ( )

default constructor (for automatic deserialization)

Definition at line 50 of file RangeVMatrix.cc.

    : start(0), end(0), step(1)
{
}
PLearn::RangeVMatrix::RangeVMatrix ( real  the_start,
real  the_end,
real  the_step = 1.0 
)

Definition at line 55 of file RangeVMatrix.cc.

References build().

    : start(the_start), end(the_end), step(the_step)
{
    build();
}

Here is the call graph for this function:


Member Function Documentation

string PLearn::RangeVMatrix::_classname_ ( ) [static]

Range VMatrix.

Reimplemented from PLearn::VMatrix.

Definition at line 48 of file RangeVMatrix.cc.

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.

bool PLearn::RangeVMatrix::_isa_ ( const Object o) [static]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

{
    width_=1;
    length_ = (int)((end-start)/step);
    if (length_*step==(end-start))
        length_++;
}

Here is the caller graph for this function:

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.

Here is the call graph for this function:

static const PPath& PLearn::RangeVMatrix::declaringFile ( ) [inline, static]

Reimplemented from PLearn::VMatrix.

Definition at line 71 of file RangeVMatrix.h.

:
    void build_();
RangeVMatrix * PLearn::RangeVMatrix::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::VMatrix.

Definition at line 48 of file RangeVMatrix.cc.

real PLearn::RangeVMatrix::get ( int  i,
int  j 
) const [virtual]

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;
}

Here is the call graph for this function:

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.


Member Data Documentation

Reimplemented from PLearn::VMatrix.

Definition at line 71 of file RangeVMatrix.h.

Definition at line 60 of file RangeVMatrix.h.

Referenced by build_(), and declareOptions().

Definition at line 59 of file RangeVMatrix.h.

Referenced by build_(), declareOptions(), and get().

Definition at line 61 of file RangeVMatrix.h.

Referenced by build_(), declareOptions(), and get().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines