|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.net.graph.Link
The class defines data structure that describes an "edge" of a graph. It can be directional or un-directional. A link may be "marked" for general purpose.
| Constructor Summary | |
Link()
|
|
Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_)
|
|
Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
boolean directional_)
|
|
Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_)
|
|
Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_,
boolean directional_)
|
|
Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_,
double len_)
|
|
Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_,
double len_,
boolean directional_)
|
|
Link(int id_,
Node n1_,
Node n2_)
|
|
Link(int id_,
Node n1_,
Node n2_,
boolean directional_)
|
|
Link(int id_,
Node n1_,
Node n2_,
double cost_,
double len_)
|
|
Link(int id_,
Node n1_,
Node n2_,
double cost_,
double len_,
boolean directional_)
|
|
| Method Summary | |
void |
disconnect()
Removes itself from both end nodes. |
double |
getCost()
Returns the link cost. |
int |
getID()
|
int |
getInterfaceId(Node n)
Returns the interface Id of this link on node n. |
double |
getLength()
Returns the length of the link. |
boolean |
isDirectional()
Returns true if it is a directional link. |
boolean |
isMarked()
Returns true if this link is marked. |
Node |
neighbor(Node n)
Returns n's neighbor node thru this link. |
Node[] |
nodes()
Returns the end nodes of this link. |
void |
setCost(double cost_)
Sets the link cost. |
void |
setLength(double len_)
Sets the length of the link. |
void |
setMarked(boolean marked_)
Mark/unmark this link. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Link()
public Link(int id_,
Node n1_,
Node n2_)
public Link(int id_,
Node n1_,
Node n2_,
boolean directional_)
public Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_)
public Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
boolean directional_)
public Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_)
public Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_,
boolean directional_)
public Link(int id_,
Node n1_,
Node n2_,
double cost_,
double len_)
public Link(int id_,
Node n1_,
Node n2_,
double cost_,
double len_,
boolean directional_)
public Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_,
double len_)
public Link(int id_,
Node n1_,
int n1InterfaceId_,
Node n2_,
int n2InterfaceId_,
double cost_,
double len_,
boolean directional_)
| Method Detail |
public int getID()
public Node[] nodes()
public Node neighbor(Node n)
public int getInterfaceId(Node n)
public double getCost()
public void setCost(double cost_)
public double getLength()
public void setLength(double len_)
public void disconnect()
public void setMarked(boolean marked_)
public boolean isMarked()
public boolean isDirectional()
public java.lang.String toString()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||