|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.mipav.model.structures.DijkstraCostItem
public class DijkstraCostItem
Contains information for a point used in the the Dijkstra minimum cost path algorithm. This class implements the Comparable interface which is required of any node to be inserted in any SortedSet implementation which is required for finding a minimum cost path.
Field Summary | |
---|---|
static int |
KEY_UNDEFINED
Identifies an undefined key value. |
Constructor Summary | |
---|---|
DijkstraCostItem(int iKey)
Setup to associate this instance with a particular sample in the volume. |
Method Summary | |
---|---|
int |
compareTo(Object kObject)
Implementation required by the Comparable interface. |
float |
getCost()
Get the current accumulated cost. |
float |
getDistance()
Get the current accumulated distance. |
int |
getKey()
Get the unique key identifier associated with this point. |
int |
getKeyPrev()
Get the unique key value for the point which is used to get to this point along the minimum cost path. |
int |
getNumPrev()
Get the number of samples along the current minimum cost path that preceed this sample in the volume. |
boolean |
isFinalized()
Test whether or not the sample has had its cost finalized. |
void |
markFinalized()
Mark the sample as having its cost finalized, meaning that it can no longer be updated. |
void |
markStart()
Mark this sample as the beginning of the minimum cost path. |
void |
update(float fCost,
float fDistance,
int iKeyPrev,
int iNumPrev)
Mark this node as being visited along the minimum cost path if not already done so, but only if the point has not been marked as having its distance finalized. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int KEY_UNDEFINED
Constructor Detail |
---|
public DijkstraCostItem(int iKey)
iKey
- Value uniquely identifying this point.Method Detail |
---|
public int compareTo(Object kObject)
compareTo
in interface Comparable
kObject
- the object to be compared
public float getCost()
public float getDistance()
public int getKey()
public int getKeyPrev()
public int getNumPrev()
public boolean isFinalized()
public void markFinalized()
public void markStart()
public void update(float fCost, float fDistance, int iKeyPrev, int iNumPrev)
fCost
- accumulated cost to update for this sample; must not be negativefDistance
- accumulated distance to update for this sample; must not be negative.iKeyPrev
- Unique key value for the point which is used to get to this point along the minimum cost path.iNumPrev
- number of samples along the minimum cost path leading up to this sample. Should be one more
than the same field value for the point having key value iKeyPrev, if there is such a previous
point.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |