PLearn 0.1
|
#include <VMatLanguage.h>
Public Member Functions | |
PreprocessingVMatrix () | |
PreprocessingVMatrix (VMat the_source, const string &program_string) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual PreprocessingVMatrix * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Simply calls inherited::build() then build_(). | |
Static Public Member Functions | |
static string | _classname_ () |
RowBufferedVMatrix. | |
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 () |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Protected Member Functions | |
virtual void | getNewRow (int i, const Vec &v) const |
This is the only method requiring implementation in subclasses. | |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declare this class' options. | |
Protected Attributes | |
VMat | source |
PP< VMatLanguage > | program |
Vec | sourcevec |
vector< string > | fieldnames |
Private Types | |
typedef RowBufferedVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 170 of file VMatLanguage.h.
typedef RowBufferedVMatrix PLearn::PreprocessingVMatrix::inherited [private] |
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 172 of file VMatLanguage.h.
PLearn::PreprocessingVMatrix::PreprocessingVMatrix | ( | ) | [inline] |
Definition at line 181 of file VMatLanguage.h.
{}
PLearn::PreprocessingVMatrix::PreprocessingVMatrix | ( | VMat | the_source, |
const string & | program_string | ||
) |
Definition at line 1427 of file VMatLanguage.cc.
References build(), fieldnames, and program.
: source(the_source), program(new VMatLanguage(the_source)) { program->compileString(program_string,fieldnames); build(); }
string PLearn::PreprocessingVMatrix::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
OptionList & PLearn::PreprocessingVMatrix::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
RemoteMethodMap & PLearn::PreprocessingVMatrix::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
Object * PLearn::PreprocessingVMatrix::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
StaticInitializer PreprocessingVMatrix::_static_initializer_ & PLearn::PreprocessingVMatrix::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
void PLearn::PreprocessingVMatrix::build | ( | ) | [virtual] |
Simply calls inherited::build() then build_().
Reimplemented from PLearn::VMatrix.
Definition at line 1435 of file VMatLanguage.cc.
References PLearn::VMatrix::build(), and build_().
Referenced by PreprocessingVMatrix().
{ inherited::build(); build_(); }
void PLearn::PreprocessingVMatrix::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::VMatrix.
Definition at line 1442 of file VMatLanguage.cc.
References PLearn::VMatrix::fieldinfos, fieldnames, j, PLearn::VMat::length(), PLearn::VMatrix::length_, PLearn::TVec< T >::resize(), source, sourcevec, PLearn::VMat::width(), and PLearn::VMatrix::width_.
Referenced by build().
{ if (source) { fieldinfos.resize((int)fieldnames.size()); for(unsigned int j=0; j<fieldnames.size(); j++) fieldinfos[j] = VMField(fieldnames[j]); sourcevec.resize(source->width()); width_ = (int)fieldnames.size(); length_ = source.length(); } }
string PLearn::PreprocessingVMatrix::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
void PLearn::PreprocessingVMatrix::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declare this class' options.
Reimplemented from PLearn::VMatrix.
Definition at line 1456 of file VMatLanguage.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::VMatrix::declareOptions(), fieldnames, program, and source.
{ inherited::declareOptions(ol); declareOption(ol, "source", &PreprocessingVMatrix::source, OptionBase::buildoption, ""); declareOption(ol, "program", &PreprocessingVMatrix::program, OptionBase::buildoption, ""); declareOption(ol, "fieldnames", &PreprocessingVMatrix::fieldnames, OptionBase::buildoption, ""); }
static const PPath& PLearn::PreprocessingVMatrix::declaringFile | ( | ) | [inline, static] |
PreprocessingVMatrix * PLearn::PreprocessingVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
This is the only method requiring implementation in subclasses.
Implements PLearn::RowBufferedVMatrix.
Definition at line 1419 of file VMatLanguage.cc.
{ program->run(i,v); }
OptionList & PLearn::PreprocessingVMatrix::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
OptionMap & PLearn::PreprocessingVMatrix::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
RemoteMethodMap & PLearn::PreprocessingVMatrix::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 1424 of file VMatLanguage.cc.
: use ProcessingVMatrix instead", "NO HELP");
Reimplemented from PLearn::RowBufferedVMatrix.
Definition at line 184 of file VMatLanguage.h.
vector<string> PLearn::PreprocessingVMatrix::fieldnames [protected] |
Definition at line 178 of file VMatLanguage.h.
Referenced by build_(), declareOptions(), and PreprocessingVMatrix().
PP<VMatLanguage> PLearn::PreprocessingVMatrix::program [protected] |
Definition at line 176 of file VMatLanguage.h.
Referenced by declareOptions(), and PreprocessingVMatrix().
VMat PLearn::PreprocessingVMatrix::source [protected] |
Definition at line 175 of file VMatLanguage.h.
Referenced by build_(), and declareOptions().
Vec PLearn::PreprocessingVMatrix::sourcevec [protected] |
Definition at line 177 of file VMatLanguage.h.
Referenced by build_().