openModeller
Version 1.5.0
|
#include <PreAlgorithm.hh>
Public Types | |
typedef std::map< string, string > | stringMap |
Public Member Functions | |
virtual | ~PreAlgorithm () |
virtual string | getDescription () const =0 |
bool | apply () |
bool | reset (const PreParameters ¶ms) |
void | resetState (PreParameters ¶ms) |
virtual bool | checkParameters (const PreParameters ¶meters) const =0 |
const PreParameters & | getParameters () const |
virtual void | getAcceptedParameters (stringMap &info)=0 |
virtual void | getLayersetResultSpec (stringMap &info)=0 |
virtual void | getLayerResultSpec (stringMap &info)=0 |
void | getLayerResult (const string layer_id, PreParameters &result) |
Static Public Member Functions | |
static PreAlgorithm * | DefaultObject (const PreParameters ¶ms) |
Protected Member Functions | |
PreAlgorithm () | |
virtual bool | runImplementation ()=0 |
bool | checkInternalParameters () const |
Protected Attributes | |
PreParameters | params_ |
std::map< string, PreParameters > | result_by_layer_ |
Private Member Functions | |
PreAlgorithm (const PreAlgorithm &) | |
const PreAlgorithm & | operator= (const PreAlgorithm &external) |
Declaration of class PreAlgorithm
LICENSE INFORMATION
Copyright(c) 2008 by INPE - Instituto Nacional de Pesquisas Espaciais
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
Definition at line 35 of file PreAlgorithm.hh.
typedef std::map<string, string> PreAlgorithm::stringMap |
Definition at line 91 of file PreAlgorithm.hh.
|
virtual |
Definition at line 41 of file PreAlgorithm.cpp.
|
protected |
Declaration of class PreAlgorithm
LICENSE INFORMATION
Copyright(c) 2008 by INPE - Instituto Nacional de Pesquisas Espaciais
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
Definition at line 32 of file PreAlgorithm.cpp.
|
private |
Alternative constructor.
note: Algorithms cannot be copied.
Definition at line 36 of file PreAlgorithm.cpp.
bool PreAlgorithm::apply | ( | ) |
Applies the algorithm following the current state and internal stored parameters.
return true if OK. false on error.
Definition at line 71 of file PreAlgorithm.cpp.
References checkInternalParameters(), Log::error(), Log::instance(), and runImplementation().
|
protected |
Checks if current internal parameters fits the requirements of each PRE algorithm implementation.
note: Error log messages must be generated. No exceptions generated.
return true if the internal parameters are OK. false if not.
Definition at line 94 of file PreAlgorithm.cpp.
References checkParameters(), and params_.
Referenced by apply().
|
pure virtual |
Checks if the supplied parameters fits the requirements of each PRE algorithm implementation.
note: Error log messages must be generated. No exceptions generated.
parameters: The parameters to be checked. return true if the parameters are OK. false if not.
Implemented in PreChiSquare, and PreJackknife.
Referenced by checkInternalParameters(), and reset().
|
inlinestatic |
Definition at line 43 of file PreAlgorithm.hh.
|
pure virtual |
Implemented in PreChiSquare, and PreJackknife.
|
pure virtual |
Return a description about the algorithm.
Implemented in PreChiSquare, and PreJackknife.
void PreAlgorithm::getLayerResult | ( | const string | layer_id, |
PreParameters & | result | ||
) |
Method used to retrieve statistics calculated for a specified layer.
layer_id | Layer id. |
result | PreParameters object where the results are stored |
Definition at line 110 of file PreAlgorithm.cpp.
References PreMultiContainer< PreMultiContainerKeyT >::clear(), Log::error(), Log::instance(), and result_by_layer_.
|
pure virtual |
Implemented in PreChiSquare, and PreJackknife.
|
pure virtual |
Implemented in PreChiSquare, and PreJackknife.
const PreParameters & PreAlgorithm::getParameters | ( | ) | const |
Definition at line 88 of file PreAlgorithm.cpp.
References params_.
|
private |
Operator = overload.
note: Algorithms cannot be copied.
external: External algorithm reference. return: A const Algorithm reference.
Definition at line 100 of file PreAlgorithm.cpp.
References Log::error(), and Log::instance().
bool PreAlgorithm::reset | ( | const PreParameters & | params | ) |
Reset the internal state with new supplied parameters.
params: The new supplied parameters. return true if parameters OK, false on error.
Definition at line 46 of file PreAlgorithm.cpp.
References checkParameters(), PreMultiContainer< PreMultiContainerKeyT >::clear(), Log::error(), Log::instance(), and params_.
Referenced by PreChiSquareFactory::build(), and PreJackknifeFactory::build().
void PreAlgorithm::resetState | ( | PreParameters & | params | ) |
Reset the supplied parameters with internal state.
params: The supplied parameters.
Definition at line 64 of file PreAlgorithm.cpp.
References PreMultiContainer< PreMultiContainerKeyT >::clear(), and params_.
|
protectedpure virtual |
Runs the current algorithm implementation.
return true if OK. false on error.
Implemented in PreChiSquare, and PreJackknife.
Referenced by apply().
|
mutableprotected |
Definition at line 112 of file PreAlgorithm.hh.
Referenced by checkInternalParameters(), getParameters(), PreChiSquare::init(), reset(), resetState(), and PreChiSquare::runImplementation().
|
mutableprotected |
Definition at line 115 of file PreAlgorithm.hh.
Referenced by getLayerResult(), and PreChiSquare::runImplementation().