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

PLearn::PowVariable Class Reference

elementwise pow (returns 0 wherever input is negative) More...

#include <PowVariable.h>

Inheritance diagram for PLearn::PowVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PowVariable ()
 Default constructor for persistence.

 PowVariable (Variable *input, real the_power)
 PLEARN_DECLARE_OBJECT (PowVariable)
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 power

Private Types

typedef UnaryVariable inherited

Detailed Description

elementwise pow (returns 0 wherever input is negative)

Definition at line 54 of file PowVariable.h.


Member Typedef Documentation

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

Reimplemented from PLearn::UnaryVariable.

Definition at line 56 of file PowVariable.h.

Referenced by PowVariable().


Constructor & Destructor Documentation

PLearn::PowVariable::PowVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 63 of file PowVariable.h.

References power.

PLearn::PowVariable::PowVariable Variable input,
real  the_power
 

Definition at line 57 of file PowVariable.cc.

References inherited.


Member Function Documentation

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

Implements PLearn::Variable.

Definition at line 84 of file PowVariable.cc.

References PLearn::mypow(), PLearn::Variable::nelems(), and power.

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

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

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

compute output given input

Implements PLearn::Variable.

Definition at line 77 of file PowVariable.cc.

References PLearn::mypow(), PLearn::Variable::nelems(), and power.

PLearn::PowVariable::PLEARN_DECLARE_OBJECT PowVariable   ) 
 

void PLearn::PowVariable::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 68 of file PowVariable.cc.

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

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

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

Reimplemented from PLearn::Variable.

Definition at line 91 of file PowVariable.cc.

References PLearn::pow(), and power.


Member Data Documentation

real PLearn::PowVariable::power [protected]
 

Definition at line 59 of file PowVariable.h.

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


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