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

PLearn::SourceVariable Class Reference

#include <SourceVariable.h>

Inheritance diagram for PLearn::SourceVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SourceVariable ()
 Default constructor for persistence.

 SourceVariable (int thelength, int thewidth)
 SourceVariable (const Vec &v, bool vertical=true)
 SourceVariable (const Mat &m)
virtual void setParents (const VarArray &parents)
 set this Variable's parents. To use with default constructor.

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 void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 PLEARN_DECLARE_OBJECT (SourceVariable)
virtual void fprop ()
 compute output given input

virtual void bprop ()
virtual void bbprop ()
 compute an approximation to diag(d^2/dinput^2) given diag(d^2/doutput^2), with diag(d^2/dinput^2) ~=~ (doutput/dinput)' diag(d^2/doutput^2) (doutput/dinput) In particular: if 'C' depends on 'y' and 'y' depends on x ...

virtual void symbolicBprop ()
 compute a piece of new Var graph that represents the symbolic derivative of this Var

virtual void rfprop ()
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)

bool isConstant ()
void printInfo (bool print_gradient)

Private Types

typedef Variable inherited

Member Typedef Documentation

typedef Variable PLearn::SourceVariable::inherited [private]
 

Reimplemented from PLearn::Variable.

Definition at line 53 of file SourceVariable.h.

Referenced by SourceVariable().


Constructor & Destructor Documentation

PLearn::SourceVariable::SourceVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 57 of file SourceVariable.h.

PLearn::SourceVariable::SourceVariable int  thelength,
int  thewidth
 

Definition at line 54 of file SourceVariable.cc.

References inherited.

PLearn::SourceVariable::SourceVariable const Vec v,
bool  vertical = true
 

Definition at line 58 of file SourceVariable.cc.

References PLearn::Vec.

PLearn::SourceVariable::SourceVariable const Mat m  ) 
 

Definition at line 62 of file SourceVariable.cc.

References PLearn::Mat.


Member Function Documentation

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

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

Implements PLearn::Variable.

Definition at line 95 of file SourceVariable.cc.

References PLearn::Variable::setMark().

void PLearn::SourceVariable::bbprop  )  [virtual]
 

compute an approximation to diag(d^2/dinput^2) given diag(d^2/doutput^2), with diag(d^2/dinput^2) ~=~ (doutput/dinput)' diag(d^2/doutput^2) (doutput/dinput) In particular: if 'C' depends on 'y' and 'y' depends on x ...

d^2C/dx^2 = d^2C/dy^2 * (dy/dx)^2 + dC/dy * d^2y/dx^2 (diaghessian) (gradient)

Reimplemented from PLearn::Variable.

Definition at line 74 of file SourceVariable.cc.

void PLearn::SourceVariable::bprop  )  [virtual]
 

Implements PLearn::Variable.

Reimplemented in PLearn::SourceSampleVariable.

Definition at line 73 of file SourceVariable.cc.

void PLearn::SourceVariable::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 115 of file SourceVariable.cc.

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

void PLearn::SourceVariable::fprop  )  [virtual]
 

compute output given input

Implements PLearn::Variable.

Reimplemented in PLearn::UniformSampleVariable.

Definition at line 72 of file SourceVariable.cc.

bool PLearn::SourceVariable::isConstant  )  [inline, virtual]
 

Reimplemented from PLearn::Variable.

Definition at line 83 of file SourceVariable.h.

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

Reimplemented from PLearn::Variable.

Definition at line 66 of file SourceVariable.cc.

References PLearn::deepCopyField().

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

bool PLearn::SourceVariable::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 112 of file SourceVariable.cc.

VarArray PLearn::SourceVariable::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 109 of file SourceVariable.cc.

PLearn::SourceVariable::PLEARN_DECLARE_OBJECT SourceVariable   ) 
 

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

Implements PLearn::Variable.

Definition at line 85 of file SourceVariable.h.

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

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

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

Implements PLearn::Variable.

Reimplemented in PLearn::SourceSampleVariable.

Definition at line 88 of file SourceVariable.cc.

References PLearn::Variable::setMark().

void PLearn::SourceVariable::rfprop  )  [virtual]
 

Reimplemented from PLearn::Variable.

Definition at line 75 of file SourceVariable.cc.

virtual void PLearn::SourceVariable::setParents const VarArray parents  )  [inline, virtual]
 

set this Variable's parents. To use with default constructor.

Reimplemented from PLearn::Variable.

Definition at line 63 of file SourceVariable.h.

References PLERROR, and setParents().

Referenced by setParents().

VarArray PLearn::SourceVariable::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 78 of file SourceVariable.cc.

References PLearn::Variable::setMark().

void PLearn::SourceVariable::symbolicBprop  )  [virtual]
 

compute a piece of new Var graph that represents the symbolic derivative of this Var

Reimplemented from PLearn::Variable.

Definition at line 76 of file SourceVariable.cc.

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

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

Implements PLearn::Variable.

Definition at line 103 of file SourceVariable.cc.

References PLearn::Variable::clearMark().


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