class Role(IntEnum) Values
UNKNOWN | 0 | |
|---|---|---|
SOURCE | 1 | |
TARGET | 2 | |
ANY | 3 |
graph_write_edges, graph_remove_edges, graph_write_vertices and graph_remove_vertices edit a graph collection, while graph_read_edges answers Neighborhoods and graph_degrees the degree of every vertex, with None where a vertex is absent.
An edge is a source, a target and an optional identifier, so distinct identifiers let a pair of vertices share several edges, and one without an identifier takes ustore.edge_id_default. ustore.graph_view.DiGraph and Graph mirror NetworkX over these verbs and over document collections holding the attributes of vertices and edges.
RoleThe role a vertex plays in an edge, valued as ustore_vertex_role_t.NeighborhoodsThe edges one batch read found around its vertices, viewing its Arena until it rewinds.3class Neighborhoods __dlpack__A DLPack capsule over the memory the buffer protocol exports, pinning the arena until its consumer deletes it, so numpy.from_dlpack reads it in place.def __dlpack__(
*,
stream: object | None = None,
max_version: tuple[int, int] | None = None,
dl_device: tuple[int, int] | None = None,
copy: bool | None = None,
) -> object __dlpack_device__The DLPack device of the arena: (1, 0) for host pages, (2, ordinal) for NVIDIA, (10, ordinal) for AMD.def __dlpack_device__() -> tuple[int, int] degreesdegrees: tuple[int | None, ...] edge_id_defaultedge_id_default: UUID