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::ConstantRealFunction Class Reference

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

#include <ConstantRealFunction.h>

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

List of all members.

Public Member Functions

 ConstantRealFunction ()
 Default constructor.
virtual real evaluate (const Vec &x) const
real operator() (const Vec &x) const
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual ConstantRealFunctiondeepCopy (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 constantval
 ### declare public option fields (such as build options) here

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

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

Private Types

typedef RealFunction 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 ConstantRealFunction.h.


Member Typedef Documentation

Reimplemented from PLearn::RealFunction.

Definition at line 59 of file ConstantRealFunction.h.


Constructor & Destructor Documentation

PLearn::ConstantRealFunction::ConstantRealFunction ( ) [inline]

Default constructor.

Definition at line 73 of file ConstantRealFunction.h.

        :constantval(1.0)
    {}

Member Function Documentation

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

Reimplemented from PLearn::RealFunction.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::RealFunction.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::RealFunction.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::RealFunction.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::RealFunction.

Definition at line 49 of file ConstantRealFunction.cc.

void PLearn::ConstantRealFunction::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::RealFunction.

Definition at line 52 of file ConstantRealFunction.cc.

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

This does the actual building.

Reimplemented from PLearn::RealFunction.

Definition at line 79 of file ConstantRealFunction.cc.

{
    // ### This method should do the real building of the object,
    // ### according to set 'options', in *any* situation.
    // ### Typical situations include:
    // ###  - Initial building of an object from a few user-specified options
    // ###  - Building of a "reloaded" object: i.e. from the complete set of
    // ###    all serialised options.
    // ###  - Updating or "re-building" of an object after a few "tuning"
    // ###    options have been modified.
    // ### You should assume that the parent class' build_() has already been
    // ### called.
}
string PLearn::ConstantRealFunction::classname ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file ConstantRealFunction.cc.

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

Declares the class options.

Reimplemented from PLearn::RealFunction.

Definition at line 63 of file ConstantRealFunction.cc.

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

{
    declareOption(ol, "constantval", &ConstantRealFunction::constantval,
                  OptionBase::buildoption,
                  "The constant real returned by evaluate");
    
    // Now call the parent class' declareOptions
    inherited::declareOptions(ol);
}

Here is the call graph for this function:

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

Reimplemented from PLearn::RealFunction.

Definition at line 85 of file ConstantRealFunction.h.

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

Reimplemented from PLearn::RealFunction.

Definition at line 49 of file ConstantRealFunction.cc.

real PLearn::ConstantRealFunction::evaluate ( const Vec x) const [virtual]

Implements PLearn::RealFunction.

Definition at line 73 of file ConstantRealFunction.cc.

Referenced by operator()().

{
    return constantval;
}

Here is the caller graph for this function:

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

Reimplemented from PLearn::Object.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file ConstantRealFunction.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file ConstantRealFunction.cc.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::RealFunction.

Definition at line 58 of file ConstantRealFunction.cc.

real PLearn::ConstantRealFunction::operator() ( const Vec x) const [inline]

Reimplemented from PLearn::RealFunction.

Definition at line 79 of file ConstantRealFunction.h.

References evaluate().

    { return evaluate(x); }

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::RealFunction.

Definition at line 85 of file ConstantRealFunction.h.

### declare public option fields (such as build options) here

Definition at line 65 of file ConstantRealFunction.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