TopoNetX icon indicating copy to clipboard operation
TopoNetX copied to clipboard

Implement weights inside all complexes

Open ffl096 opened this issue 2 years ago • 0 comments

Many function signatures inside the individual complex classes are already prepared to consider weights (ref. #242), however the functionality behind these parameters is largely non-existent yet. This issue is meant to help keep track of the progress for this task.

Concept

The implementation would largely follow the concept used in NetworkX: Weights are just user-defined properties of the atoms in a complex. The functions take in a property name and considers the (numeric) values under this name as weights.

See for example nx.dijkstra_path().

Example

SC = SimplicialComplex()
SC.add_simplex((1, 2), distance=4)
SC.add_simplex((2, 3), distance=10)
_ = SC.coadjacency_matrix(rank=0, weight="distance")  # Use `distance` property on the simplices as weights

ffl096 avatar Sep 19 '23 16:09 ffl096