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

PLearn::CutAboveThresholdVariable Class Reference

#include <CutAboveThresholdVariable.h>

Inheritance diagram for PLearn::CutAboveThresholdVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CutAboveThresholdVariable ()
 Default constructor for persistence.

 CutAboveThresholdVariable (Variable *input, real the_threshold)
 PLEARN_DECLARE_OBJECT (CutAboveThresholdVariable)
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


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

real threshold

Private Types

typedef UnaryVariable inherited

Member Typedef Documentation

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

Reimplemented from PLearn::UnaryVariable.

Definition at line 54 of file CutAboveThresholdVariable.h.

Referenced by CutAboveThresholdVariable().


Constructor & Destructor Documentation

PLearn::CutAboveThresholdVariable::CutAboveThresholdVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 61 of file CutAboveThresholdVariable.h.

References threshold.

PLearn::CutAboveThresholdVariable::CutAboveThresholdVariable Variable input,
real  the_threshold
 

Definition at line 57 of file CutAboveThresholdVariable.cc.

References inherited.


Member Function Documentation

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

Implements PLearn::Variable.

Definition at line 88 of file CutAboveThresholdVariable.cc.

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

void PLearn::CutAboveThresholdVariable::declareOptions OptionList ol  )  [static]
 

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::UnaryVariable.

Definition at line 72 of file CutAboveThresholdVariable.cc.

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

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

compute output given input

Implements PLearn::Variable.

Definition at line 78 of file CutAboveThresholdVariable.cc.

References PLearn::Variable::nelems(), threshold, and val.

PLearn::CutAboveThresholdVariable::PLEARN_DECLARE_OBJECT CutAboveThresholdVariable   ) 
 

void PLearn::CutAboveThresholdVariable::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 62 of file CutAboveThresholdVariable.cc.

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

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

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

Reimplemented from PLearn::Variable.

Definition at line 96 of file CutAboveThresholdVariable.cc.

References threshold.


Member Data Documentation

real PLearn::CutAboveThresholdVariable::threshold [protected]
 

Definition at line 57 of file CutAboveThresholdVariable.h.

Referenced by bprop(), CutAboveThresholdVariable(), fprop(), and symbolicBprop().


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