Skip to main content

CoreGraphOps

Trait CoreGraphOps 

Source
pub trait CoreGraphOps: Send + Sync {
Show 29 methods // Required method fn core_graph(&self) -> &GraphStorage; // Provided methods fn id_type(&self) -> Option<GidType> { ... } fn num_shards(&self) -> usize { ... } fn read_event_id(&self) -> usize { ... } fn unfiltered_num_nodes(&self) -> usize { ... } fn unfiltered_num_edges(&self) -> usize { ... } fn unfiltered_num_layers(&self) -> usize { ... } fn single_layer(&self, layer_ids: &LayerIds) -> Option<usize> { ... } fn core_edges(&self) -> EdgesStorage { ... } fn core_edge(&self, eid: EID) -> EdgeStorageEntry<'_> { ... } fn core_nodes(&self) -> NodesStorage { ... } fn core_node(&self, vid: VID) -> NodeStorageEntry<'_> { ... } fn node_meta(&self) -> &Meta { ... } fn edge_meta(&self) -> &Meta { ... } fn graph_meta(&self) -> &GraphMeta { ... } fn get_layer_name(&self, layer_id: usize) -> ArcStr { ... } fn get_layer_id(&self, name: &str) -> Option<usize> { ... } fn get_default_layer_id(&self) -> Option<usize> { ... } fn get_layer_names_from_ids( &self, layer_ids: &LayerIds, ) -> Box<dyn Iterator<Item = ArcStr> + Send + Sync> { ... } fn get_all_node_types(&self) -> Vec<ArcStr> { ... } fn node_id(&self, v: VID) -> GID { ... } fn node_name(&self, v: VID) -> String { ... } fn node_type(&self, v: VID) -> Option<ArcStr> { ... } fn node_type_id(&self, v: VID) -> usize { ... } fn internalise_node(&self, v: NodeRef<'_>) -> Option<VID> { ... } fn internalise_node_unchecked(&self, v: NodeRef<'_>) -> VID { ... } fn node_metadata(&self, v: VID, id: usize) -> Option<Prop> { ... } fn node_metadata_ids( &self, v: VID, ) -> Box<dyn Iterator<Item = usize> + Send + Sync + '_> { ... } fn temporal_node_prop_ids( &self, v: VID, ) -> Box<dyn Iterator<Item = usize> + '_> { ... }
}
Expand description

Core functions that should (almost-)always be implemented by pointing at the underlying graph.

Required Methods§

Provided Methods§

Source

fn id_type(&self) -> Option<GidType>

Source

fn num_shards(&self) -> usize

Source

fn read_event_id(&self) -> usize

get the current sequence id without incrementing the counter

Source

fn unfiltered_num_nodes(&self) -> usize

get the number of nodes in the main graph

Source

fn unfiltered_num_edges(&self) -> usize

get the number of edges in the main graph

Source

fn unfiltered_num_layers(&self) -> usize

get the number of layers in the main graph

Source

fn single_layer(&self, layer_ids: &LayerIds) -> Option<usize>

Return the id of the single layer if layer_ids reduces to a graph with a single layer, else None

Source

fn core_edges(&self) -> EdgesStorage

Source

fn core_edge(&self, eid: EID) -> EdgeStorageEntry<'_>

Source

fn core_nodes(&self) -> NodesStorage

Source

fn core_node(&self, vid: VID) -> NodeStorageEntry<'_>

Source

fn node_meta(&self) -> &Meta

Source

fn edge_meta(&self) -> &Meta

Source

fn graph_meta(&self) -> &GraphMeta

Source

fn get_layer_name(&self, layer_id: usize) -> ArcStr

Source

fn get_layer_id(&self, name: &str) -> Option<usize>

Source

fn get_default_layer_id(&self) -> Option<usize>

Source

fn get_layer_names_from_ids( &self, layer_ids: &LayerIds, ) -> Box<dyn Iterator<Item = ArcStr> + Send + Sync>

Get the layer name for a given id

Source

fn get_all_node_types(&self) -> Vec<ArcStr>

Get all node types

Source

fn node_id(&self, v: VID) -> GID

Returns the external ID for a node

Source

fn node_name(&self, v: VID) -> String

Returns the string name for a node

Source

fn node_type(&self, v: VID) -> Option<ArcStr>

Returns the type of node

Source

fn node_type_id(&self, v: VID) -> usize

Returns the type id of a node

Source

fn internalise_node(&self, v: NodeRef<'_>) -> Option<VID>

Gets the internal reference for an external node reference and keeps internal references unchanged.

Source

fn internalise_node_unchecked(&self, v: NodeRef<'_>) -> VID

Gets the internal reference for an external node reference and keeps internal references unchanged. Assumes node exists!

Source

fn node_metadata(&self, v: VID, id: usize) -> Option<Prop>

Gets a static property of a given node given the name and node reference.

§Arguments
  • v - A reference to the node for which the property is being queried.
  • name - The name of the property.
§Returns

The property value if it exists.

Source

fn node_metadata_ids( &self, v: VID, ) -> Box<dyn Iterator<Item = usize> + Send + Sync + '_>

Gets the keys of metadata of a given node

§Arguments
  • v - A reference to the node for which the property is being queried.
§Returns

The keys of the metadata.

Source

fn temporal_node_prop_ids(&self, v: VID) -> Box<dyn Iterator<Item = usize> + '_>

Returns a vector of all ids of temporal properties within the given node

§Arguments
  • v - A reference to the node for which to retrieve the names.
§Returns

The ids of the temporal properties

Implementors§