opentl::models::Target Class Reference

Class representing a unique target instance It contains: More...

List of all members.

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.
Targetclone () 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::ObjModelobjModel () const
 Get object model of this target.
Targetoperator= (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::SquareMatrixstateCov () 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


Detailed Description

Class representing a unique target instance It contains:

Constructor & Destructor Documentation

opentl::models::Target::Target ( models::ObjModel objModel,
opentl::core::State stateTemplate,
int  nStates = 1 
)

Constructor.

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


Member Function Documentation

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.

Parameters:
uPartition position index
Returns:
Pointer to single state.

std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::activeStateVec (  )  [inline]

Get active state vector.

Returns:
Pointer to mActiveStateVec

double opentl::models::Target::activeWeight ( std::size_t  uPartition  )  const [inline]

Get weight of single state.

Parameters:
uPartition partition index for active states
Returns:
weight value.

std::vector<double>& opentl::models::Target::activeWeightVec (  )  [inline]

Get weight vector.

Returns:
weight vector for all active states.

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]

Get the unique ID of this target.

Returns:
Target ID

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.

Returns:
Number of partitions.

std::size_t opentl::models::Target::nofStates (  )  const [inline]

Get number of states in the distribution.

Returns:
Number of states.

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]

Get object model of this target.

Returns:
Pointer to ObjModel.

Target& opentl::models::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> opentl::models::Target::outputState (  )  const [inline]

Get output state (average).

Returns:
Pointer to output state.

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

Parameters:
nPartitions partitions count

void opentl::models::Target::resizeActiveStatePartitions ( std::size_t  uPartitionCount  ) 

Resize active state vector.

Parameters:
uPartitionCount new size of the vectors mActiveStates and mActiveWeights

void opentl::models::Target::resizeStateAuxVec ( int  size  ) 

Resize state distribution auxiliary vector.

Parameters:
size new size of the vector

void opentl::models::Target::resizeStateVec ( int  size  ) 

Resize state distribution vector.

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

Parameters:
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

Parameters:
uPartition partition index
weight value.

void opentl::models::Target::setOutputState ( opentl::core::State state  )  [inline]

Set single state of the internal distribution.

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

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

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

Parameters:
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

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

Parameters:
i position index
Returns:
Pointer to single state.

boost::shared_ptr<opentl::core::State> opentl::models::Target::stateAux ( std::size_t  i  )  const [inline]

Get single state of the internal auxiliary distribution.

Parameters:
i position index
Returns:
boost shared pointer to single state.

std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::stateAuxVec (  )  const [inline]

Get internal state auxiliary distribution.

Returns:
Pointer to mStatesAux

math::SquareMatrix* opentl::models::Target::stateCov (  )  const [inline]

Get internal state covariance.

Returns:
Pointer to mStateCov.

std::vector<boost::shared_ptr<opentl::core::State> >* opentl::models::Target::stateVec (  )  const [inline]

Get internal state distribution.

Returns:
Pointer to mStates

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.

Returns:
Weight value.

std::vector<double>& opentl::models::Target::weightVec (  )  [inline]

Get weight vector.

Returns:
Weight vector.


Generated on Fri Jul 31 17:38:39 2009 for OpenTL by  doxygen 1.5.8