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::AutoVMatrix Class Reference

This class is a simple wrapper to an underlying VMatrix of another type All it does is forward the method calls. More...

#include <AutoVMatrix.h>

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

List of all members.

Public Member Functions

virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual AutoVMatrixdeepCopy (CopiesMap &copies) const
 AutoVMatrix (const PPath &the_filename="", bool load_in_memory=false)
virtual void build ()
 Simply calls inherited::build() then build_().
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.

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

PPath filename
 the filename where the data is (typically a file or directory path)
bool load_data_in_memory
 convert VMat in a MemoryVMatrix (default=false);

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares this class' options.

Private Types

typedef ForwardVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

This class is a simple wrapper to an underlying VMatrix of another type All it does is forward the method calls.

Definition at line 55 of file AutoVMatrix.h.


Member Typedef Documentation

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 60 of file AutoVMatrix.h.


Constructor & Destructor Documentation

PLearn::AutoVMatrix::AutoVMatrix ( const PPath the_filename = "",
bool  load_in_memory = false 
)

Definition at line 63 of file AutoVMatrix.cc.

References build_().

    :filename(the_filename), load_data_in_memory(load_in_memory)
{ build_(); }

Here is the call graph for this function:


Member Function Documentation

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

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

OptionList & PLearn::AutoVMatrix::_getOptionList_ ( ) [static]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

RemoteMethodMap & PLearn::AutoVMatrix::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

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

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

Object * PLearn::AutoVMatrix::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

StaticInitializer AutoVMatrix::_static_initializer_ & PLearn::AutoVMatrix::_static_initialize_ ( ) [static]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

void PLearn::AutoVMatrix::build ( ) [virtual]

Simply calls inherited::build() then build_().

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 104 of file AutoVMatrix.cc.

References PLearn::ForwardVMatrix::build(), and build_().

Referenced by PLearn::DynamicallyLinkedRBMsModel::generate().

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::AutoVMatrix::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 90 of file AutoVMatrix.cc.

References filename, PLearn::getDataSet(), PLearn::PPath::isEmpty(), load_data_in_memory, PLearn::ForwardVMatrix::setVMat(), and PLearn::VMatrix::VMat.

Referenced by AutoVMatrix(), and build().

{
    if(filename.isEmpty())
        setVMat(VMat());
    else if (load_data_in_memory)
    {
        VMat data = getDataSet(filename);
        VMat memdata = new MemoryVMatrix(data);
        setVMat(memdata);
    }
    else
        setVMat(getDataSet(filename));
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::AutoVMatrix::classname ( ) const [virtual]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

void PLearn::AutoVMatrix::declareOptions ( OptionList ol) [static, protected]

Declares this class' options.

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 67 of file AutoVMatrix.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::ForwardVMatrix::declareOptions(), filename, PLearn::getDataSetHelp(), PLearn::OptionBase::learntoption, load_data_in_memory, PLearn::OptionBase::nosave, PLearn::redeclareOption(), and PLearn::ForwardVMatrix::vm.

{
    declareOption(ol, "specification", &AutoVMatrix::filename,
                  (OptionBase::learntoption | OptionBase::nosave),
                  "DEPRECATED - Use 'filename' instead.");

    declareOption(ol, "filename", &AutoVMatrix::filename,
                  OptionBase::buildoption,
                  "This is a file or directory path understood by getDataSet.\n"
                  + getDataSetHelp());

    declareOption(ol, "load_in_memory", &AutoVMatrix::load_data_in_memory,
                  OptionBase::buildoption,
                  "Specify if we want to store data in memory"
                  " (in a MemoryVMatrix).\n"
                  "Default=false.\n");
    // Now call the parent class' declareOptions
    inherited::declareOptions(ol);

    // Hide the 'vm' option, that is overwritten at build time anyway.
    redeclareOption(ol, "vm", &AutoVMatrix::vm, OptionBase::nosave, "");
}

Here is the call graph for this function:

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

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 64 of file AutoVMatrix.h.

:

AutoVMatrix * PLearn::AutoVMatrix::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

OptionList & PLearn::AutoVMatrix::getOptionList ( ) const [virtual]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

OptionMap & PLearn::AutoVMatrix::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

RemoteMethodMap & PLearn::AutoVMatrix::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 61 of file AutoVMatrix.cc.

void PLearn::AutoVMatrix::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 113 of file AutoVMatrix.cc.

References PLearn::ForwardVMatrix::makeDeepCopyFromShallowCopy().

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::ForwardVMatrix.

Reimplemented in PLearn::AutoVMatrixSaveSource.

Definition at line 64 of file AutoVMatrix.h.

the filename where the data is (typically a file or directory path)

Definition at line 64 of file AutoVMatrix.h.

Referenced by build_(), declareOptions(), and PLearn::DynamicallyLinkedRBMsModel::generate().

convert VMat in a MemoryVMatrix (default=false);

Definition at line 74 of file AutoVMatrix.h.

Referenced by build_(), and declareOptions().


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