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

This VMatrix returns a constant element (specified upon construction) More...

#include <ConstantVMatrix.h>

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

List of all members.

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

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.

Detailed Description

This VMatrix returns a constant element (specified upon construction)

Definition at line 55 of file ConstantVMatrix.h.


Member Typedef Documentation

Reimplemented from PLearn::VMatrix.

Definition at line 57 of file ConstantVMatrix.h.


Constructor & Destructor Documentation

PLearn::ConstantVMatrix::ConstantVMatrix ( )

Default constructor (default return value is missing value)

Definition at line 54 of file ConstantVMatrix.cc.

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)
{ }

Member Function Documentation

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.

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

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

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

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.

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

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.

void PLearn::ConstantVMatrix::getSubRow ( int  i,
int  j,
Vec  v 
) const [virtual]

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

Here is the call graph for this function:

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

Here is the call graph for this function:


Member Data Documentation

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


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