compas.topology

Package containing topological algorithms for traversal, connectivity, combinatorics, etc.

Functions

adjacency_from_edges

Construct an adjacency dictionary from a set of edges.

astar_lightest_path

Find the path of least weight between two vertices of a graph using the A* search algorithm.

astar_shortest_path

Find the shortest path between two vertices of a graph or mesh using the A* search algorithm.

breadth_first_ordering

Compute a breadth-first ordering of the nodes of a graph, starting from a root node.

breadth_first_paths

Return all paths from root to goal.

breadth_first_traverse

Traverse an adjacency dict in "breadth-first" order.

connected_components

Identify the connected components of a graph.

depth_first_ordering

Compute a depth-first ordering of the nodes of a graph, starting from a root node.

dijkstra_distances

Compute Dijkstra distances from all nodes in a graph to one target node.

dijkstra_path

Find the shortest path between two nodes of a graph if the weights of the connecting edges are not all the same.

face_adjacency

Construct an adjacency dictionary of the given faces, assuming that the faces have arbitrary orientation.

shortest_path

Find the shortest path between two vertices of a network.

unify_cycles

Unify the cycle directions of the given faces such that adjacent faces share opposite halfedges.

vertex_coloring

Color the vertices of a graph such that no two colors are adjacent.

Functions using Numpy

In environments where numpy is not available, these functions can still be accessed through RPC.

face_adjacency_numpy

Construct an adjacency dictionary of the given faces, assuming that the faces have arbitrary orientation.

unify_cycles_numpy

Unify the cycle directions of the given faces such that adjacent faces share opposite halfedges.