openModeller  Version 1.4.0
DistanceToAverage Class Reference

#include <distance_to_average.hh>

Inheritance diagram for DistanceToAverage:
Collaboration diagram for DistanceToAverage:

List of all members.

Public Member Functions

 DistanceToAverage ()
virtual ~DistanceToAverage ()
int initialize ()
int iterate ()
int done () const
Scalar getValue (const Sample &x) const
int getConvergence (Scalar *val)

Protected Member Functions

virtual void _getConfiguration (ConfigurationPtr &) const
virtual void _setConfiguration (const ConstConfigurationPtr &)

Private Attributes

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

Detailed Description

Declaration of cartesian DistanceToAverage algorithm.

Author:
Mauro E S Muņoz (mauro@cria.org.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

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 [protected, virtual]

Reimplemented from AlgorithmImpl.

Definition at line 276 of file distance_to_average.cpp.

References _avg, _dist, and _done.

void DistanceToAverage::_setConfiguration ( const ConstConfigurationPtr config) [protected, virtual]

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.

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

Average related to occurrence points.

Definition at line 67 of file distance_to_average.hh.

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

Scalar DistanceToAverage::_max [mutable, private]

Store the maximum distance (for debug).

Definition at line 65 of file distance_to_average.hh.

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

Scalar DistanceToAverage::_min [mutable, private]

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: