openModeller
Version 1.5.0
|
#include <generictemplate.hh>
Public Member Functions | |
GenericTemplate () | |
~GenericTemplate () | |
int | initialize (int ncycle) |
int | iterate () |
int | done () const |
Scalar | getValue (Scalar const *x) const |
int | getConvergence (Scalar *val) |
Private Attributes | |
int | f_done |
Scalar * | f_avg |
Average related to occurrence points. More... | |
int | f_dim |
Dimension of environmental space. More... | |
int | f_localityCount |
This is a generic template intended to be used as the basis for creating new algorithms.
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 This is a simple template for creating new algorithms. Note it does not actually run a model - rather it demonstrates how to do a new algorithm implementation.
Definition at line 41 of file generictemplate.hh.
GenericTemplate::GenericTemplate | ( | ) |
Constructor for GenericTemplate
Constructor for GenericTemplate
Sampler | is class that will fetch environment variable values at each occurrence / locality |
Definition at line 22 of file generictemplate.cpp.
GenericTemplate::~GenericTemplate | ( | ) |
This is the descructor for the GenericTemplate class
Definition at line 29 of file generictemplate.cpp.
int GenericTemplate::done | ( | ) | const |
Use this method to find out if the model has completed (e.g. convergence point has been met.
Definition at line 82 of file generictemplate.cpp.
int GenericTemplate::getConvergence | ( | Scalar * | val | ) |
Returns a value that represents the convergence of the algorithm expressed as a number between 0 and 1 where 0 represents model completion.
val |
Returns a value that represents the convergence of the algorithm expressed as a number between 0 and 1 where 0 represents model completion.
Scalar | *val |
Definition at line 108 of file generictemplate.cpp.
This method is used when projecting the model.
x | a pointer to a vector of openModeller Scalar type (currently double). The vector should contain values looked up on the environmental variable layers into which the mode is being projected. |
This method is used when projecting the model.
Scalar | *x a pointer to a vector of openModeller Scalar type (currently double). The vector should contain values looked up on the environmental variable layers into which the mode is being projected. |
Definition at line 97 of file generictemplate.cpp.
int GenericTemplate::initialize | ( | int | ncycle | ) |
Initialise the model specifying a threshold / cutoff point. This is optional (model dependent).
Initialise the model specifying a threshold / cutoff point. This is optional (model dependent).
@return | 0 on error |
Definition at line 57 of file generictemplate.cpp.
References f_dim, and f_localityCount.
int GenericTemplate::iterate | ( | ) |
Start model execution (build the model).
Definition at line 70 of file generictemplate.cpp.
|
private |
Average related to occurrence points.
Definition at line 103 of file generictemplate.hh.
|
private |
Dimension of environmental space.
Definition at line 104 of file generictemplate.hh.
Referenced by initialize().
|
private |
This member variable is used to indicate whether the model building process has completed yet.
Definition at line 101 of file generictemplate.hh.
|
private |
Definition at line 106 of file generictemplate.hh.
Referenced by initialize().