public class ConnMx extends Object implements Serializable
| Constructor and Description |
|---|
ConnMx(ConnMx source)
Copy constructor.
|
ConnMx(int nNodes) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(int from,
int to)
Adds an edge from node
from to node to |
void |
flip(int x,
int y)
Flips the direction of a node.
|
int[] |
getDestinations(int node)
Returns the destinations of the given node
|
int[] |
getSources()
Returns an array of source nodes, nodes with no incoming edges.
|
int[] |
getSources(int node)
Returns the sources of the given node
|
boolean |
isDirectedConnected(int from,
int to)
Returns if there exists a directed edge between the nodes, directed from
from to to |
boolean |
isUndirectedConnected(int from,
int to)
Returns if there exists an edge between the two nodes, pointing either
way
|
String |
toString() |
public ConnMx(int nNodes)
public ConnMx(ConnMx source)
public int[] getSources(int node)
public int[] getDestinations(int node)
public int[] getSources()
public void flip(int x,
int y)
public boolean isDirectedConnected(int from,
int to)
from to topublic boolean isUndirectedConnected(int from,
int to)
public void connect(int from,
int to)
from to node toCopyright © 2016. All rights reserved.