public class DefaultNetworkFactory extends GraphFactory<Node,Arc>
GraphFactory
Constructor and Description |
---|
DefaultNetworkFactory() |
Modifier and Type | Method and Description |
---|---|
Arc |
createEdge(Node predecessor,
Node successor)
Creates a new edge with a weight of zero.
|
Arc |
createEdge(Node predecessor,
Node successor,
boolean directed)
Creates a new edge.
|
Arc |
createEdge(Node predecessor,
Node successor,
boolean directed,
float weight)
Creates a new edge.
|
Arc |
createEdge(Node predecessor,
Node successor,
float weight)
Creates a new edge.
|
Node |
createVertex(java.lang.String caption)
Creates a new vertex.
|
public Node createVertex(java.lang.String caption) throws java.lang.IllegalArgumentException
GraphFactory
null
. Otherwise
no vertices can be created!createVertex
in class GraphFactory<Node,Arc>
caption
- the default caption (that is an unique index value for the current graph)java.lang.IllegalArgumentException
- public Arc createEdge(Node predecessor, Node successor) throws java.lang.IllegalArgumentException
GraphFactory
null
. Otherwise
no edges can be created!createEdge
in class GraphFactory<Node,Arc>
predecessor
- the predecessor of the edgesuccessor
- the successor of the edgejava.lang.IllegalArgumentException
- public Arc createEdge(Node predecessor, Node successor, boolean directed) throws java.lang.IllegalArgumentException
GraphFactory
null
. Otherwise
no edges can be created!createEdge
in class GraphFactory<Node,Arc>
predecessor
- the predecessor of the edgesuccessor
- the successor of the edgedirected
- flag that indicates whether the edge should be directed (true
) or undirected (false
) (has only an effect in mixed graphs otherwise the type of the edge is predefined)java.lang.IllegalArgumentException
- public Arc createEdge(Node predecessor, Node successor, float weight) throws java.lang.IllegalArgumentException
GraphFactory
null
. Otherwise
no edges can be created!createEdge
in class GraphFactory<Node,Arc>
predecessor
- the predecessor of the edgesuccessor
- the successor of the edgeweight
- the weight of the edgejava.lang.IllegalArgumentException
- public Arc createEdge(Node predecessor, Node successor, boolean directed, float weight) throws java.lang.IllegalArgumentException
GraphFactory
null
. Otherwise
no edges can be created!createEdge
in class GraphFactory<Node,Arc>
predecessor
- the predecessor of the edgesuccessor
- the successor of the edgedirected
- flag that indicates whether the edge should be directed (true
) or undirected (false
) (has only an effect in mixed graphs otherwise the type of the edge is predefined)weight
- the weight of the edgejava.lang.IllegalArgumentException
-