#include <PlusConstantVariable.h>
Inheritance diagram for PLearn::PlusConstantVariable:
Public Member Functions | |
PlusConstantVariable () | |
Default constructor for persistence. | |
PlusConstantVariable (Variable *input, real c) | |
PLEARN_DECLARE_OBJECT (PlusConstantVariable) | |
virtual string | info () const |
returns a bit more informative string about object (default returns classname()) | |
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 | |
virtual void | rfprop () |
Static Public Member Functions | |
void | declareOptions (OptionList &ol) |
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) | |
Public Attributes | |
real | cst |
The constant. | |
Private Types | |
typedef UnaryVariable | inherited |
* Plus... *
Definition at line 57 of file PlusConstantVariable.h.
|
Reimplemented from PLearn::UnaryVariable. Definition at line 59 of file PlusConstantVariable.h. Referenced by PlusConstantVariable(). |
|
Default constructor for persistence.
Definition at line 67 of file PlusConstantVariable.h. References cst. |
|
Definition at line 55 of file PlusConstantVariable.cc. References inherited. |
|
Implements PLearn::Variable. Definition at line 83 of file PlusConstantVariable.cc. References k, and PLearn::Variable::nelems(). |
|
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); } Reimplemented from PLearn::UnaryVariable. Definition at line 61 of file PlusConstantVariable.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
compute output given input
Implements PLearn::Variable. Definition at line 76 of file PlusConstantVariable.cc. References cst, k, and PLearn::Variable::nelems(). |
|
returns a bit more informative string about object (default returns classname())
Reimplemented from PLearn::Object. Definition at line 73 of file PlusConstantVariable.h. References cst, and PLearn::tostring(). |
|
|
|
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 67 of file PlusConstantVariable.cc. References PLearn::Var::length(), and PLearn::Var::width(). |
|
Reimplemented from PLearn::Variable. Definition at line 97 of file PlusConstantVariable.cc. References k, PLearn::TVec< T >::length(), PLearn::Variable::nelems(), and PLearn::UnaryVariable::resizeRValue(). |
|
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented from PLearn::Variable. Definition at line 90 of file PlusConstantVariable.cc. |
|
The constant.
Definition at line 63 of file PlusConstantVariable.h. Referenced by fprop(), info(), and PlusConstantVariable(). |