PLearn 0.1
|
sign(x) = 1 if x>0, -1 if x<0, 0 if x=0, all done element by element. More...
#include <SignVariable.h>
Public Member Functions | |
SignVariable () | |
Default constructor for persistence. | |
SignVariable (Variable *input) | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual SignVariable * | deepCopy (CopiesMap &copies) const |
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 () |
Nothing to do by default. | |
virtual void | bprop () |
Nothing to do by default. | |
virtual void | symbolicBprop () |
compute a piece of new Var graph that represents the symbolic derivative of this Var | |
Static Public Member Functions | |
static string | _classname_ () |
SignVariable. | |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Private Types | |
typedef UnaryVariable | inherited |
sign(x) = 1 if x>0, -1 if x<0, 0 if x=0, all done element by element.
Definition at line 53 of file SignVariable.h.
typedef UnaryVariable PLearn::SignVariable::inherited [private] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 55 of file SignVariable.h.
PLearn::SignVariable::SignVariable | ( | ) | [inline] |
PLearn::SignVariable::SignVariable | ( | Variable * | input | ) |
string PLearn::SignVariable::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
OptionList & PLearn::SignVariable::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
RemoteMethodMap & PLearn::SignVariable::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
Object * PLearn::SignVariable::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
StaticInitializer SignVariable::_static_initializer_ & PLearn::SignVariable::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
void PLearn::SignVariable::bprop | ( | ) | [virtual] |
Nothing to do by default.
Reimplemented from PLearn::UnaryVariable.
Definition at line 76 of file SignVariable.cc.
{}
string PLearn::SignVariable::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
static const PPath& PLearn::SignVariable::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 62 of file SignVariable.h.
{ return new SignVariable(input); }
SignVariable * PLearn::SignVariable::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
void PLearn::SignVariable::fprop | ( | ) | [virtual] |
Nothing to do by default.
Reimplemented from PLearn::UnaryVariable.
Definition at line 68 of file SignVariable.cc.
References i, PLearn::UnaryVariable::input, PLearn::Variable::nelems(), PLearn::sign(), and PLearn::Variable::valuedata.
OptionList & PLearn::SignVariable::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
OptionMap & PLearn::SignVariable::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
RemoteMethodMap & PLearn::SignVariable::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::UnaryVariable.
Definition at line 53 of file SignVariable.cc.
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 59 of file SignVariable.cc.
References PLearn::UnaryVariable::input, PLearn::Var::length(), and PLearn::Var::width().
void PLearn::SignVariable::symbolicBprop | ( | ) | [virtual] |
compute a piece of new Var graph that represents the symbolic derivative of this Var
Reimplemented from PLearn::Variable.
Definition at line 81 of file SignVariable.cc.
{}
Reimplemented from PLearn::UnaryVariable.
Definition at line 62 of file SignVariable.h.