PLearn 0.1
|
The argument must be a square matrix Var and the result is its determinant. More...
#include <DeterminantVariable.h>
Public Member Functions | |
DeterminantVariable () | |
Default constructor for persistence. | |
DeterminantVariable (Var m) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual DeterminantVariable * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
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 () |
Nothing to do by default. | |
virtual void | bprop () |
Nothing to do by default. | |
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_ () |
DeterminantVariable. | |
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 | |
void | build_ () |
Object-specific post-constructor. | |
Private Types | |
typedef UnaryVariable | inherited |
The argument must be a square matrix Var and the result is its determinant.
Definition at line 54 of file DeterminantVariable.h.
typedef UnaryVariable PLearn::DeterminantVariable::inherited [private] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 56 of file DeterminantVariable.h.
PLearn::DeterminantVariable::DeterminantVariable | ( | ) | [inline] |
PLearn::DeterminantVariable::DeterminantVariable | ( | Var | m | ) |
string PLearn::DeterminantVariable::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
OptionList & PLearn::DeterminantVariable::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
RemoteMethodMap & PLearn::DeterminantVariable::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
Object * PLearn::DeterminantVariable::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
StaticInitializer DeterminantVariable::_static_initializer_ & PLearn::DeterminantVariable::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
void PLearn::DeterminantVariable::bprop | ( | ) | [virtual] |
Nothing to do by default.
Reimplemented from PLearn::UnaryVariable.
Definition at line 86 of file DeterminantVariable.cc.
References PLERROR.
{ PLERROR("DeterminantVariable::bprop not implemented yet"); }
void PLearn::DeterminantVariable::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::UnaryVariable.
Definition at line 61 of file DeterminantVariable.cc.
References PLearn::UnaryVariable::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::DeterminantVariable::build_ | ( | ) | [protected] |
Object-specific post-constructor.
This method should be redefined in subclasses and do the actual building of the object according to previously set option fields. Constructors can just set option fields, and then call build_. This method is NOT virtual, and will typically be called only from three places: a constructor, the public virtual build()
method, and possibly the public virtual read method (which calls its parent's read). build_()
can assume that its parent's build_()
has already been called.
Reimplemented from PLearn::UnaryVariable.
Definition at line 68 of file DeterminantVariable.cc.
References PLearn::UnaryVariable::input, PLearn::Var::length(), PLERROR, and PLearn::Var::width().
Referenced by build(), and DeterminantVariable().
{ if (input && (input->width() != input->length())) PLERROR("Max2Variable: parent(%d,%d) must be a square matrix", input->length() != input->width()); }
string PLearn::DeterminantVariable::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
static const PPath& PLearn::DeterminantVariable::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 63 of file DeterminantVariable.h.
: void build_();
DeterminantVariable * PLearn::DeterminantVariable::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
void PLearn::DeterminantVariable::fprop | ( | ) | [virtual] |
Nothing to do by default.
Reimplemented from PLearn::UnaryVariable.
Definition at line 80 of file DeterminantVariable.cc.
References PLearn::det(), PLearn::UnaryVariable::input, and PLearn::Variable::valuedata.
OptionList & PLearn::DeterminantVariable::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
OptionMap & PLearn::DeterminantVariable::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.cc.
RemoteMethodMap & PLearn::DeterminantVariable::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 52 of file DeterminantVariable.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 76 of file DeterminantVariable.cc.
{ l=1; w=1; }
void PLearn::DeterminantVariable::symbolicBprop | ( | ) | [virtual] |
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented from PLearn::Variable.
Definition at line 92 of file DeterminantVariable.cc.
References PLERROR.
{ PLERROR("DeterminantVariable::symbolicBprop not implemented yet"); }
Reimplemented from PLearn::UnaryVariable.
Definition at line 63 of file DeterminantVariable.h.