Skip to main content

Crate oxgraph_graph

Crate oxgraph_graph 

Source
Expand description

Storage-agnostic traits for binary graph views.

oxgraph-graph is the binary graph specialization above oxgraph-topology. Use it to write generic graph consumers over node/edge vocabulary: endpoint lookup, outgoing traversal, incoming traversal, and degree queries.

Graph views use topology elements as nodes and topology relations as edges. Implement concrete layouts, snapshots, builders, mutation systems, payloads, and algorithms in higher-level crates by implementing these read-view capabilities.

§Performance contract

Most of the traits and aliases in this crate are graph-vocabulary shadows of topology traits. Unless a specific item documents otherwise, every method, iterator, and alias inherits its performance contract from the underlying topology trait it shadows: O(1) for accessors, O(1) to construct an iterator plus O(k) to yield k items, and perf: unspecified for capability-bundle marker traits and blanket impls.

Traits§

CanonicalElementIdentity
Optional local-to-canonical element identity capability.
CanonicalIncidenceIdentity
Optional local-to-canonical incidence identity capability.
CanonicalRelationIdentity
Optional local-to-canonical relation identity capability.
ContainsEdge
Edge-ID containment capability for graph views.
ContainsElement
Element-ID containment capability for a topology view.
ContainsEndpoint
Endpoint-ID containment capability for graph views with incidences.
ContainsIncidence
Incidence-ID containment capability for an incidence-capable topology view.
ContainsNode
Node-ID containment capability for graph views.
ContainsRelation
Relation-ID containment capability for a topology view.
DirectedGraph
Convenience marker bundling endpoint resolution and both traversal directions. One-direction layouts should implement the smaller capability traits they can provide instead.
EdgeEndpointGraph
Capability for resolving both directed edge endpoints.
EdgeIndex
Dense edge-index capability for graph views.
EdgeSourceGraph
Capability for resolving directed edge sources.
EdgeTargetGraph
Capability for resolving directed edge targets.
ElementIncidenceCount
Exact element-incidence count capability.
ElementIncidences
Capability for traversing incidences attached to an element.
ElementIndex
Dense element-index capability for topology views.
ElementPredecessors
Capability for expanding an element to its directed predecessor elements.
ElementSuccessors
Capability for expanding an element to its directed successor elements.
ElementWeight
Optional total weight capability for topology elements.
EndpointIndex
Dense endpoint-index capability for graph views with incidences.
ForwardGraph
Convenience marker for forward directed graph traversal (target lookup + outgoing edge iteration).
GraphBase
Base capability for graph views over topology storage.
GraphCounts
Count capability for a graph view.
IncidenceBase
Incidence identity and role vocabulary for topology views with incidences.
IncidenceCounts
Count capability for incidence-capable topology views.
IncidenceElement
Capability for resolving the element side of an incidence.
IncidenceIndex
Dense incidence-index capability for topology views.
IncidenceRelation
Capability for resolving the relation side of an incidence.
IncidenceRole
Capability for resolving a role attached to an incidence.
IncidenceWeight
Optional total weight capability for topology incidences.
IncomingEdgeCount
Exact incoming-edge count capability.
IncomingGraph
Capability for traversing incoming edges to a target node.
IncomingNeighborsGraph
Capability for traversing directly preceding incoming neighbor nodes.
LocalElementIdentity
Optional canonical-to-local element identity capability.
LocalIncidenceIdentity
Optional canonical-to-local incidence identity capability.
LocalRelationIdentity
Optional canonical-to-local relation identity capability.
NodeIndex
Dense node-index capability for graph views.
OutgoingEdgeCount
Exact outgoing-edge count capability.
OutgoingGraph
Capability for traversing outgoing edges from a source node.
OutgoingNeighborsGraph
Capability for traversing directly reachable outgoing neighbor nodes.
RelationIncidenceCount
Exact relation-incidence count capability.
RelationIncidences
Capability for traversing incidences attached to a relation.
RelationIndex
Dense relation-index capability for topology views.
RelationWeight
Optional total weight capability for topology relations.
ReverseGraph
Convenience marker for reverse directed graph traversal (source lookup + incoming edge iteration). Expected to be provided by CSC-backed views.
TopologyBase
Common element and relation identity vocabulary for a topology view.
TopologyCounts
Count capability for a topology view.
TopologyId
Marker trait for compact topology identity handles.

Type Aliases§

EdgeId
Graph-facing alias for a topology relation ID (binary graph edge).
EndpointId
Graph-facing alias for a topology incidence ID (binary graph endpoint).
EndpointRole
Graph-facing alias for a topology role used to distinguish source and target endpoint participation on graph views that expose incidences.
NodeId
Graph-facing alias for a topology element ID (binary graph node).