|
PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <RowBufferedVMatrixTest.h>


Public Member Functions | |
| RowBufferedVMatrixTest () | |
| Default constructor. | |
| virtual string | classname () const |
| virtual OptionList & | getOptionList () const |
| virtual OptionMap & | getOptionMap () const |
| virtual RemoteMethodMap & | getRemoteMethodMap () const |
| virtual RowBufferedVMatrixTest * | deepCopy (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 PPath & | declaringFile () |
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. | |
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
Definition at line 61 of file RowBufferedVMatrixTest.h.
typedef PTest PLearn::RowBufferedVMatrixTest::inherited [private] |
Reimplemented from PLearn::PTest.
Definition at line 63 of file RowBufferedVMatrixTest.h.
| PLearn::RowBufferedVMatrixTest::RowBufferedVMatrixTest | ( | ) |
| 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.
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.
{
inherited::build();
build_();
}
| 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);
}

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

Reimplemented from PLearn::PTest.
Definition at line 84 of file RowBufferedVMatrixTest.h.
Definition at line 68 of file RowBufferedVMatrixTest.h.
Referenced by declareOptions().
1.7.4