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

PLearn::ArgminOfVariable Class Reference

#include <ArgminOfVariable.h>

Inheritance diagram for PLearn::ArgminOfVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ArgminOfVariable (Variable *the_v, Variable *the_expression, Variable *the_values_of_v, const VarArray &the_inputs)
 ArgminOfVariable *.

 PLEARN_DECLARE_OBJECT (ArgminOfVariable)
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 makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
virtual void fprop ()
 compute output given input

virtual void bprop ()

Protected Member Functions

 ArgminOfVariable ()
 protected default constructor for persistence


Protected Attributes

VarArray inputs
Var expression
Var values_of_v
Var v
int index_of_argmin
VarArray vv_path
 values_of_v(inputs)

VarArray e_path
 expression(v&inputs)

VarArray v_path
 expression(v)


Detailed Description

returns the value of v within the_values_of_v that gives the lowest value of expression (which may depend on inputs).

Definition at line 54 of file ArgminOfVariable.h.


Constructor & Destructor Documentation

PLearn::ArgminOfVariable::ArgminOfVariable  )  [inline, protected]
 

protected default constructor for persistence

Definition at line 58 of file ArgminOfVariable.h.

References e_path, expression, index_of_argmin, inputs, v, v_path, values_of_v, and vv_path.

PLearn::ArgminOfVariable::ArgminOfVariable Variable the_v,
Variable the_expression,
Variable the_values_of_v,
const VarArray the_inputs
 

ArgminOfVariable *.

Definition at line 52 of file ArgminOfVariable.cc.

References e_path, expression, inputs, PLERROR, PLearn::propagationPath(), v, v_path, values_of_v, and vv_path.


Member Function Documentation

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

Implements PLearn::Variable.

Definition at line 111 of file ArgminOfVariable.cc.

References PLearn::VarArray::bprop(), PLearn::VarArray::clearGradient(), index_of_argmin, values_of_v, and vv_path.

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

compute output given input

Implements PLearn::Variable.

Definition at line 87 of file ArgminOfVariable.cc.

References e_path, expression, PLearn::VarArray::fprop(), index_of_argmin, v, v_path, values_of_v, and vv_path.

void PLearn::ArgminOfVariable::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Reimplemented from PLearn::NaryVariable.

Definition at line 73 of file ArgminOfVariable.cc.

References PLearn::deepCopyField(), e_path, expression, inputs, v, v_path, values_of_v, and vv_path.

PLearn::ArgminOfVariable::PLEARN_DECLARE_OBJECT ArgminOfVariable   ) 
 

void PLearn::ArgminOfVariable::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 69 of file ArgminOfVariable.cc.


Member Data Documentation

VarArray PLearn::ArgminOfVariable::e_path [protected]
 

expression(v&inputs)

Definition at line 69 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), fprop(), and makeDeepCopyFromShallowCopy().

Var PLearn::ArgminOfVariable::expression [protected]
 

Definition at line 63 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), fprop(), and makeDeepCopyFromShallowCopy().

int PLearn::ArgminOfVariable::index_of_argmin [protected]
 

Definition at line 66 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), bprop(), and fprop().

VarArray PLearn::ArgminOfVariable::inputs [protected]
 

Definition at line 62 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), and makeDeepCopyFromShallowCopy().

Var PLearn::ArgminOfVariable::v [protected]
 

Definition at line 65 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), fprop(), and makeDeepCopyFromShallowCopy().

VarArray PLearn::ArgminOfVariable::v_path [protected]
 

expression(v)

Definition at line 70 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), fprop(), and makeDeepCopyFromShallowCopy().

Var PLearn::ArgminOfVariable::values_of_v [protected]
 

Definition at line 64 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), bprop(), fprop(), and makeDeepCopyFromShallowCopy().

VarArray PLearn::ArgminOfVariable::vv_path [protected]
 

values_of_v(inputs)

Definition at line 68 of file ArgminOfVariable.h.

Referenced by ArgminOfVariable(), bprop(), fprop(), and makeDeepCopyFromShallowCopy().


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