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

PLearn::ArgmaxVariable Class Reference

#include <ArgmaxVariable.h>

Inheritance diagram for PLearn::ArgmaxVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ArgmaxVariable ()
 Default constructor for persistence.

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

This variable computes the index of the maximum value in the input It is a scalar variable if the input is a vector (single row or single column) Otherwise it is a single-column of length() 2 containing the (i,j) coordinate of the max

Definition at line 56 of file ArgmaxVariable.h.


Member Typedef Documentation

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

Reimplemented from PLearn::UnaryVariable.

Definition at line 58 of file ArgmaxVariable.h.

Referenced by ArgmaxVariable().


Constructor & Destructor Documentation

PLearn::ArgmaxVariable::ArgmaxVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 62 of file ArgmaxVariable.h.

PLearn::ArgmaxVariable::ArgmaxVariable Variable input  ) 
 

Definition at line 55 of file ArgmaxVariable.cc.

References inherited.


Member Function Documentation

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

Implements PLearn::Variable.

Definition at line 106 of file ArgmaxVariable.cc.

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

compute output given input

Implements PLearn::Variable.

Definition at line 67 of file ArgmaxVariable.cc.

References PLearn::argmax(), k, PLearn::Var::length(), val, and PLearn::Var::width().

PLearn::ArgmaxVariable::PLEARN_DECLARE_OBJECT ArgmaxVariable   ) 
 

void PLearn::ArgmaxVariable::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 ArgmaxVariable.cc.

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

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

Reimplemented from PLearn::Variable.

Definition at line 108 of file ArgmaxVariable.cc.


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