Utils¶
Functions of mlx_graphs.utils that work on edge indices, adjacency matrices
and node features, grouped by topic.
| Page | Contents |
|---|---|
| Transformations | Edge index and adjacency conversions, self-loops, undirected graphs, coalescing. |
| Graph utilities | Subgraphs, negative sampling, dropout, dense conversions and graph statistics. |
| Graph generators | Deterministic and random graph generators. |
| Sparse and array helpers | Conversions between dense, sparse and scipy representations, sparse softmax and indexing helpers. |
| Topology | Directed / undirected checks and number of hops. |
| Sorting | Sorting edge indices and building pointers. |
| Validators | Checks of edge indices, features and adjacency matrices. |
| Scatter | Scatter reductions and node degrees. |
| Array ops | Broadcasting, one-hot encoding, pairwise distances, masks. |
| Convert | Conversions to and from NetworkX and PyTorch Geometric. |
| Spatial graphs | Nearest neighbors and radius search. |