structify_net.zoo.sort_distances
- structify_net.zoo.sort_distances(nodes, dimensions=1, distance='euclidean')
Rank model based on the distance between nodes
Also called spatial or geometric network, this rank model is based on the distance between nodes. The distance is defined by the distance function, and the dimensions are defined by the attributes of the nodes. By default, a single dimension is used, and the distance is the euclidean distance.
- Args:
nodes (_type_): describe nodes of the graphs, either as a networkx graph (node names and node attributes are preserved) or an integer (number of nodes) dimensions (int, optional): number of dimensions in which to embed the graph. Defaults to 1. distance (_type_, optional): distance function. Defaults to euclidean.
- Returns:
structify_net.Rank_model
:: The corresponding rank model