public interface GraphFactory
All new nodes and edges are created by this factory.
Both nodes and edges have unique identifiers. If not provided, a unique id will be automatically assigned to the elements.
Modifier and Type | Method and Description |
---|---|
Edge |
newEdge(Node source,
Node target)
Creates and returns a directed edge between source and target.
|
Edge |
newEdge(Node source,
Node target,
boolean directed)
Creates and returns an edge between source and target.
|
Edge |
newEdge(Node source,
Node target,
int type,
boolean directed)
Creates and returns an edge between source and target.
|
Edge |
newEdge(Node source,
Node target,
int type,
double weight,
boolean directed)
Creates and returns an edge between source and target.
|
Edge |
newEdge(Object id,
Node source,
Node target,
int type,
double weight,
boolean directed)
Creates and returns an edge between source and target.
|
Node |
newNode()
Creates and returns a node.
|
Node |
newNode(Object id)
Creates and returns a node.
|
Edge newEdge(Node source, Node target)
source
- the source nodetarget
- the target nodeEdge newEdge(Node source, Node target, boolean directed)
source
- the source nodetarget
- the target nodedirected
- true if directed, false if undirectedEdge newEdge(Node source, Node target, int type, boolean directed)
source
- the source nodetarget
- the target nodetype
- the edge typedirected
- true if directed, false if undirectedEdge newEdge(Node source, Node target, int type, double weight, boolean directed)
source
- the source nodetarget
- the target nodetype
- the edge typeweight
- the edge weightdirected
- true if directed, false if undirectedEdge newEdge(Object id, Node source, Node target, int type, double weight, boolean directed)
id
- the edge idsource
- the source nodetarget
- the target nodetype
- the edge typeweight
- the edge weightdirected
- true if directed, false if undirectedNode newNode()
Copyright © 2007–2015 Gephi Consortium. All rights reserved.