PLearn 0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::RealValueIndicatorFunction Class Reference

The first sentence should be a BRIEF DESCRIPTION of what the class does. More...

#include <RealValueIndicatorFunction.h>

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

List of all members.

Public Member Functions

 RealValueIndicatorFunction ()
 Default constructor.
 RealValueIndicatorFunction (int featurenum, real the_value)
virtual real evaluateFeature (real x) const
 This should be implemented in subclasses default verison returns the value of the feature unaltered.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual
RealValueIndicatorFunction
deepCopy (CopiesMap &copies) const
virtual void build ()
 Post-constructor.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.

Static Public Member Functions

static string _classname_ ()
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Public Attributes

real value

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares the class options.

Private Types

typedef RealFunctionOfInputFeature inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

The first sentence should be a BRIEF DESCRIPTION of what the class does.

Place the rest of the class programmer documentation here. Doxygen supports Javadoc-style comments. See http://www.doxygen.org/manual.html

Todo:
Write class to-do's here if there are any.
Deprecated:
Write deprecated stuff here if there is any. Indicate what else should be used instead.

Definition at line 57 of file RealValueIndicatorFunction.h.


Member Typedef Documentation

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 59 of file RealValueIndicatorFunction.h.


Constructor & Destructor Documentation

PLearn::RealValueIndicatorFunction::RealValueIndicatorFunction ( ) [inline]

Default constructor.

Definition at line 70 of file RealValueIndicatorFunction.h.

        :value(0)
    {}
PLearn::RealValueIndicatorFunction::RealValueIndicatorFunction ( int  featurenum,
real  the_value 
) [inline]

Definition at line 74 of file RealValueIndicatorFunction.h.

        :inherited(featurenum), value(the_value)
    {}

Member Function Documentation

string PLearn::RealValueIndicatorFunction::_classname_ ( ) [static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

OptionList & PLearn::RealValueIndicatorFunction::_getOptionList_ ( ) [static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

RemoteMethodMap & PLearn::RealValueIndicatorFunction::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

bool PLearn::RealValueIndicatorFunction::_isa_ ( const Object o) [static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

Object * PLearn::RealValueIndicatorFunction::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

StaticInitializer RealValueIndicatorFunction::_static_initializer_ & PLearn::RealValueIndicatorFunction::_static_initialize_ ( ) [static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

void PLearn::RealValueIndicatorFunction::build ( ) [virtual]

Post-constructor.

The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 53 of file RealValueIndicatorFunction.cc.

void PLearn::RealValueIndicatorFunction::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 89 of file RealValueIndicatorFunction.cc.

{}
string PLearn::RealValueIndicatorFunction::classname ( ) const [virtual]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

void PLearn::RealValueIndicatorFunction::declareOptions ( OptionList ol) [static, protected]

Declares the class options.

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 64 of file RealValueIndicatorFunction.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), and value.

{
    // ### Declare all of this object's options here.
    // ### For the "flags" of each option, you should typically specify
    // ### one of OptionBase::buildoption, OptionBase::learntoption or
    // ### OptionBase::tuningoption. If you don't provide one of these three,
    // ### this option will be ignored when loading values from a script.
    // ### You can also combine flags, for example with OptionBase::nosave:
    // ### (OptionBase::buildoption | OptionBase::nosave)

    declareOption(ol, "value", &RealValueIndicatorFunction::value,
                  OptionBase::buildoption,
                  "Evaluation will return 1 if x[which_feature] equals value; 0 otherwise.\n"
                  "Comparison uses is_equal function which handles 'nan' and 'inf' correctly,\n"
                  "and also has a small tolerance for float values.\n");

    // Now call the parent class' declareOptions
    inherited::declareOptions(ol);
}

Here is the call graph for this function:

static const PPath& PLearn::RealValueIndicatorFunction::declaringFile ( ) [inline, static]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 83 of file RealValueIndicatorFunction.h.

:
    //#####  Protected Options  ###############################################
RealValueIndicatorFunction * PLearn::RealValueIndicatorFunction::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

real PLearn::RealValueIndicatorFunction::evaluateFeature ( real  x) const [virtual]

This should be implemented in subclasses default verison returns the value of the feature unaltered.

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 84 of file RealValueIndicatorFunction.cc.

References PLearn::is_equal().

{
    return is_equal(x,value);
}

Here is the call graph for this function:

OptionList & PLearn::RealValueIndicatorFunction::getOptionList ( ) const [virtual]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

OptionMap & PLearn::RealValueIndicatorFunction::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

RemoteMethodMap & PLearn::RealValueIndicatorFunction::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 50 of file RealValueIndicatorFunction.cc.

void PLearn::RealValueIndicatorFunction::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 59 of file RealValueIndicatorFunction.cc.


Member Data Documentation

Reimplemented from PLearn::RealFunctionOfInputFeature.

Definition at line 83 of file RealValueIndicatorFunction.h.

Definition at line 64 of file RealValueIndicatorFunction.h.

Referenced by declareOptions().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines