Skip to content

EdgeAttr dataclass

EdgeAttr(
    edge_type: Any = None,
    layout: EdgeLayout = "coo",
    is_sorted: bool = False,
    size: Optional[tuple[int, int]] = None,
)

Identifies the edges of a GraphStore.

Parameters:

Name Type Description Default
edge_type Any

Type of the edges, None for homogeneous graphs.

None
layout EdgeLayout

"coo" ((row, col)), "csc" ((row, colptr)) or "csr" ((rowptr, col)), as in PyG.

'coo'
is_sorted bool

Whether COO edges are sorted by destination node.

False
size Optional[tuple[int, int]]

(num_src_nodes, num_dst_nodes).

None

from mlx_graphs.data import EdgeAttr · mlx_graphs/data/graph_store.py