openModeller  Version 1.5.0
DistanceToAverage Class Reference

#include <distance_to_average.hh>

Inheritance diagram for DistanceToAverage:
Inheritance graph
Collaboration diagram for DistanceToAverage:
Collaboration graph

Public Member Functions

 DistanceToAverage ()
 
virtual ~DistanceToAverage ()
 
int initialize ()
 
int iterate ()
 
int done () const
 
Scalar getValue (const Sample &x) const
 
int getConvergence (Scalar *val)
 
- Public Member Functions inherited from AlgorithmImpl
 AlgorithmImpl (AlgMetadata const *metadata)
 
virtual ~AlgorithmImpl ()
 
void setParameters (int nparam, AlgParameter const *param)
 
void setParameters (const ParamSetType &)
 
std::string const getID () const
 
AlgMetadata const * getMetadata () const
 
AlgorithmPtr getFreshCopy ()
 
virtual int supportsModelProjection () const
 
Model createModel (const SamplerPtr &samp, CallbackWrapper *func=0)
 
void setSampler (const SamplerPtr &samp)
 
virtual int finalize ()
 
virtual int getConvergence (Scalar *const val) const
 
virtual float getProgress () const
 
virtual int needNormalization ()
 
NormalizergetNormalizer () const
 
void setNormalization (const SamplerPtr &samp) const
 
void setNormalization (const EnvironmentPtr &env) const
 
virtual Model getModel () const
 
ConfigurationPtr getConfiguration () const
 
void setConfiguration (const ConstConfigurationPtr &)
 
- Public Member Functions inherited from Configurable
virtual ~Configurable ()
 

Protected Member Functions

virtual void _getConfiguration (ConfigurationPtr &) const
 
virtual void _setConfiguration (const ConstConfigurationPtr &)
 
- Protected Member Functions inherited from AlgorithmImpl
int dimDomain ()
 
int getParameter (std::string const &name, std::string *value)
 
int getParameter (std::string const &name, double *value)
 
int getParameter (std::string const &name, float *value)
 
int getParameter (std::string const &name, int *value)
 

Private Attributes

bool _done
 
Scalar _dist
 
Scalar _min
 Store the minimum distance (for debug). More...
 
Scalar _max
 Store the maximum distance (for debug). More...
 
Sample _avg
 Average related to occurrence points. More...
 

Additional Inherited Members

- Public Types inherited from AlgorithmImpl
typedef std::map< icstring,
std::string > 
ParamSetType
 
- Protected Attributes inherited from AlgorithmImpl
SamplerPtr _samp
 
Normalizer_normalizerPtr
 
ParamSetType _param
 

Detailed Description

Declaration of cartesian DistanceToAverage algorithm.

Author
Mauro E S Muņoz (mauro.nosp@m.@cri.nosp@m.a.org.nosp@m..br)
Date
2003-09-12
Id:
distance_to_average.hh 3382 2007-07-19 19:09:18Z rdg

LICENSE INFORMATION

Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html Algorithm to generate models based on the cartesian DistanceToAverage from the average related to occurrence points.

Definition at line 42 of file distance_to_average.hh.

Constructor & Destructor Documentation

DistanceToAverage::DistanceToAverage ( )

Definition at line 129 of file distance_to_average.cpp.

References AlgorithmImpl::_normalizerPtr.

DistanceToAverage::~DistanceToAverage ( )
virtual

Definition at line 144 of file distance_to_average.cpp.

References _done, _max, _min, Log::info(), and Log::instance().

Here is the call graph for this function:

Member Function Documentation

void DistanceToAverage::_getConfiguration ( ConfigurationPtr config) const
protectedvirtual

Reimplemented from AlgorithmImpl.

Definition at line 276 of file distance_to_average.cpp.

References _avg, _dist, and _done.

void DistanceToAverage::_setConfiguration ( const ConstConfigurationPtr config)
protectedvirtual

Reimplemented from AlgorithmImpl.

Definition at line 289 of file distance_to_average.cpp.

References _avg, _dist, and _done.

int DistanceToAverage::done ( ) const
virtual

Return != 0 if algorithm finished.

Reimplemented from AlgorithmImpl.

Definition at line 229 of file distance_to_average.cpp.

References _done.

int DistanceToAverage::getConvergence ( Scalar val)

Definition at line 267 of file distance_to_average.cpp.

Scalar DistanceToAverage::getValue ( const Sample x) const
virtual

The algorithm must return the occurrence probability at the given environment conditions.

Parameters
xEnvironmental conditions.
Returns
The occurrence probability in the range [0,1].

Implements AlgorithmImpl.

Definition at line 238 of file distance_to_average.cpp.

References _avg, _dist, _max, _min, and Sample::norm().

Here is the call graph for this function:

int DistanceToAverage::initialize ( )
virtual

Initiate a new training.

Implements AlgorithmImpl.

Definition at line 157 of file distance_to_average.cpp.

References _avg, _dist, _done, AlgorithmImpl::_samp, AlgorithmImpl::getParameter(), Log::info(), Log::instance(), PARAM_MAXDIST, and Sample::resize().

Here is the call graph for this function:

int DistanceToAverage::iterate ( )
virtual

One step further on the training. Return 0 if something wrong happened.

Reimplemented from AlgorithmImpl.

Definition at line 220 of file distance_to_average.cpp.

Member Data Documentation

Sample DistanceToAverage::_avg
private

Average related to occurrence points.

Definition at line 67 of file distance_to_average.hh.

Referenced by _getConfiguration(), _setConfiguration(), getValue(), and initialize().

Scalar DistanceToAverage::_dist
private

Definition at line 63 of file distance_to_average.hh.

Referenced by _getConfiguration(), _setConfiguration(), getValue(), and initialize().

bool DistanceToAverage::_done
private
Scalar DistanceToAverage::_max
mutableprivate

Store the maximum distance (for debug).

Definition at line 65 of file distance_to_average.hh.

Referenced by getValue(), and ~DistanceToAverage().

Scalar DistanceToAverage::_min
mutableprivate

Store the minimum distance (for debug).

Definition at line 64 of file distance_to_average.hh.

Referenced by getValue(), and ~DistanceToAverage().


The documentation for this class was generated from the following files: