Graph.from_nodes_and_edges
- classmethod Graph.from_nodes_and_edges(nodes, edges)[source]
Construct a graph from nodes and edges.
- Parameters:
- nodeslist[list[float]] | dict[hashable, list[float]]
A list of node coordinates or a dictionary of keys pointing to node coordinates to specify keys.
- edgeslist[tuple[hashable, hshable]]
- Returns:
compas.datastructures.Graph
A graph object.
See also
to_nodes_and_edges()
from_obj()
,from_lines()
,from_pointcloud()