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

PLearn::SignVariable Class Reference

sign(x) = 1 if x>0, -1 if x<0, 0 if x=0, all done element by element. More...

#include <SignVariable.h>

Inheritance diagram for PLearn::SignVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SignVariable ()
 Default constructor for persistence.

 SignVariable (Variable *input)
 PLEARN_DECLARE_OBJECT (SignVariable)
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


Private Types

typedef UnaryVariable inherited

Detailed Description

sign(x) = 1 if x>0, -1 if x<0, 0 if x=0, all done element by element.

Definition at line 53 of file SignVariable.h.


Member Typedef Documentation

typedef UnaryVariable PLearn::SignVariable::inherited [private]
 

Reimplemented from PLearn::UnaryVariable.

Definition at line 55 of file SignVariable.h.

Referenced by SignVariable().


Constructor & Destructor Documentation

PLearn::SignVariable::SignVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 59 of file SignVariable.h.

PLearn::SignVariable::SignVariable Variable input  ) 
 

Definition at line 55 of file SignVariable.cc.

References inherited.


Member Function Documentation

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

Implements PLearn::Variable.

Definition at line 76 of file SignVariable.cc.

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

compute output given input

Implements PLearn::Variable.

Definition at line 68 of file SignVariable.cc.

References PLearn::Variable::nelems(), and PLearn::sign().

PLearn::SignVariable::PLEARN_DECLARE_OBJECT SignVariable   ) 
 

void PLearn::SignVariable::recomputeSize int l,
int w
const [virtual]
 

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 59 of file SignVariable.cc.

References PLearn::Var::length(), and PLearn::Var::width().

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

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

Reimplemented from PLearn::Variable.

Definition at line 81 of file SignVariable.cc.


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