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

PLearn::TimesConstantVariable Class Reference

multiplies a matrix var by a scalar constant More...

#include <TimesConstantVariable.h>

Inheritance diagram for PLearn::TimesConstantVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TimesConstantVariable ()
 Default constructor for persistence.

 TimesConstantVariable (Variable *input, real c)
 PLEARN_DECLARE_OBJECT (TimesConstantVariable)
virtual string info () const
 returns a bit more informative string about object (default returns classname())

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

virtual void rfprop ()

Public Attributes

real cst
 The constant.


Private Types

typedef UnaryVariable inherited

Detailed Description

multiplies a matrix var by a scalar constant

* Times... *

Definition at line 57 of file TimesConstantVariable.h.


Member Typedef Documentation

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

Reimplemented from PLearn::UnaryVariable.

Definition at line 59 of file TimesConstantVariable.h.

Referenced by TimesConstantVariable().


Constructor & Destructor Documentation

PLearn::TimesConstantVariable::TimesConstantVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 67 of file TimesConstantVariable.h.

References cst.

PLearn::TimesConstantVariable::TimesConstantVariable Variable input,
real  c
 

Definition at line 56 of file TimesConstantVariable.cc.

References inherited.


Member Function Documentation

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

Implements PLearn::Variable.

Definition at line 76 of file TimesConstantVariable.cc.

References cst, k, and PLearn::Variable::nelems().

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

compute output given input

Implements PLearn::Variable.

Definition at line 69 of file TimesConstantVariable.cc.

References cst, k, and PLearn::Variable::nelems().

virtual string PLearn::TimesConstantVariable::info  )  const [inline, virtual]
 

returns a bit more informative string about object (default returns classname())

Reimplemented from PLearn::Object.

Definition at line 72 of file TimesConstantVariable.h.

References cst, and PLearn::tostring().

PLearn::TimesConstantVariable::PLEARN_DECLARE_OBJECT TimesConstantVariable   ) 
 

void PLearn::TimesConstantVariable::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 60 of file TimesConstantVariable.cc.

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

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

Reimplemented from PLearn::Variable.

Definition at line 90 of file TimesConstantVariable.cc.

References cst, k, PLearn::TVec< T >::length(), PLearn::Variable::nelems(), and PLearn::UnaryVariable::resizeRValue().

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

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

Reimplemented from PLearn::Variable.

Definition at line 83 of file TimesConstantVariable.cc.

References cst.


Member Data Documentation

real PLearn::TimesConstantVariable::cst
 

The constant.

Definition at line 63 of file TimesConstantVariable.h.

Referenced by bprop(), fprop(), info(), rfprop(), symbolicBprop(), and TimesConstantVariable().


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