Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::UnaryVariable Class Reference

#include <UnaryVariable.h>

Inheritance diagram for PLearn::UnaryVariable:

Inheritance graph
[legend]
Collaboration diagram for PLearn::UnaryVariable:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Variable inherited

Public Member Functions

 UnaryVariable (Variable *v, int thelength, int thewidth)
 UnaryVariable *.

 PLEARN_DECLARE_ABSTRACT_OBJECT (UnaryVariable)
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 ()

Protected Member Functions

 UnaryVariable ()
 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)


Protected Attributes

Var input

Member Typedef Documentation

typedef Variable PLearn::UnaryVariable::inherited
 

Reimplemented from PLearn::Variable.

Reimplemented in PLearn::AbsVariable, PLearn::AffineTransformWeightPenalty, PLearn::ArgmaxVariable, PLearn::ArgminVariable, PLearn::ColumnSumVariable, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DeterminantVariable, PLearn::DilogarithmVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::EqualConstantVariable, PLearn::ErfVariable, PLearn::ExpVariable, PLearn::ExtendedVariable, PLearn::InterValuesVariable, PLearn::InvertElementsVariable, PLearn::IsAboveThresholdVariable, PLearn::IsMissingVariable, PLearn::LeftPseudoInverseVariable, PLearn::LogSoftmaxVariable, PLearn::LogSumVariable, PLearn::LogVariable, PLearn::MatrixInverseVariable, PLearn::MatrixSoftmaxVariable, PLearn::MatRowVariable, PLearn::MaxVariable, PLearn::MinVariable, PLearn::NegateElementsVariable, PLearn::OneHotVariable, PLearn::PDistributionVariable, PLearn::PLogPVariable, PLearn::PlusConstantVariable, PLearn::PowVariable, PLearn::ReshapeVariable, PLearn::RightPseudoInverseVariable, PLearn::RowSumVariable, PLearn::SigmoidVariable, PLearn::SignVariable, PLearn::SoftmaxVariable, PLearn::SoftplusVariable, PLearn::SquareRootVariable, PLearn::SquareVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::SumAbsVariable, PLearn::SumSquareVariable, PLearn::SumVariable, PLearn::TanhVariable, PLearn::TimesConstantVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnequalConstantVariable, and PLearn::VecElementVariable.

Definition at line 55 of file UnaryVariable.h.


Constructor & Destructor Documentation

PLearn::UnaryVariable::UnaryVariable  )  [inline, protected]
 

Default constructor for persistence.

Definition at line 59 of file UnaryVariable.h.

PLearn::UnaryVariable::UnaryVariable Variable v,
int  thelength,
int  thewidth
 

UnaryVariable *.

Definition at line 51 of file UnaryVariable.cc.


Member Function Documentation

VarArray PLearn::UnaryVariable::ancestors  )  [virtual]
 

if not marked, find all Variables that influence this Variable.

Implements PLearn::Variable.

Definition at line 118 of file UnaryVariable.cc.

References input.

void PLearn::UnaryVariable::buildPath VarArray proppath  )  [virtual]
 

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 88 of file UnaryVariable.cc.

References PLearn::TVec< Var >::append(), PLearn::Variable::clearMark(), and input.

void PLearn::UnaryVariable::declareOptions OptionList ol  )  [static, protected]
 

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::AffineTransformWeightPenalty, PLearn::CutAboveThresholdVariable, PLearn::CutBelowThresholdVariable, PLearn::DuplicateColumnVariable, PLearn::DuplicateRowVariable, PLearn::DuplicateScalarVariable, PLearn::EqualConstantVariable, PLearn::ExtendedVariable, PLearn::IsAboveThresholdVariable, PLearn::IsMissingVariable, PLearn::MatRowVariable, PLearn::OneHotVariable, PLearn::PDistributionVariable, PLearn::PlusConstantVariable, PLearn::PowVariable, PLearn::ReshapeVariable, PLearn::SubMatTransposeVariable, PLearn::SubMatVariable, PLearn::SubsampleVariable, PLearn::UnaryHardSlopeVariable, PLearn::UnequalConstantVariable, and PLearn::VecElementVariable.

Definition at line 58 of file UnaryVariable.cc.

References PLearn::declareOption(), and PLearn::OptionList.

void PLearn::UnaryVariable::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Reimplemented from PLearn::Variable.

Reimplemented in PLearn::LogSumVariable, PLearn::MatRowVariable, PLearn::PDistributionVariable, and PLearn::VecElementVariable.

Definition at line 72 of file UnaryVariable.cc.

References input, and PLearn::varDeepCopyField().

Referenced by PLearn::MultinomialSampleVariable::deepCopy().

bool PLearn::UnaryVariable::markPath  )  [virtual]
 

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 80 of file UnaryVariable.cc.

References input.

VarArray PLearn::UnaryVariable::parents  )  [virtual]
 

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 137 of file UnaryVariable.cc.

References input.

PLearn::UnaryVariable::PLEARN_DECLARE_ABSTRACT_OBJECT UnaryVariable   ) 
 

void PLearn::UnaryVariable::printInfo bool  print_gradient  )  [inline, virtual]
 

Implements PLearn::Variable.

Definition at line 79 of file UnaryVariable.h.

References PLearn::endl(), PLearn::Variable::getName(), and input.

VarArray PLearn::UnaryVariable::random_sources  )  [virtual]
 

return ancestors which compute a non-deterministic function of their parents

Implements PLearn::Variable.

Reimplemented in PLearn::UnarySampleVariable.

Definition at line 109 of file UnaryVariable.cc.

References input.

void PLearn::UnaryVariable::resizeRValue  )  [virtual]
 

Reimplemented from PLearn::Variable.

Definition at line 146 of file UnaryVariable.cc.

References input.

Referenced by PLearn::SquareRootVariable::bprop(), PLearn::TimesConstantVariable::rfprop(), PLearn::TanhVariable::rfprop(), PLearn::SumVariable::rfprop(), PLearn::SubMatVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::SquareVariable::rfprop(), PLearn::SoftmaxVariable::rfprop(), PLearn::SigmoidVariable::rfprop(), PLearn::PlusConstantVariable::rfprop(), PLearn::OneHotVariable::rfprop(), PLearn::NegateElementsVariable::rfprop(), PLearn::LogVariable::rfprop(), PLearn::IsAboveThresholdVariable::rfprop(), PLearn::InvertElementsVariable::rfprop(), PLearn::ExtendedVariable::rfprop(), PLearn::ExpVariable::rfprop(), and PLearn::AbsVariable::rfprop().

VarArray PLearn::UnaryVariable::sources  )  [virtual]
 

if not marked, find all constant sources that influence this Variable.

A constant source is normally a SourceVariable.

Implements PLearn::Variable.

Definition at line 100 of file UnaryVariable.cc.

References input.

void PLearn::UnaryVariable::unmarkAncestors  )  [virtual]
 

undo any marking done by a call to sources() or ancestors()

Implements PLearn::Variable.

Definition at line 127 of file UnaryVariable.cc.

References input.


Member Data Documentation

Var PLearn::UnaryVariable::input [protected]
 

Definition at line 63 of file UnaryVariable.h.

Referenced by ancestors(), buildPath(), makeDeepCopyFromShallowCopy(), markPath(), parents(), printInfo(), random_sources(), resizeRValue(), sources(), and unmarkAncestors().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:25:50 2004 for PLearn by doxygen 1.3.7