PLearn 0.1
|
#include <VarColumnsVariable.h>
Public Member Functions | |
VarColumnsVariable () | |
Default constructor for persistence. | |
VarColumnsVariable (Variable *input1, Variable *input2) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual VarColumnsVariable * | deepCopy (CopiesMap &copies) const |
virtual void | recomputeSize (int &l, int &w) const |
Recomputes the length l and width w that this variable should have, according to its parent variables. | |
virtual void | fprop () |
compute output given input | |
virtual void | bprop () |
virtual void | symbolicBprop () |
compute a piece of new Var graph that represents the symbolic derivative of this Var | |
Static Public Member Functions | |
static string | _classname_ () |
VarColumnsVariable. | |
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_ |
Private Types | |
typedef BinaryVariable | inherited |
Variable that is a subset of a matrix's columns input1 : matrix from which columns are selected input2 : vector whose elements are row indices in input1
Definition at line 56 of file VarColumnsVariable.h.
typedef BinaryVariable PLearn::VarColumnsVariable::inherited [private] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 58 of file VarColumnsVariable.h.
PLearn::VarColumnsVariable::VarColumnsVariable | ( | ) | [inline] |
string PLearn::VarColumnsVariable::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file VarColumnsVariable.cc.
OptionList & PLearn::VarColumnsVariable::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file VarColumnsVariable.cc.
RemoteMethodMap & PLearn::VarColumnsVariable::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file VarColumnsVariable.cc.
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file VarColumnsVariable.cc.
Object * PLearn::VarColumnsVariable::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 51 of file VarColumnsVariable.cc.
StaticInitializer VarColumnsVariable::_static_initializer_ & PLearn::VarColumnsVariable::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file VarColumnsVariable.cc.
void PLearn::VarColumnsVariable::bprop | ( | ) | [virtual] |
Implements PLearn::Variable.
Definition at line 76 of file VarColumnsVariable.cc.
References PLearn::TMat< T >::column(), PLearn::Var::column(), i, PLearn::BinaryVariable::input1, PLearn::BinaryVariable::input2, PLearn::Var::length(), and PLearn::Variable::matGradient.
{ for (int i = 0; i < input2->length(); ++i) input1->matGradient.column(int(input2->value[i])) += matGradient.column(i); }
string PLearn::VarColumnsVariable::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file VarColumnsVariable.cc.
static const PPath& PLearn::VarColumnsVariable::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 65 of file VarColumnsVariable.h.
VarColumnsVariable * PLearn::VarColumnsVariable::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::BinaryVariable.
Definition at line 51 of file VarColumnsVariable.cc.
void PLearn::VarColumnsVariable::fprop | ( | ) | [virtual] |
compute output given input
Implements PLearn::Variable.
Definition at line 70 of file VarColumnsVariable.cc.
References PLearn::BinaryVariable::input1, PLearn::BinaryVariable::input2, and PLearn::Variable::matValue.
OptionList & PLearn::VarColumnsVariable::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file VarColumnsVariable.cc.
OptionMap & PLearn::VarColumnsVariable::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file VarColumnsVariable.cc.
RemoteMethodMap & PLearn::VarColumnsVariable::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 51 of file VarColumnsVariable.cc.
Recomputes the length l and width w that this variable should have, according to its parent variables.
This is used for ex. by sizeprop() The default version stupidly returns the current dimensions, so make sure to overload it in subclasses if this is not appropriate.
Reimplemented from PLearn::Variable.
Definition at line 60 of file VarColumnsVariable.cc.
References PLearn::BinaryVariable::input1, PLearn::BinaryVariable::input2, and PLearn::Var::length().
void PLearn::VarColumnsVariable::symbolicBprop | ( | ) | [virtual] |
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented from PLearn::Variable.
Definition at line 83 of file VarColumnsVariable.cc.
References PLERROR.
{ PLERROR("VarRowsVariable::symbolicBprop() not implemented"); }
Reimplemented from PLearn::BinaryVariable.
Definition at line 65 of file VarColumnsVariable.h.