All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Classes | Public Member Functions | Private Member Functions | Private Attributes
face_contour_detector::AutoParameterExplorer Class Reference

The AutoParameterExplorer tries to find a given target values for an given parameter (doubles) range. For this you have to: More...

#include <AutoParameterExplorer.h>

List of all members.

Classes

class  Area
class  ParameterPoint
class  Vector
 A n dimensional vector that can be added or generated out of ParameterPoint's. More...

Public Member Functions

void AddParameter (const std::string &name, double min, double max)
 Adds a parameter range that can be searched for the desired result values.
 AutoParameterExplorer (boost::function< void(const std::vector< double > &, std::map< std::string, double > &)> paramsFunction, boost::function< double(const std::map< std::string, double > &, const std::map< std::string, double > &)> costFunction)
 Constructs a AutoParameterExplorer.
void FindBest (std::map< std::string, double > targetValue, int steps, int numResults, std::vector< std::map< std::string, double > > &results)
 Starts searching for the best result. Before this is executed all parameters must be added.
virtual ~AutoParameterExplorer ()
 Deconstructor.

Private Member Functions

void M_GetCosts (std::map< std::string, double > &targetValue, ParameterPoint &paramPoint)
void M_GetCosts (std::map< std::string, double > &targetValue, Area &area)
bool M_IsTargetValueInside (std::map< std::string, double > &targetValue, Area &area)
void M_PushAllPoints (Area &area, std::map< std::string, double > &targetValues, face_contour_detector::LimitedPriorityQueueSet< ParameterPoint, ParameterPoint::LessCosts > &results)

Private Attributes

boost::function< double(const
std::map< std::string, double >
&, const std::map
< std::string, double > &)> 
m_costsFunction
std::vector< std::string > m_paramNames
boost::function< void(const
std::vector< double >
&, std::map< std::string,
double > &)> 
m_paramsFunction
std::vector< std::pair< double,
double > > 
m_startEnd

Detailed Description

The AutoParameterExplorer tries to find a given target values for an given parameter (doubles) range. For this you have to:

Definition at line 29 of file AutoParameterExplorer.h.


Constructor & Destructor Documentation

face_contour_detector::AutoParameterExplorer::AutoParameterExplorer ( boost::function< void(const std::vector< double > &, std::map< std::string, double > &)>  paramsFunction,
boost::function< double(const std::map< std::string, double > &, const std::map< std::string, double > &)>  costFunction 
)

Constructs a AutoParameterExplorer.

Parameters:
paramsFunction
costFunction

Definition at line 11 of file AutoParameterExplorer.cpp.

Deconstructor.

Definition at line 12 of file AutoParameterExplorer.cpp.


Member Function Documentation

void face_contour_detector::AutoParameterExplorer::AddParameter ( const std::string &  name,
double  min,
double  max 
)

Adds a parameter range that can be searched for the desired result values.

Parameters:
namethe name of the parameter (will be used in FindBest)
minthe minimum value that can be chosen for the parameter
maxthe maximum value that can be chosen for the parameter
Precondition:
min < max

Definition at line 14 of file AutoParameterExplorer.cpp.

void face_contour_detector::AutoParameterExplorer::FindBest ( std::map< std::string, double >  targetValue,
int  steps,
int  numResults,
std::vector< std::map< std::string, double > > &  results 
)

Starts searching for the best result. Before this is executed all parameters must be added.

Parameters:
targetValuethe target value that should be reached as close as possible
stepsthe maximum number of steps beeing taken before it stops drilling down
numResultshow many results should be returned (if this is 1, only the best one will be retuned)
resultsall the resulting parameter combinations will be saved to this vector (the key for the map is the parameter name you set in AddParameter previously)
Precondition:
there must have been added at least one parameter (via AddParameter)

TAG DEBUG

Definition at line 21 of file AutoParameterExplorer.cpp.

void face_contour_detector::AutoParameterExplorer::M_GetCosts ( std::map< std::string, double > &  targetValue,
ParameterPoint paramPoint 
) [private]

Definition at line 132 of file AutoParameterExplorer.cpp.

void face_contour_detector::AutoParameterExplorer::M_GetCosts ( std::map< std::string, double > &  targetValue,
Area area 
) [private]

use the middle of the area to evaluate it

Definition at line 158 of file AutoParameterExplorer.cpp.

bool face_contour_detector::AutoParameterExplorer::M_IsTargetValueInside ( std::map< std::string, double > &  targetValue,
Area area 
) [private]

Definition at line 182 of file AutoParameterExplorer.cpp.

void face_contour_detector::AutoParameterExplorer::M_PushAllPoints ( Area area,
std::map< std::string, double > &  targetValues,
face_contour_detector::LimitedPriorityQueueSet< ParameterPoint, ParameterPoint::LessCosts > &  results 
) [private]

Definition at line 233 of file AutoParameterExplorer.cpp.


Member Data Documentation

boost::function<double (const std::map<std::string, double>&, const std::map<std::string, double>&)> face_contour_detector::AutoParameterExplorer::m_costsFunction [private]

Definition at line 113 of file AutoParameterExplorer.h.

Definition at line 110 of file AutoParameterExplorer.h.

boost::function<void (const std::vector<double>&, std::map<std::string, double>&)> face_contour_detector::AutoParameterExplorer::m_paramsFunction [private]

Definition at line 112 of file AutoParameterExplorer.h.

Definition at line 111 of file AutoParameterExplorer.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


face_contour_detector
Author(s): Fabian Wenzelmann and Julian Schmid
autogenerated on Wed Dec 26 2012 16:18:17