PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <VMatViewCommand.h>
Public Member Functions | |
VMatViewCommand () | |
virtual void | run (const std::vector< std::string > &args) |
The actual implementation of the 'VMatViewCommand' command. | |
Static Protected Attributes | |
static PLearnCommandRegistry | reg_ |
This allows to register the 'VMatViewCommand' command in the command registry. | |
Private Types | |
typedef PLearnCommand | inherited |
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 58 of file VMatViewCommand.h.
typedef PLearnCommand PLearn::VMatViewCommand::inherited [private] |
Definition at line 60 of file VMatViewCommand.h.
PLearn::VMatViewCommand::VMatViewCommand | ( | ) |
Definition at line 51 of file VMatViewCommand.cc.
: PLearnCommand( "vmat_view", "interactive display of a vmatrix (curses-based)", "vmat view [--add,--sub,--diff,--mult,--div] <vmat> ...\n" "will interactively display contents of the \n" "specified vmatrix (any recognized file format)\n" ) {}
void PLearn::VMatViewCommand::run | ( | const std::vector< std::string > & | args | ) | [virtual] |
The actual implementation of the 'VMatViewCommand' command.
Implements PLearn::PLearnCommand.
Definition at line 62 of file VMatViewCommand.cc.
References PLearn::endl(), PLearn::getDataSet(), i, PLERROR, PLearn::pout, PLearn::viewVMat(), and PLearn::vmat_view_dataset.
{ string op; if(args[0]=="--add") op="add"; else if(args[0]=="--sub" || args[0]=="--diff") op="sub"; else if(args[0]=="--mult") op="mult"; else if(args[0]=="--div") op="div"; if(!op.empty()){ if(args.size()!=3) PLERROR("Usage: vmat_view [--add,--sub,--diff,--mult,--div] <source1> ... \n" "If an option is used their must be two sources matrix."); VMat vm = new BinaryOpVMatrix(getDataSet(args[1]),getDataSet(args[2]),op); viewVMat(vm, op); return; } for(uint i=0;i<args.size();i++){ PPath vmat_view_dataset(args[i]); if(args.size()>1) pout<<vmat_view_dataset<<endl; VMat vm = getDataSet(vmat_view_dataset); viewVMat(vm, vmat_view_dataset); } }
PLearnCommandRegistry PLearn::VMatViewCommand::reg_ [static, protected] |
This allows to register the 'VMatViewCommand' command in the command registry.
Definition at line 67 of file VMatViewCommand.h.