Public Member Functions | |
virtual int | acquireId () |
Acquire a new target id for this target instance. The id will be stored in the current target instance. | |
boost::shared_ptr < opentl::core::State > | activeState (std::size_t uPartition) const |
Get single state of the active states vector. | |
std::vector< boost::shared_ptr < opentl::core::State > > * | activeStateVec () |
Get active state vector. | |
double | activeWeight (std::size_t uPartition) const |
Get weight of single state. | |
std::vector< double > & | activeWeightVec () |
Get weight vector. | |
Target * | clone () const |
Create new instance of this class. | |
int | getTargetId () const |
Get the unique ID of this target. | |
std::size_t | nActiveStatePartitions () const |
Get number of partitions. | |
std::size_t | nofStates () const |
Get number of states in the distribution. | |
void | normalizeWeights () |
Normalize weight vector (sum to 1.0). | |
models::ObjModel & | objModel () const |
Get object model of this target. | |
Target & | operator= (const Target &target) |
Assignment operator: copy internal states and weights from another target (but NOT the ID!). | |
boost::shared_ptr < opentl::core::State > | outputState () const |
Get output state (average). | |
virtual void | releaseId () |
Release a target id (should be called before the _real_ target (not the hypotheses of this target) are destroyed! | |
void | resizeActivePartitions (std::size_t nPartitions) |
resizes the number of partitions of the active states and the ActiveWeights vectors | |
void | resizeActiveStatePartitions (std::size_t uPartitionCount) |
Resize active state vector. | |
void | resizeStateAuxVec (int size) |
Resize state distribution auxiliary vector. | |
void | resizeStateVec (int size) |
Resize state distribution vector. | |
void | setActiveState (std::size_t uPartition, boost::shared_ptr< opentl::core::State > state) |
Set single state of the internal active State. | |
void | setActiveWeight (std::size_t uPartition, double weight) |
set weight of single state in active state set | |
void | setOutputState (opentl::core::State &state) |
Set single state of the internal distribution. | |
void | setState (opentl::core::State &state, std::size_t i) |
Set single state of the internal distribution. | |
void | setStateAux (opentl::core::State &state, std::size_t i) |
Set single state of the internal auxiliary distribution. | |
void | setStateCov (const math::SquareMatrix &cov) |
Set internal state covariance. | |
void | setStateVec (std::vector< boost::shared_ptr< opentl::core::State > > &stateVec) |
Set internal state distribution (Use it with care, you are responsible to delete the orignal State pointer. The vector will get deleted at destruction time of the Target class instance). | |
void | setWeight (std::size_t i, double weight) |
set weight of single state | |
boost::shared_ptr < opentl::core::State > | state (std::size_t i) const |
Get single state of the internal distribution. | |
boost::shared_ptr < opentl::core::State > | stateAux (std::size_t i) const |
Get single state of the internal auxiliary distribution. | |
std::vector< boost::shared_ptr < opentl::core::State > > * | stateAuxVec () const |
Get internal state auxiliary distribution. | |
math::SquareMatrix * | stateCov () const |
Get internal state covariance. | |
std::vector< boost::shared_ptr < opentl::core::State > > * | stateVec () const |
Get internal state distribution. | |
void | swapStateAndAuxVec () |
Swap the internal vectors mStates and mStatesAux. | |
Target (const Target &target) | |
Copy constructor. Initialize object with existing target object. | |
Target (models::ObjModel &objModel, opentl::core::State &stateTemplate, int nStates=1) | |
Constructor. | |
double | weight (std::size_t i) const |
Get weight of single state. | |
std::vector< double > & | weightVec () |
Get weight vector. | |
virtual | ~Target () |
Destructor. | |
Static Public Member Functions | |
static std::size_t | freeIdCount () |
Get number of remaining free ids. | |
static std::size_t | maxNoTargets () |
get maximum number of target ids | |
static std::size_t | noTargets () |
get total number of currently active target ids |
opentl::models::Target::Target | ( | models::ObjModel & | objModel, | |
opentl::core::State & | stateTemplate, | |||
int | nStates = 1 | |||
) |
Constructor.
objModel | Object model related to this target (includes all information. and the State type) | |
stateTemplate | Template for building the state vector inside | |
nStates | (optional) Number of states of the distribution vector |
opentl::models::Target::Target | ( | const Target & | target | ) |
Copy constructor. Initialize object with existing target object.
virtual opentl::models::Target::~Target | ( | ) | [virtual] |
Destructor.
virtual int opentl::models::Target::acquireId | ( | ) | [virtual] |
Acquire a new target id for this target instance. The id will be stored in the current target instance.
boost::shared_ptr<opentl::core::State> opentl::models::Target::activeState | ( | std::size_t | uPartition | ) | const [inline] |
Get single state of the active states vector.
uPartition | position index |
std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::activeStateVec | ( | ) | [inline] |
Get active state vector.
double opentl::models::Target::activeWeight | ( | std::size_t | uPartition | ) | const [inline] |
Get weight of single state.
uPartition | partition index for active states |
std::vector<double>& opentl::models::Target::activeWeightVec | ( | ) | [inline] |
Get weight vector.
Target* opentl::models::Target::clone | ( | ) | const [inline] |
Create new instance of this class.
static std::size_t opentl::models::Target::freeIdCount | ( | ) | [static] |
Get number of remaining free ids.
int opentl::models::Target::getTargetId | ( | ) | const [inline] |
static std::size_t opentl::models::Target::maxNoTargets | ( | ) | [static] |
get maximum number of target ids
std::size_t opentl::models::Target::nActiveStatePartitions | ( | ) | const [inline] |
Get number of partitions.
std::size_t opentl::models::Target::nofStates | ( | ) | const [inline] |
Get number of states in the distribution.
void opentl::models::Target::normalizeWeights | ( | ) |
Normalize weight vector (sum to 1.0).
static std::size_t opentl::models::Target::noTargets | ( | ) | [static] |
get total number of currently active target ids
models::ObjModel& opentl::models::Target::objModel | ( | ) | const [inline] |
Assignment operator: copy internal states and weights from another target (but NOT the ID!).
boost::shared_ptr<opentl::core::State> opentl::models::Target::outputState | ( | ) | const [inline] |
virtual void opentl::models::Target::releaseId | ( | ) | [virtual] |
Release a target id (should be called before the _real_ target (not the hypotheses of this target) are destroyed!
void opentl::models::Target::resizeActivePartitions | ( | std::size_t | nPartitions | ) | [inline] |
resizes the number of partitions of the active states and the ActiveWeights vectors
nPartitions | partitions count |
void opentl::models::Target::resizeActiveStatePartitions | ( | std::size_t | uPartitionCount | ) |
Resize active state vector.
uPartitionCount | new size of the vectors mActiveStates and mActiveWeights |
void opentl::models::Target::resizeStateAuxVec | ( | int | size | ) |
Resize state distribution auxiliary vector.
size | new size of the vector |
void opentl::models::Target::resizeStateVec | ( | int | size | ) |
Resize state distribution vector.
size | new size of the vector |
void opentl::models::Target::setActiveState | ( | std::size_t | uPartition, | |
boost::shared_ptr< opentl::core::State > | state | |||
) | [inline] |
Set single state of the internal active State.
uPartition | set the value to state with index uPartition. | |
state | New state value. |
void opentl::models::Target::setActiveWeight | ( | std::size_t | uPartition, | |
double | weight | |||
) | [inline] |
set weight of single state in active state set
uPartition | partition index | |
weight | value. |
void opentl::models::Target::setOutputState | ( | opentl::core::State & | state | ) | [inline] |
Set single state of the internal distribution.
state | New state value. | |
i | set the value to state with index i. |
void opentl::models::Target::setState | ( | opentl::core::State & | state, | |
std::size_t | i | |||
) | [inline] |
Set single state of the internal distribution.
state | New state value. | |
i | set the value to state with index i. |
void opentl::models::Target::setStateAux | ( | opentl::core::State & | state, | |
std::size_t | i | |||
) | [inline] |
Set single state of the internal auxiliary distribution.
state | New state value. | |
i | set the value to state with index i. |
void opentl::models::Target::setStateCov | ( | const math::SquareMatrix & | cov | ) | [inline] |
Set internal state covariance.
cov | New covariance value. |
void opentl::models::Target::setStateVec | ( | std::vector< boost::shared_ptr< opentl::core::State > > & | stateVec | ) | [inline] |
Set internal state distribution (Use it with care, you are responsible to delete the orignal State pointer. The vector will get deleted at destruction time of the Target class instance).
void opentl::models::Target::setWeight | ( | std::size_t | i, | |
double | weight | |||
) | [inline] |
set weight of single state
i | Index inside the vector | |
weight | value. |
boost::shared_ptr<opentl::core::State> opentl::models::Target::state | ( | std::size_t | i | ) | const [inline] |
Get single state of the internal distribution.
i | position index |
boost::shared_ptr<opentl::core::State> opentl::models::Target::stateAux | ( | std::size_t | i | ) | const [inline] |
Get single state of the internal auxiliary distribution.
i | position index |
std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::stateAuxVec | ( | ) | const [inline] |
Get internal state auxiliary distribution.
math::SquareMatrix* opentl::models::Target::stateCov | ( | ) | const [inline] |
Get internal state covariance.
std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::stateVec | ( | ) | const [inline] |
Get internal state distribution.
void opentl::models::Target::swapStateAndAuxVec | ( | ) | [inline] |
Swap the internal vectors mStates and mStatesAux.
double opentl::models::Target::weight | ( | std::size_t | i | ) | const [inline] |
Get weight of single state.
std::vector<double>& opentl::models::Target::weightVec | ( | ) | [inline] |
Get weight vector.