CrystalFp
 All Classes Namespaces Files Functions Enumerations Enumerator Pages
Public Types | Public Member Functions | List of all members
cfp::CrystalFpAnalysis Class Reference

Public interface to the analysis algorithms for CrystalFp results. More...

#include <CrystalFpAnalysis.h>

Public Types

enum  CategoryTypes { CATEGORY_SIMPLE, CATEGORY_HIST, CATEGORY_SPECIAL, CATEGORY_ALL }
 Analysis categories. More...
 

Public Member Functions

 CrystalFpAnalysis (const CrystalFp *aCfp)
 Constructor.
 
 ~CrystalFpAnalysis ()
 Destructor.
 
void resetCache (const CrystalFp *aCfp=0)
 Reset Clean cache and reload the structure list under analysis.
 
const std::vector< std::string > getAnalysisMethodsNames (unsigned int aCategory) const
 Return the names of the implemented distance computation methods.
 
bool setAnalysisMethod (unsigned int aAnalysisTypeX, unsigned int aAnalysisTypeY)
 Set the analysis to perform.
 
std::vector< size_t > numValues (void)
 Retrieve the length of each returned value plus the number of x values.
 
const std::vector< std::string > getLabels (void) const
 Get the labels for the analysis result arrays.
 
void getValues (float **aValues) const
 Return the analysis values into preallocated arrays.
 
void setNamedParam (const std::string &aName, const std::string &aValue)
 Set the parameter identified by the name.
 
void setNamedParam (const std::string &aName, unsigned int aValue)
 Set the parameter identified by the name.
 
void enableCaching (void)
 Enables the results caching.
 

Detailed Description

Public interface to the analysis algorithms for CrystalFp results.

This is the interface to the algoritms needed to analyze the CrystalFp results. The results are line charts or scatterplots.

Author
Mario Valle - Swiss National Supercomputing Centre (CSCS)
Date
2008-06-06 (initial version)
2009-09-01 (version 1.0)
Version
1.0

Definition at line 20 of file CrystalFpAnalysis.h.

Member Enumeration Documentation

Analysis categories.

Enumerator:
CATEGORY_SIMPLE 

One value on x one value on y.

CATEGORY_HIST 

Histogram of one value.

CATEGORY_SPECIAL 

Other analysis included the 2D ones.

CATEGORY_ALL 

All simple analysis.

Definition at line 46 of file CrystalFpAnalysis.h.

Constructor & Destructor Documentation

cfp::CrystalFpAnalysis::CrystalFpAnalysis ( const CrystalFp aCfp)

Constructor.

Parameters
aCfpThe object describing the structures to be analyzed
cfp::CrystalFpAnalysis::~CrystalFpAnalysis ( )

Destructor.

Member Function Documentation

void cfp::CrystalFpAnalysis::enableCaching ( void  )

Enables the results caching.

After this call all the computed values are retained in a cache and reused if needed.

const std::vector<std::string> cfp::CrystalFpAnalysis::getAnalysisMethodsNames ( unsigned int  aCategory) const

Return the names of the implemented distance computation methods.

Parameters
aCategoryIndex of the category of analysis to use (simple, histogram, special)
Returns
The list of distance measure methods names for the given category
const std::vector<std::string> cfp::CrystalFpAnalysis::getLabels ( void  ) const

Get the labels for the analysis result arrays.

Returns
The vector of labels
void cfp::CrystalFpAnalysis::getValues ( float **  aValues) const

Return the analysis values into preallocated arrays.

Parameters
aValuesAn array of pointers that point to arrays in which the results will be stored
std::vector<size_t> cfp::CrystalFpAnalysis::numValues ( void  )

Retrieve the length of each returned value plus the number of x values.

Returns
A list with for first element the number of x variables, then the lengths of each variables, starting with the x ones
Exceptions
CrystalFpFatalIf analysis method has not been set
void cfp::CrystalFpAnalysis::resetCache ( const CrystalFp aCfp = 0)

Reset Clean cache and reload the structure list under analysis.

Parameters
aCfpThe object describing the structures to be analyzed. If null the original object is not changed
bool cfp::CrystalFpAnalysis::setAnalysisMethod ( unsigned int  aAnalysisTypeX,
unsigned int  aAnalysisTypeY 
)

Set the analysis to perform.

Parameters
aAnalysisTypeXThe index in the global list of methods to be used or the one to be used for the X value
aAnalysisTypeYThe index in the global list of methods to be used for the Y value (if any)
Returns
Return false if the method index or the combination of methods is invalid or if the data cannot support the requested analysis method
void cfp::CrystalFpAnalysis::setNamedParam ( const std::string &  aName,
const std::string &  aValue 
)

Set the parameter identified by the name.

Mainly used to set parameters from the command line

Parameters
aNameName of the parameter to be set (currently: "bin", "part", "idx")
aValueString representation of the value to be set (internally it is converted to the needed data type)
Exceptions
CrystalFpFatalIf the param name is invalid
void cfp::CrystalFpAnalysis::setNamedParam ( const std::string &  aName,
unsigned int  aValue 
)

Set the parameter identified by the name.

Mainly used to set parameters from the command line

Parameters
aNameName of the parameter to be set (currently: "bin", "part", "idx")
aValueString representation of the value to be set (internally it is converted to the needed data type)
Exceptions
CrystalFpFatalIf the param name is invalid

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