|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Path
Class for describing a path in a graph
Field Summary | |
---|---|
static int |
ADD_ACTOR
|
static int |
SET_PATH
|
static int |
WEAK
|
Method Summary | |
---|---|
Path |
addActor(Actor a,
double cost)
Create a new path that contains all the contents of this path plus an additional link to the given actor with the additional cost given. |
boolean |
contains(Actor node)
returns if the path contains the given actor |
double |
getCost()
return the total cost of this path |
Actor |
getEnd()
return the last actor in this path |
Actor[] |
getMiddle()
return all actors that are neither the start or end actors. |
Actor[] |
getPath()
Returns the order array of the actors in this object. |
Actor |
getStart()
Return the first actor in the path |
java.lang.String |
getType()
Returns the PathSet id of this path |
boolean |
isWeak()
returns if this path ever traverses a link in the wrong direction. |
void |
setPath(Actor[] participants,
double cost,
java.lang.String type)
Create a path that goes through the following actors in order with a total cost and given id representing this PathSet id. |
void |
setWeak(boolean weak)
Set that the path traverses the wrong direction on at least one link between actors. |
Methods inherited from interface nz.ac.waikato.mcennis.rat.graph.model.Model |
---|
addListener |
Field Detail |
---|
static final int WEAK
static final int ADD_ACTOR
static final int SET_PATH
Method Detail |
---|
void setPath(Actor[] participants, double cost, java.lang.String type)
participants
- actors in this path in ordercost
- total cost (strength) of this pathtype
- PathSet id of this pathActor[] getPath() throws NotConstructedError
NotConstructedError
Actor getStart() throws NotConstructedError
NotConstructedError
Actor getEnd() throws NotConstructedError
NotConstructedError
Actor[] getMiddle() throws NotConstructedError
NotConstructedError
double getCost() throws NotConstructedError
NotConstructedError
boolean isWeak() throws NotConstructedError
NotConstructedError
void setWeak(boolean weak)
weak
- boolean contains(Actor node) throws NotConstructedError
node
- actor to be checked
NotConstructedError
java.lang.String getType() throws NotConstructedError
NotConstructedError
Path addActor(Actor a, double cost) throws NotConstructedError
a
- actor to be addedcost
- cost to be added to the path cost
NotConstructedError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |