#include <NaryVariable.h>
Inheritance diagram for PLearn::NaryVariable:
Public Types | |
typedef Variable | inherited |
Public Member Functions | |
NaryVariable (const VarArray &the_varray, int thelength, int thewidth=1) | |
PLEARN_DECLARE_ABSTRACT_OBJECT (NaryVariable) | |
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 () |
Public Attributes | |
VarArray | varray |
Protected Member Functions | |
NaryVariable () | |
Default constructor for persistence. | |
Static Protected 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) |
|
|
Default constructor for persistence.
Definition at line 65 of file NaryVariable.h. |
|
Definition at line 52 of file NaryVariable.cc. |
|
if not marked, find all Variables that influence this Variable.
Implements PLearn::Variable. Definition at line 136 of file NaryVariable.cc. References PLearn::VarArray::ancestors(), PLearn::TVec< Var >::isNull(), PLearn::TVec< Var >::size(), and varray. |
|
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 93 of file NaryVariable.cc. References PLearn::VarArray::buildPath(), PLearn::Variable::clearMark(), PLearn::TVec< Var >::isNull(), PLearn::TVec< Var >::size(), and varray. |
|
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::ConcatOfVariable, PLearn::MatrixElementsVariable, PLearn::MatrixSumOfVariable, PLearn::SemiSupervisedProbClassCostVariable, PLearn::SoftSlopeIntegralVariable, PLearn::SoftSlopeVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::UnfoldedFuncVariable, and PLearn::UnfoldedSumOfVariable. Definition at line 57 of file NaryVariable.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Reimplemented from PLearn::Variable. Reimplemented in PLearn::ArgminOfVariable, PLearn::ConcatOfVariable, PLearn::MatrixElementsVariable, PLearn::MatrixSumOfVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::UnfoldedFuncVariable, and PLearn::UnfoldedSumOfVariable. Definition at line 66 of file NaryVariable.cc. References PLearn::deepCopyField(), and varray. |
|
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 81 of file NaryVariable.cc. References PLearn::TVec< Var >::isNull(), PLearn::VarArray::markPath(), PLearn::TVec< Var >::size(), and varray. |
|
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 162 of file NaryVariable.cc. References PLearn::TVec< Var >::append(), PLearn::TVec< Var >::isNull(), PLearn::TVec< Var >::size(), and varray. |
|
|
|
Implements PLearn::Variable. Reimplemented in PLearn::MatrixSumOfVariable, PLearn::SumOfVariable, PLearn::SumOverBagsVariable, PLearn::UnfoldedFuncVariable, and PLearn::UnfoldedSumOfVariable. Definition at line 89 of file NaryVariable.h. References PLearn::Object::classname(), PLearn::endl(), PLearn::Variable::getName(), PLearn::TVec< Var >::size(), and varray. |
|
return ancestors which compute a non-deterministic function of their parents
Implements PLearn::Variable. Definition at line 122 of file NaryVariable.cc. References PLearn::TVec< Var >::isNull(), PLearn::TVec< Var >::size(), and varray. |
|
Reimplemented from PLearn::Variable. Definition at line 172 of file NaryVariable.cc. References PLearn::VarArray::resizeRValue(), PLearn::TVec< Var >::size(), and varray. Referenced by PLearn::SumOfVariable::rfprop(), PLearn::IfThenElseVariable::rfprop(), and PLearn::ConcatRowsVariable::rfprop(). |
|
if not marked, find all constant sources that influence this Variable. A constant source is normally a SourceVariable. Implements PLearn::Variable. Definition at line 106 of file NaryVariable.cc. References PLearn::TVec< Var >::isNull(), PLearn::TVec< Var >::size(), PLearn::VarArray::sources(), and varray. |
|
undo any marking done by a call to sources() or ancestors()
Implements PLearn::Variable. Definition at line 150 of file NaryVariable.cc. References PLearn::TVec< Var >::isNull(), PLearn::TVec< Var >::size(), PLearn::VarArray::unmarkAncestors(), and varray. |
|
Definition at line 69 of file NaryVariable.h. Referenced by ancestors(), buildPath(), makeDeepCopyFromShallowCopy(), markPath(), parents(), printInfo(), random_sources(), resizeRValue(), sources(), and unmarkAncestors(). |