#include <searchState.h>
Public Member Functions | |
void | addParameter (QString name, double value) |
virtual void | changeHand (const Hand *h, bool sticky=false) |
void | copyValuesFrom (const VariableSet *s) |
virtual double | distance (const VariableSet *s) const |
const SearchVariable * | getConstVariable (QString name) const |
int | getNumUsedVariables () const |
int | getNumVariables () const |
double | getParameter (QString name) const |
virtual StateType | getType () const =0 |
SearchVariable * | getVariable (QString name) |
const SearchVariable * | getVariable (int i) const |
SearchVariable * | getVariable (int i) |
void | print () const |
bool | readFromArray (std::vector< double > array) |
bool | readFromFile (FILE *fp) |
double | readVariable (QString name) const |
double | readVariable (int i) const |
void | removeParameter (QString name) |
void | reset () |
void | setAllConfidences (double c) |
void | setAllFixed (bool f) |
void | setParameter (QString name, double value) |
VariableSet (const VariableSet &vs) | |
VariableSet (const Hand *h) | |
void | writeToFile (FILE *fp) const |
virtual | ~VariableSet () |
Protected Member Functions | |
void | clearVariables () |
virtual void | createVariables ()=0 |
Implementations of VariableSet that know what purpose they serve will implement this. | |
Protected Attributes | |
const Hand * | mHand |
The hand pointer shouldn't really be here. | |
std::vector< SearchParameter > | mParameters |
The parameters in the set. | |
std::vector< SearchVariable * > | mVariables |
The variables in the set. |
A VariableSet is a collection of multiple variables and parameters. It manages the list of variables, can read and write itself to a file, etc.
Definition at line 114 of file searchState.h.
VariableSet::VariableSet | ( | const Hand * | h | ) | [inline] |
Definition at line 130 of file searchState.h.
VariableSet::VariableSet | ( | const VariableSet & | vs | ) |
Definition at line 74 of file searchState.cpp.
VariableSet::~VariableSet | ( | ) | [virtual] |
Definition at line 69 of file searchState.cpp.
void VariableSet::addParameter | ( | QString | name, | |
double | value | |||
) |
Definition at line 193 of file searchState.cpp.
void VariableSet::changeHand | ( | const Hand * | h, | |
bool | sticky = false | |||
) | [virtual] |
Definition at line 94 of file searchState.cpp.
void VariableSet::clearVariables | ( | ) | [protected] |
Definition at line 86 of file searchState.cpp.
void VariableSet::copyValuesFrom | ( | const VariableSet * | s | ) | [inline] |
Definition at line 408 of file searchState.h.
virtual void VariableSet::createVariables | ( | ) | [protected, pure virtual] |
Implementations of VariableSet that know what purpose they serve will implement this.
Implemented in AttributeSet, PostureStateEigen, PostureStateDOF, PositionStateComplete, PositionStateAA, PositionStateEllipsoid, and PositionStateApproach.
double VariableSet::distance | ( | const VariableSet * | s | ) | const [virtual] |
Right now we define the distance as the max distance between any two variables. Alternatively, the mean distance between all variables could also be used. For position states we could also look at the distance in actual position.
Definition at line 287 of file searchState.cpp.
const SearchVariable * VariableSet::getConstVariable | ( | QString | name | ) | const |
Definition at line 143 of file searchState.cpp.
int VariableSet::getNumUsedVariables | ( | ) | const |
Definition at line 124 of file searchState.cpp.
int VariableSet::getNumVariables | ( | ) | const [inline] |
Definition at line 139 of file searchState.h.
double VariableSet::getParameter | ( | QString | name | ) | const |
Definition at line 178 of file searchState.cpp.
virtual StateType VariableSet::getType | ( | ) | const [pure virtual] |
Implemented in AttributeSet, PostureStateEigen, PostureStateDOF, PositionStateComplete, PositionStateAA, PositionStateEllipsoid, and PositionStateApproach.
SearchVariable * VariableSet::getVariable | ( | QString | name | ) |
Definition at line 133 of file searchState.cpp.
const SearchVariable* VariableSet::getVariable | ( | int | i | ) | const [inline] |
Definition at line 142 of file searchState.h.
SearchVariable* VariableSet::getVariable | ( | int | i | ) | [inline] |
Definition at line 141 of file searchState.h.
void VariableSet::print | ( | ) | const |
Definition at line 313 of file searchState.cpp.
bool VariableSet::readFromArray | ( | std::vector< double > | array | ) |
Definition at line 266 of file searchState.cpp.
bool VariableSet::readFromFile | ( | FILE * | fp | ) |
Definition at line 232 of file searchState.cpp.
double VariableSet::readVariable | ( | QString | name | ) | const |
Definition at line 153 of file searchState.cpp.
double VariableSet::readVariable | ( | int | i | ) | const [inline] |
Definition at line 145 of file searchState.h.
void VariableSet::removeParameter | ( | QString | name | ) |
Definition at line 208 of file searchState.cpp.
void VariableSet::reset | ( | ) | [inline] |
Sets all variables to 0 (regardless of whether 0 is inside the legal range of this variable), the fixed flag to false and the confidence to 0.0
Definition at line 423 of file searchState.h.
void VariableSet::setAllConfidences | ( | double | c | ) |
Definition at line 108 of file searchState.cpp.
void VariableSet::setAllFixed | ( | bool | f | ) |
Definition at line 116 of file searchState.cpp.
void VariableSet::setParameter | ( | QString | name, | |
double | value | |||
) |
Definition at line 163 of file searchState.cpp.
void VariableSet::writeToFile | ( | FILE * | fp | ) | const |
Definition at line 223 of file searchState.cpp.
const Hand* VariableSet::mHand [protected] |
The hand pointer shouldn't really be here.
At this level nobody cares about that, but it was easier like this.
Definition at line 123 of file searchState.h.
std::vector<SearchParameter> VariableSet::mParameters [protected] |
The parameters in the set.
Definition at line 120 of file searchState.h.
std::vector<SearchVariable*> VariableSet::mVariables [protected] |
The variables in the set.
Definition at line 118 of file searchState.h.