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

The first sentence should be a BRIEF DESCRIPTION of what the class does. More...

#include <RowBufferedVMatrixTest.h>

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

List of all members.

Public Member Functions

 RowBufferedVMatrixTest ()
 Default constructor.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual RowBufferedVMatrixTestdeepCopy (CopiesMap &copies) const
virtual void build ()
 Post-constructor.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.
virtual void perform ()
 The method performing the test.

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 matrix_filename

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

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

Private Types

typedef PTest inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

The first sentence should be a BRIEF DESCRIPTION of what the class does.

Place the rest of the class programmer documentation here. Doxygen supports Javadoc-style comments. See http://www.doxygen.org/manual.html

Todo:
Write class to-do's here if there are any.
Deprecated:
Write deprecated stuff here if there is any. Indicate what else should be used instead.

Definition at line 61 of file RowBufferedVMatrixTest.h.


Member Typedef Documentation

Reimplemented from PLearn::PTest.

Definition at line 63 of file RowBufferedVMatrixTest.h.


Constructor & Destructor Documentation

PLearn::RowBufferedVMatrixTest::RowBufferedVMatrixTest ( )

Default constructor.

Definition at line 61 of file RowBufferedVMatrixTest.cc.

{
}

Member Function Documentation

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Post-constructor.

The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::PTest.

Definition at line 68 of file RowBufferedVMatrixTest.cc.

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

This does the actual building.

Reimplemented from PLearn::PTest.

Definition at line 107 of file RowBufferedVMatrixTest.cc.

{
    // ### This method should do the real building of the object,
    // ### according to set 'options', in *any* situation.
    // ### Typical situations include:
    // ###  - Initial building of an object from a few user-specified options
    // ###  - Building of a "reloaded" object: i.e. from the complete set of all serialised options.
    // ###  - Updating or "re-building" of an object after a few "tuning" options have been modified.
    // ### You should assume that the parent class' build_() has already been called.
}
string PLearn::RowBufferedVMatrixTest::classname ( ) const [virtual]

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Declares the class options.

Reimplemented from PLearn::PTest.

Definition at line 94 of file RowBufferedVMatrixTest.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), and matrix_filename.

{
    declareOption(ol, "matrix_filename",
        &RowBufferedVMatrixTest::matrix_filename, OptionBase::buildoption,
        "Name of the temporary file VMatrix generated by this test.");

    // Now call the parent class' declareOptions
    inherited::declareOptions(ol);
}

Here is the call graph for this function:

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

Reimplemented from PLearn::PTest.

Definition at line 84 of file RowBufferedVMatrixTest.h.

:
    //#####  Protected Options  ###############################################
RowBufferedVMatrixTest * PLearn::RowBufferedVMatrixTest::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Reimplemented from PLearn::PTest.

Definition at line 56 of file RowBufferedVMatrixTest.cc.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::PTest.

Definition at line 77 of file RowBufferedVMatrixTest.cc.

References PLERROR.

{
    inherited::makeDeepCopyFromShallowCopy(copies);

    // ### Call deepCopyField on all "pointer-like" fields
    // ### that you wish to be deepCopied rather than
    // ### shallow-copied.
    // ### ex:
    // deepCopyField(trainvec, copies);

    // ### Remove this line when you have fully implemented this method.
    PLERROR("RowBufferedVMatrixTest::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!");
}
void PLearn::RowBufferedVMatrixTest::perform ( ) [virtual]

The method performing the test.

A typical test consists in some output (to pout and / or perr), and updates of this object's options.

Reimplemented from PLearn::PTest.

Definition at line 121 of file RowBufferedVMatrixTest.cc.

References PLearn::endl(), PLERROR, and PLearn::pout.

{
    if (matrix_filename.isEmpty())
        PLERROR("In RowBufferedVMatrixTest::perform - You must provide the "
                "'matrix_filename' PPath option");

    const int row_size = 3;
    double first_insert_data[] = { 20010101, -1, 42 };
    double second_insert_data[] = { 20000813, 37, 49 };

    VMat mat = new TemporaryFileVMatrix(matrix_filename, 0, row_size);
    mat->insertRow(0, Vec(row_size, first_insert_data));
    mat->insertRow(0, Vec(row_size, second_insert_data));

    if (mat->get(0, 0) != 20000813)
        pout << "Test failed!" << endl;
    else
        pout << "Test succeeded!" << endl;
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::PTest.

Definition at line 84 of file RowBufferedVMatrixTest.h.

Definition at line 68 of file RowBufferedVMatrixTest.h.

Referenced by declareOptions().


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