Package org.gephi.graph.api
Interface GraphFactory
-
public interface GraphFactory
Factory for nodes and edges.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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Edge
newEdge(Object id, Node source, Node target, int type, double weight, boolean directed)
Creates and returns an edge between source and target.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.Node
newNode()
Creates and returns a node.Node
newNode(Object id)
Creates and returns a node.
-
-
-
Method Detail
-
newEdge
Edge newEdge(Node source, Node target)
Creates and returns a directed edge between source and target.- Parameters:
source
- the source nodetarget
- the target node- Returns:
- the new edge
-
newEdge
Edge newEdge(Node source, Node target, boolean directed)
Creates and returns an edge between source and target.- Parameters:
source
- the source nodetarget
- the target nodedirected
- true if directed, false if undirected- Returns:
- the new edge
-
newEdge
Edge newEdge(Node source, Node target, int type, boolean directed)
Creates and returns an edge between source and target.- Parameters:
source
- the source nodetarget
- the target nodetype
- the edge typedirected
- true if directed, false if undirected- Returns:
- the new edge
-
newEdge
Edge newEdge(Node source, Node target, int type, double weight, boolean directed)
Creates and returns an edge between source and target.- Parameters:
source
- the source nodetarget
- the target nodetype
- the edge typeweight
- the edge weightdirected
- true if directed, false if undirected- Returns:
- the new edge
-
newEdge
Edge newEdge(Object id, Node source, Node target, int type, double weight, boolean directed)
Creates and returns an edge between source and target.- Parameters:
id
- the edge idsource
- the source nodetarget
- the target nodetype
- the edge typeweight
- the edge weightdirected
- true if directed, false if undirected- Returns:
- the new edge
-
newNode
Node newNode()
Creates and returns a node.- Returns:
- the new node
-
-