openModeller
Version 1.4.0
|
#include <distance_to_average.hh>
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. |
Declaration of cartesian DistanceToAverage algorithm.
LICENSE INFORMATION
Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental
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.
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().
void DistanceToAverage::_getConfiguration | ( | ConfigurationPtr & | config | ) | const [protected, virtual] |
Reimplemented from AlgorithmImpl.
Definition at line 276 of file distance_to_average.cpp.
void DistanceToAverage::_setConfiguration | ( | const ConstConfigurationPtr & | config | ) | [protected, virtual] |
Reimplemented from AlgorithmImpl.
Definition at line 289 of file distance_to_average.cpp.
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.
x | Environmental conditions. |
Implements AlgorithmImpl.
Definition at line 238 of file distance_to_average.cpp.
References _avg, _dist, _max, _min, and Sample::norm().
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().
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.
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] |
Definition at line 62 of file distance_to_average.hh.
Referenced by _getConfiguration(), _setConfiguration(), done(), initialize(), and ~DistanceToAverage().
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().