openModeller  Version 1.4.0
PreAlgorithm Class Reference

#include <PreAlgorithm.hh>

Inheritance diagram for PreAlgorithm:
Collaboration diagram for PreAlgorithm:

List of all members.

Public Types

typedef std::map< string, string > stringMap

Public Member Functions

virtual ~PreAlgorithm ()
virtual string getDescription () const =0
bool apply ()
bool reset (const PreParameters &params)
void resetState (PreParameters &params)
virtual bool checkParameters (const PreParameters &parameters) const =0
const PreParametersgetParameters () 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 PreAlgorithmDefaultObject (const PreParameters &params)

Protected Member Functions

 PreAlgorithm ()
virtual bool runImplementation ()=0
bool checkInternalParameters () const

Protected Attributes

PreParameters params_
std::map< string, PreParametersresult_by_layer_

Private Member Functions

 PreAlgorithm (const PreAlgorithm &)
const PreAlgorithmoperator= (const PreAlgorithm &external)

Detailed Description

Declaration of class PreAlgorithm

Author:
Missae Yamamoto (missae at dpi . inpe . br)
Id:
PreAlgorithm.hh 4887 2009-03-03 20:12:34Z rdg

LICENSE INFORMATION

Copyright(c) 2008 by INPE - Instituto Nacional de Pesquisas Espaciais

http://www.inpe.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

Definition at line 35 of file PreAlgorithm.hh.


Member Typedef Documentation

typedef std::map<string, string> PreAlgorithm::stringMap

Definition at line 91 of file PreAlgorithm.hh.


Constructor & Destructor Documentation

Definition at line 41 of file PreAlgorithm.cpp.

PreAlgorithm::PreAlgorithm ( ) [protected]

Declaration of class PreAlgorithm

Author:
Missae Yamamoto (missae at dpi . inpe . br)
Id:
PreAlgorithm.cpp 4881 2009-03-03 18:11:34Z rdg

LICENSE INFORMATION

Copyright(c) 2008 by INPE - Instituto Nacional de Pesquisas Espaciais

http://www.inpe.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

Definition at line 32 of file PreAlgorithm.cpp.

PreAlgorithm::PreAlgorithm ( const PreAlgorithm ) [private]

Alternative constructor.

note: Algorithms cannot be copied.

Definition at line 36 of file PreAlgorithm.cpp.


Member Function Documentation

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().

Here is the call graph for this function:

bool PreAlgorithm::checkInternalParameters ( ) const [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().

Here is the call graph for this function:

virtual bool PreAlgorithm::checkParameters ( const PreParameters parameters) const [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().

static PreAlgorithm* PreAlgorithm::DefaultObject ( const PreParameters params) [inline, static]

Definition at line 43 of file PreAlgorithm.hh.

virtual void PreAlgorithm::getAcceptedParameters ( stringMap info) [pure virtual]

Implemented in PreChiSquare, and PreJackknife.

virtual string PreAlgorithm::getDescription ( ) const [pure virtual]

Return a description about the algorithm.

Returns:
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.

Parameters:
layer_idLayer id.
resultPreParameters object where the results are stored
Returns:
PreParamers object associated with the specified layer.

Definition at line 110 of file PreAlgorithm.cpp.

References PreMultiContainer< PreMultiContainerKeyT >::clear(), Log::error(), Log::instance(), and result_by_layer_.

Here is the call graph for this function:

virtual void PreAlgorithm::getLayerResultSpec ( stringMap info) [pure virtual]

Implemented in PreChiSquare, and PreJackknife.

virtual void PreAlgorithm::getLayersetResultSpec ( stringMap info) [pure virtual]

Implemented in PreChiSquare, and PreJackknife.

Definition at line 88 of file PreAlgorithm.cpp.

References params_.

const PreAlgorithm & PreAlgorithm::operator= ( const PreAlgorithm external) [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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Reset the supplied parameters with internal state.

params: The supplied parameters.

Reimplemented in PreJackknife.

Definition at line 64 of file PreAlgorithm.cpp.

References PreMultiContainer< PreMultiContainerKeyT >::clear(), and params_.

Here is the call graph for this function:

virtual bool PreAlgorithm::runImplementation ( ) [protected, pure virtual]

Runs the current algorithm implementation.

return true if OK. false on error.

Implemented in PreChiSquare, and PreJackknife.

Referenced by apply().


Member Data Documentation

std::map<string, PreParameters> PreAlgorithm::result_by_layer_ [mutable, protected]

Definition at line 115 of file PreAlgorithm.hh.

Referenced by getLayerResult(), and PreChiSquare::runImplementation().


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