classPiiTrackerTrajectoryNode
#include <PiiTrackerTrajectoryNode.h>
A utility class that can be used as the Trajectory
type with PiiMultiHypothesisTracker.
Description
With this structure, trajectories are built as (singly) linked lists that support branching. This class is intended to be derived with the CRTP (curiously recurring template pattern):
class MyNode : public PiiTrackerTrajectoryNode<int,MyNode> { // ... your stuff here ... };
Public types
|
typedef Measurement
|
|
|
typedef Node
|
Constructors and destructor
|
(
Create a new node of a trajectory. |
|
|
Copy constructor. |
|
|
Create an empty trajectory node. |
|
|
virtual
|
Destroy a node. |
Public member functions
|
int
|
( )
Get the number of branches originating from (that is, references to) this node. |
|
int
|
( )
Get the length of the linked list from this node to the very end. |
|
int
|
( )
Get the length of the linked list from this point to the first branch. |
|
const Measurement &
|
( )
Get the actual measurement. |
|
Node *
|
( )
Get the next node in sequence. |
|
bool
|
Compare two nodes. |
|
int
|
( )
Get the measurement time. |
Protected member functions
|
Create an empty trajectory node. |
|
|
Copy constructor. |
|
|
(
Create a new node of a trajectory. |
|
|
virtual
|
Destroy a node. |
Function details
-
PiiTrackerTrajectoryNode
(- const MeasurementType & measurement
- int t
- Node * next
[inline, protected]Create a new node of a trajectory.
The constructor will increase the reference count on
next.Parameters
- measurement
-
the measurement through which the trajectory goes.
- t
-
the current time instant
- next
-
the next node in chain
-
Copy constructor.
-
PiiTrackerTrajectoryNode
()[inline, protected]Create an empty trajectory node.
-
virtual ~PiiTrackerTrajectoryNode
()[inline, protected, virtual]Destroy a node.
This destroys the whole linked list up to the first branch or to the very end, whichever comes first. This is done by decrementing the reference count of
nextand by deleting it when the count hits zero. -
int branches
()[inline]Get the number of branches originating from (that is, references to) this node.
If this is the head of a list, the value will be 0. If there is just one link, the value will be one and so on. A node can only be deleted when its branch count reaches zero.
-
int length
()[inline]Get the length of the linked list from this node to the very end.
-
int lengthToBranch
()Get the length of the linked list from this point to the first branch.
If the list is not branched, the return value will be equal to length().
-
const Measurement & measurement
()[inline]Get the actual measurement.
-
Node * next
()[inline]Get the next node in sequence.
-
Compare two nodes.
Nodes are equal if their time and measurement are equal.
-
int time
()[inline]Get the measurement time.
Add a note
Not a single note added yet. Be the first, add yours.