#include <BinaryVariable.h>
Inheritance diagram for PLearn::BinaryVariable:
Public Member Functions | |
BinaryVariable () | |
BinaryVariable (Variable *v1, Variable *v2, int thelength, int thewidth) | |
BinaryVariable *. | |
PLEARN_DECLARE_ABSTRACT_OBJECT (BinaryVariable) | |
virtual void | setParents (const VarArray &parents) |
set this Variable's parents. To use with default constructor. | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
virtual bool | markPath () |
virtual void | buildPath (VarArray &proppath) |
Finally buildPath is to be called from the output Variable of interest (this will build the proppath at the same time as erasing the marks). | |
virtual VarArray | sources () |
if not marked, find all constant sources that influence this Variable. | |
virtual VarArray | random_sources () |
return ancestors which compute a non-deterministic function of their parents | |
virtual VarArray | ancestors () |
if not marked, find all Variables that influence this Variable. | |
virtual void | unmarkAncestors () |
undo any marking done by a call to sources() or ancestors() | |
virtual VarArray | parents () |
returns all the direct parents of this Var that are not marked (the call doesn't change any mark) | |
void | printInfo (bool print_gradient) |
virtual void | resizeRValue () |
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) | |
Protected Attributes | |
Var | input1 |
Var | input2 |
Private Types | |
typedef Variable | inherited |
|
|
Definition at line 62 of file BinaryVariable.h. |
|
Definition at line 51 of file BinaryVariable.cc. |
|
if not marked, find all Variables that influence this Variable.
Implements PLearn::Variable. Definition at line 143 of file BinaryVariable.cc. |
|
Finally buildPath is to be called from the output Variable of interest (this will build the proppath at the same time as erasing the marks).
Implements PLearn::Variable. Definition at line 112 of file BinaryVariable.cc. References PLearn::Variable::clearMark(), input1, and input2. |
|
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::Variable. Reimplemented in PLearn::ElementAtPositionVariable, PLearn::IndexAtPositionVariable, PLearn::MarginPerceptronCostVariable, PLearn::MatrixOneHotSquaredLoss, PLearn::OneHotSquaredLoss, and PLearn::RowAtPositionVariable. Definition at line 61 of file BinaryVariable.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Reimplemented from PLearn::Variable. Definition at line 94 of file BinaryVariable.cc. References input1, input2, and PLearn::varDeepCopyField(). Referenced by PLearn::DiagonalNormalSampleVariable::deepCopy(). |
|
sets the marked flag of all the sVariable that are to be in the fprop path. The input sVariable that are of interest are to be marked first. Then markPath is to be called from the output Variable of interest Implements PLearn::Variable. Definition at line 104 of file BinaryVariable.cc. |
|
returns all the direct parents of this Var that are not marked (the call doesn't change any mark)
Implements PLearn::Variable. Definition at line 163 of file BinaryVariable.cc. References PLearn::TVec< Var >::append(), input1, and input2. |
|
|
|
Implements PLearn::Variable. Definition at line 77 of file BinaryVariable.h. References PLearn::endl(), PLearn::Variable::getName(), input1, and input2. |
|
return ancestors which compute a non-deterministic function of their parents
Implements PLearn::Variable. Reimplemented in PLearn::BinarySampleVariable. Definition at line 134 of file BinaryVariable.cc. |
|
|
set this Variable's parents. To use with default constructor.
Reimplemented from PLearn::Variable. Definition at line 72 of file BinaryVariable.cc. References input1, input2, PLearn::TVec< Var >::length(), and PLERROR. |
|
if not marked, find all constant sources that influence this Variable. A constant source is normally a SourceVariable. Implements PLearn::Variable. Definition at line 125 of file BinaryVariable.cc. |
|
undo any marking done by a call to sources() or ancestors()
Implements PLearn::Variable. Definition at line 152 of file BinaryVariable.cc. |
|
Definition at line 58 of file BinaryVariable.h. Referenced by ancestors(), BinaryVariable(), buildPath(), makeDeepCopyFromShallowCopy(), markPath(), parents(), printInfo(), random_sources(), resizeRValue(), setParents(), sources(), and unmarkAncestors(). |
|
Definition at line 59 of file BinaryVariable.h. Referenced by ancestors(), BinaryVariable(), buildPath(), makeDeepCopyFromShallowCopy(), markPath(), parents(), printInfo(), random_sources(), resizeRValue(), setParents(), sources(), and unmarkAncestors(). |