Struct raphtory::db::graph::views::deletion_graph::PersistentGraph
source · pub struct PersistentGraph(/* private fields */);Expand description
A graph view where an edge remains active from the time it is added until it is explicitly marked as deleted.
Note that the graph will give you access to all edges that were added at any point in time, even those that are marked as deleted. The deletion only has an effect on the exploded edge view that are returned. An edge is included in a windowed view of the graph if it is considered active at any point in the window.
Implementations§
source§impl PersistentGraph
impl PersistentGraph
pub fn new() -> Self
pub fn from_storage(storage: Arc<Storage>) -> Self
pub fn from_internal_graph(internal_graph: GraphStorage) -> Self
sourcepub fn event_graph(&self) -> Graph
pub fn event_graph(&self) -> Graph
Get event graph
Trait Implementations§
source§impl Clone for PersistentGraph
impl Clone for PersistentGraph
source§fn clone(&self) -> PersistentGraph
fn clone(&self) -> PersistentGraph
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PersistentGraph
impl Debug for PersistentGraph
source§impl Default for PersistentGraph
impl Default for PersistentGraph
source§fn default() -> PersistentGraph
fn default() -> PersistentGraph
Returns the “default value” for a type. Read more
source§impl DeletionOps for PersistentGraph
impl DeletionOps for PersistentGraph
fn delete_edge<V: AsNodeRef, T: TryIntoInputTime>( &self, t: T, src: V, dst: V, layer: Option<&str>, ) -> Result<EdgeView<Self>, GraphError>
fn delete_edge_with_custom_time_format<V: AsNodeRef>( &self, t: &str, fmt: &str, src: V, dst: V, layer: Option<&str>, ) -> Result<EdgeView<Self>, GraphError>
source§impl<'de> Deserialize<'de> for PersistentGraph
impl<'de> Deserialize<'de> for PersistentGraph
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PersistentGraph
impl Display for PersistentGraph
source§impl From<GraphStorage> for PersistentGraph
impl From<GraphStorage> for PersistentGraph
source§fn from(value: GraphStorage) -> Self
fn from(value: GraphStorage) -> Self
Converts to this type from the input type.
source§impl From<PersistentGraph> for MaterializedGraph
impl From<PersistentGraph> for MaterializedGraph
source§fn from(v: PersistentGraph) -> MaterializedGraph
fn from(v: PersistentGraph) -> MaterializedGraph
Converts to this type from the input type.
source§impl InternalMaterialize for PersistentGraph
impl InternalMaterialize for PersistentGraph
fn graph_type(&self) -> GraphType
fn include_deletions(&self) -> bool
fn new_base_graph(&self, graph: GraphStorage) -> MaterializedGraph
source§impl<'graph, G: GraphViewOps<'graph>> PartialEq<G> for PersistentGraph
impl<'graph, G: GraphViewOps<'graph>> PartialEq<G> for PersistentGraph
source§impl Serialize for PersistentGraph
impl Serialize for PersistentGraph
source§impl TimeSemantics for PersistentGraph
impl TimeSemantics for PersistentGraph
source§fn view_start(&self) -> Option<i64>
fn view_start(&self) -> Option<i64>
Returns the start of the current view or
None if unboundedsource§fn earliest_time_global(&self) -> Option<i64>
fn earliest_time_global(&self) -> Option<i64>
Returns the timestamp for the earliest activity
source§fn latest_time_global(&self) -> Option<i64>
fn latest_time_global(&self) -> Option<i64>
Returns the timestamp for the latest activity
source§fn earliest_time_window(&self, start: i64, end: i64) -> Option<i64>
fn earliest_time_window(&self, start: i64, end: i64) -> Option<i64>
Returns the timestamp for the earliest activity in the window
source§fn latest_time_window(&self, start: i64, end: i64) -> Option<i64>
fn latest_time_window(&self, start: i64, end: i64) -> Option<i64>
Returns the timestamp for the latest activity in the window
source§fn node_earliest_time_window(&self, v: VID, start: i64, end: i64) -> Option<i64>
fn node_earliest_time_window(&self, v: VID, start: i64, end: i64) -> Option<i64>
Return the earliest time for a node in a window
source§fn node_latest_time_window(&self, v: VID, _start: i64, end: i64) -> Option<i64>
fn node_latest_time_window(&self, v: VID, _start: i64, end: i64) -> Option<i64>
Return the latest time for a node in a window
source§fn include_node_window(
&self,
node: NodeStorageRef<'_>,
w: Range<i64>,
_layer_ids: &LayerIds,
) -> bool
fn include_node_window( &self, node: NodeStorageRef<'_>, w: Range<i64>, _layer_ids: &LayerIds, ) -> bool
check if node
v should be included in window wsource§fn include_edge_window(
&self,
edge: EdgeStorageRef<'_>,
w: Range<i64>,
layer_ids: &LayerIds,
) -> bool
fn include_edge_window( &self, edge: EdgeStorageRef<'_>, w: Range<i64>, layer_ids: &LayerIds, ) -> bool
check if edge
e should be included in window wsource§fn node_history(&self, v: VID) -> Vec<i64>
fn node_history(&self, v: VID) -> Vec<i64>
Get the timestamps at which a node
v is active (i.e has an edge addition)source§fn node_history_window(&self, v: VID, w: Range<i64>) -> Vec<i64>
fn node_history_window(&self, v: VID, w: Range<i64>) -> Vec<i64>
Get the timestamps at which a node
v is active in window w (i.e has an edge addition)fn edge_history(&self, e: EdgeRef, layer_ids: LayerIds) -> Vec<i64>
fn edge_history_window( &self, e: EdgeRef, layer_ids: LayerIds, w: Range<i64>, ) -> Vec<i64>
source§fn edge_exploded_count(
&self,
edge: EdgeStorageRef<'_>,
layer_ids: &LayerIds,
) -> usize
fn edge_exploded_count( &self, edge: EdgeStorageRef<'_>, layer_ids: &LayerIds, ) -> usize
The number of exploded edge events for the
edgesource§fn edge_exploded_count_window(
&self,
edge: EdgeStorageRef<'_>,
layer_ids: &LayerIds,
w: Range<i64>,
) -> usize
fn edge_exploded_count_window( &self, edge: EdgeStorageRef<'_>, layer_ids: &LayerIds, w: Range<i64>, ) -> usize
The number of exploded edge events for the edge in the window
wsource§fn edge_exploded(&self, e: EdgeRef, layer_ids: &LayerIds) -> BoxedIter<EdgeRef>
fn edge_exploded(&self, e: EdgeRef, layer_ids: &LayerIds) -> BoxedIter<EdgeRef>
Exploded edge iterator for edge
esource§fn edge_layers(&self, e: EdgeRef, layer_ids: &LayerIds) -> BoxedIter<EdgeRef>
fn edge_layers(&self, e: EdgeRef, layer_ids: &LayerIds) -> BoxedIter<EdgeRef>
Explode edge iterator for edge
e for every layersource§fn edge_window_exploded(
&self,
e: EdgeRef,
w: Range<i64>,
layer_ids: &LayerIds,
) -> BoxedIter<EdgeRef>
fn edge_window_exploded( &self, e: EdgeRef, w: Range<i64>, layer_ids: &LayerIds, ) -> BoxedIter<EdgeRef>
Exploded edge iterator for edge
e over window wsource§fn edge_window_layers(
&self,
e: EdgeRef,
w: Range<i64>,
layer_ids: &LayerIds,
) -> BoxedIter<EdgeRef>
fn edge_window_layers( &self, e: EdgeRef, w: Range<i64>, layer_ids: &LayerIds, ) -> BoxedIter<EdgeRef>
Exploded edge iterator for edge
e over window w for every layersource§fn edge_earliest_time(&self, e: EdgeRef, layer_ids: &LayerIds) -> Option<i64>
fn edge_earliest_time(&self, e: EdgeRef, layer_ids: &LayerIds) -> Option<i64>
Get the time of the earliest activity of an edge
source§fn edge_earliest_time_window(
&self,
e: EdgeRef,
w: Range<i64>,
layer_ids: &LayerIds,
) -> Option<i64>
fn edge_earliest_time_window( &self, e: EdgeRef, w: Range<i64>, layer_ids: &LayerIds, ) -> Option<i64>
Get the time of the earliest activity of an edge
e in window wsource§fn edge_latest_time(&self, e: EdgeRef, layer_ids: &LayerIds) -> Option<i64>
fn edge_latest_time(&self, e: EdgeRef, layer_ids: &LayerIds) -> Option<i64>
Get the time of the latest activity of an edge
source§fn edge_latest_time_window(
&self,
e: EdgeRef,
w: Range<i64>,
layer_ids: &LayerIds,
) -> Option<i64>
fn edge_latest_time_window( &self, e: EdgeRef, w: Range<i64>, layer_ids: &LayerIds, ) -> Option<i64>
Get the time of the latest activity of an edge
e in window wsource§fn edge_deletion_history(&self, e: EdgeRef, layer_ids: &LayerIds) -> Vec<i64>
fn edge_deletion_history(&self, e: EdgeRef, layer_ids: &LayerIds) -> Vec<i64>
Get the edge deletions for use with materialize
source§fn edge_deletion_history_window(
&self,
e: EdgeRef,
w: Range<i64>,
layer_ids: &LayerIds,
) -> Vec<i64>
fn edge_deletion_history_window( &self, e: EdgeRef, w: Range<i64>, layer_ids: &LayerIds, ) -> Vec<i64>
Get the edge deletions for use with materialize restricted to window
wsource§fn edge_is_valid(&self, e: EdgeRef, layer_ids: &LayerIds) -> bool
fn edge_is_valid(&self, e: EdgeRef, layer_ids: &LayerIds) -> bool
Check if edge
e is currently valid in any layer included in layer_idssource§fn edge_is_valid_at_end(
&self,
e: EdgeRef,
layer_ids: &LayerIds,
end: i64,
) -> bool
fn edge_is_valid_at_end( &self, e: EdgeRef, layer_ids: &LayerIds, end: i64, ) -> bool
Check if edge
e is valid at the end of a window with exclusive end time t in all layers included in layer_idssource§fn has_temporal_prop(&self, prop_id: usize) -> bool
fn has_temporal_prop(&self, prop_id: usize) -> bool
Check if graph has temporal property with the given id Read more
source§fn temporal_prop_vec(&self, prop_id: usize) -> Vec<(i64, Prop)>
fn temporal_prop_vec(&self, prop_id: usize) -> Vec<(i64, Prop)>
Returns a vector of all temporal values of the graph property with the given id Read more
source§fn has_temporal_prop_window(&self, prop_id: usize, w: Range<i64>) -> bool
fn has_temporal_prop_window(&self, prop_id: usize, w: Range<i64>) -> bool
Check if graph has temporal property with the given id in the window Read more
source§fn temporal_prop_vec_window(
&self,
prop_id: usize,
start: i64,
end: i64,
) -> Vec<(i64, Prop)>
fn temporal_prop_vec_window( &self, prop_id: usize, start: i64, end: i64, ) -> Vec<(i64, Prop)>
Returns a vector of all temporal values of the graph property with the given name
that fall within the specified time window. Read more
source§fn has_temporal_node_prop(&self, v: VID, prop_id: usize) -> bool
fn has_temporal_node_prop(&self, v: VID, prop_id: usize) -> bool
Check if node has temporal property with the given id Read more
source§fn temporal_node_prop_vec(&self, v: VID, prop_id: usize) -> Vec<(i64, Prop)>
fn temporal_node_prop_vec(&self, v: VID, prop_id: usize) -> Vec<(i64, Prop)>
Returns a vector of all temporal values of the node property with the given name for the
given node Read more
source§fn has_temporal_node_prop_window(
&self,
v: VID,
prop_id: usize,
w: Range<i64>,
) -> bool
fn has_temporal_node_prop_window( &self, v: VID, prop_id: usize, w: Range<i64>, ) -> bool
Check if node has temporal property with the given id in the window Read more
source§fn temporal_node_prop_vec_window(
&self,
v: VID,
prop_id: usize,
start: i64,
end: i64,
) -> Vec<(i64, Prop)>
fn temporal_node_prop_vec_window( &self, v: VID, prop_id: usize, start: i64, end: i64, ) -> Vec<(i64, Prop)>
Returns a vector of all temporal values of the node property with the given name for the given node
that fall within the specified time window. Read more
source§fn has_temporal_edge_prop_window(
&self,
e: EdgeRef,
prop_id: usize,
w: Range<i64>,
layer_ids: &LayerIds,
) -> bool
fn has_temporal_edge_prop_window( &self, e: EdgeRef, prop_id: usize, w: Range<i64>, layer_ids: &LayerIds, ) -> bool
Check if edge has temporal property with the given id in the window Read more
source§fn temporal_edge_prop_vec_window(
&self,
e: EdgeRef,
prop_id: usize,
start: i64,
end: i64,
layer_ids: &LayerIds,
) -> Vec<(i64, Prop)>
fn temporal_edge_prop_vec_window( &self, e: EdgeRef, prop_id: usize, start: i64, end: i64, layer_ids: &LayerIds, ) -> Vec<(i64, Prop)>
Returns a vector of tuples containing the values of the temporal property with the given name
for the given edge reference within the specified time window. Read more
source§impl TryInto<PersistentGraph> for MaterializedGraph
impl TryInto<PersistentGraph> for MaterializedGraph
impl HasDeletionOps for PersistentGraph
impl InheritCoreOps for PersistentGraph
impl InheritEdgeFilterOps for PersistentGraph
impl InheritLayerOps for PersistentGraph
impl InheritListOps for PersistentGraph
impl InheritMutationOps for PersistentGraph
impl InheritNodeFilterOps for PersistentGraph
impl InheritPropertiesOps for PersistentGraph
impl Static for PersistentGraph
Auto Trait Implementations§
impl Freeze for PersistentGraph
impl !RefUnwindSafe for PersistentGraph
impl Send for PersistentGraph
impl Sync for PersistentGraph
impl Unpin for PersistentGraph
impl !UnwindSafe for PersistentGraph
Blanket Implementations§
source§impl<G> AdditionOps for Gwhere
G: InternalAdditionOps + StaticGraphViewOps,
impl<G> AdditionOps for Gwhere
G: InternalAdditionOps + StaticGraphViewOps,
source§fn add_node<V, T, PI>(
&self,
t: T,
v: V,
props: PI,
node_type: Option<&str>,
) -> Result<NodeView<G>, GraphError>
fn add_node<V, T, PI>( &self, t: T, v: V, props: PI, node_type: Option<&str>, ) -> Result<NodeView<G>, GraphError>
Add a node to the graph Read more
source§fn add_edge<V, T, PI>(
&self,
t: T,
src: V,
dst: V,
props: PI,
layer: Option<&str>,
) -> Result<EdgeView<G>, GraphError>
fn add_edge<V, T, PI>( &self, t: T, src: V, dst: V, props: PI, layer: Option<&str>, ) -> Result<EdgeView<G>, GraphError>
Adds an edge between the source and destination nodes with the given timestamp and properties. Read more
fn add_node_with_custom_time_format<V: AsNodeRef, PI: CollectProperties>( &self, t: &str, fmt: &str, v: V, props: PI, node_type: Option<&str>, ) -> Result<NodeView<Self, Self>, GraphError>
fn add_edge_with_custom_time_format<V: AsNodeRef, PI: CollectProperties>( &self, t: &str, fmt: &str, src: V, dst: V, props: PI, layer: Option<&str>, ) -> Result<EdgeView<Self, Self>, GraphError>
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<P> ConstPropertiesOps for P
impl<P> ConstPropertiesOps for P
source§fn get_const_prop_id(&self, name: &str) -> Option<usize>
fn get_const_prop_id(&self, name: &str) -> Option<usize>
Find id for property name (note this only checks the meta-data, not if the property actually exists for the entity)
fn get_const_prop_name(&self, id: usize) -> ArcStr
fn const_prop_ids(&self) -> Box<dyn Iterator<Item = usize> + '_>
fn const_prop_keys(&self) -> Box<dyn Iterator<Item = ArcStr> + '_>
fn const_prop_values(&self) -> Vec<Prop>
fn get_const_prop(&self, id: usize) -> Option<Prop>
source§impl<G> CoreGraphOps for Gwhere
G: DelegateCoreOps + ?Sized,
impl<G> CoreGraphOps for Gwhere
G: DelegateCoreOps + ?Sized,
fn core_graph(&self) -> &GraphStorage
source§fn unfiltered_num_nodes(&self) -> usize
fn unfiltered_num_nodes(&self) -> usize
get the number of nodes in the main graph
source§fn unfiltered_num_edges(&self) -> usize
fn unfiltered_num_edges(&self) -> usize
get the number of edges in the main graph
source§fn unfiltered_num_layers(&self) -> usize
fn unfiltered_num_layers(&self) -> usize
get the number of layers in the main graph
fn core_edges(&self) -> EdgesStorage
fn core_edge(&self, eid: ELID) -> EdgeStorageEntry<'_>
fn core_edge_arc(&self, eid: ELID) -> EdgeOwnedEntry
fn core_nodes(&self) -> NodesStorage
fn core_node_entry(&self, vid: VID) -> NodeStorageEntry<'_>
fn core_node_arc(&self, vid: VID) -> NodeOwnedEntry
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>
source§fn get_layer_names_from_ids(&self, layer_ids: &LayerIds) -> BoxedIter<ArcStr>
fn get_layer_names_from_ids(&self, layer_ids: &LayerIds) -> BoxedIter<ArcStr>
Get the layer name for a given id
source§fn get_all_node_types(&self) -> Vec<ArcStr>
fn get_all_node_types(&self) -> Vec<ArcStr>
Get all node types
source§fn node_type_id(&self, v: VID) -> usize
fn node_type_id(&self, v: VID) -> usize
Returns the type id of a node
source§fn internalise_node(&self, v: NodeRef<'_>) -> Option<VID>
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
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 temporal_prop(&self, id: usize) -> Option<LockedView<'_, TProp>>
fn temporal_prop(&self, id: usize) -> Option<LockedView<'_, TProp>>
Gets a temporal graph property. Read more
source§fn constant_node_prop(&self, v: VID, id: usize) -> Option<Prop>
fn constant_node_prop(&self, v: VID, id: usize) -> Option<Prop>
Gets a static property of a given node given the name and node reference. Read more
source§fn constant_node_prop_ids(&self, v: VID) -> Box<dyn Iterator<Item = usize> + '_>
fn constant_node_prop_ids(&self, v: VID) -> Box<dyn Iterator<Item = usize> + '_>
Gets the keys of constant properties of a given node Read more
source§fn temporal_node_prop_ids(&self, v: VID) -> Box<dyn Iterator<Item = usize> + '_>
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 Read more
source§fn get_const_edge_prop(
&self,
e: EdgeRef,
id: usize,
layer_ids: LayerIds,
) -> Option<Prop>
fn get_const_edge_prop( &self, e: EdgeRef, id: usize, layer_ids: LayerIds, ) -> Option<Prop>
Returns the static edge property with the given name for the
given edge reference. Read more
source§impl<G> DelegateAdditionOps for G
impl<G> DelegateAdditionOps for G
source§impl<G> DelegateCoreOps for G
impl<G> DelegateCoreOps for G
source§impl<G> DelegateDeletionOps for G
impl<G> DelegateDeletionOps for G
source§impl<G> DelegateEdgeFilterOps for G
impl<G> DelegateEdgeFilterOps for G
source§impl<G> DelegateLayerOps for G
impl<G> DelegateLayerOps for G
source§impl<G> DelegatePropertyAdditionOps for G
impl<G> DelegatePropertyAdditionOps for G
source§impl<G> EdgeFilterOps for Gwhere
G: DelegateEdgeFilterOps,
impl<G> EdgeFilterOps for Gwhere
G: DelegateEdgeFilterOps,
source§fn edges_filtered(&self) -> bool
fn edges_filtered(&self) -> bool
If true, the edges from the underlying storage are filtered
source§fn edge_list_trusted(&self) -> bool
fn edge_list_trusted(&self) -> bool
If true, all edges returned by
self.edge_list() exist, otherwise it needs further filteringsource§fn edge_filter_includes_node_filter(&self) -> bool
fn edge_filter_includes_node_filter(&self) -> bool
If true, do not need to check src and dst of the edge separately, even if nodes are filtered
(i.e., edge filter already makes sure there are no edges between non-existent nodes)
fn filter_edge(&self, edge: EdgeStorageRef<'_>, layer_ids: &LayerIds) -> bool
source§impl<G> FilterOps for Gwhere
G: NodeFilterOps + EdgeFilterOps,
impl<G> FilterOps for Gwhere
G: NodeFilterOps + EdgeFilterOps,
fn filter_state(&self) -> FilterState
source§impl<'graph, G> GraphViewOps<'graph> for Gwhere
G: BoxableGraphView + Clone + 'graph,
impl<'graph, G> GraphViewOps<'graph> for Gwhere
G: BoxableGraphView + Clone + 'graph,
source§fn unique_layers(&self) -> Box<dyn Iterator<Item = ArcStr> + Send>
fn unique_layers(&self) -> Box<dyn Iterator<Item = ArcStr> + Send>
Return all the layer ids in the graph
source§fn materialize(&self) -> Result<MaterializedGraph, GraphError>
fn materialize(&self) -> Result<MaterializedGraph, GraphError>
Get a graph clone Read more
fn subgraph<I, V>(&self, nodes: I) -> NodeSubgraph<G>where
I: IntoIterator<Item = V>,
V: AsNodeRef,
fn subgraph_node_types<I, V>(&self, nodes_types: I) -> TypeFilteredSubgraph<G>
fn exclude_nodes<I, V>(&self, nodes: I) -> NodeSubgraph<G>where
I: IntoIterator<Item = V>,
V: AsNodeRef,
source§fn earliest_time(&self) -> Option<i64>
fn earliest_time(&self) -> Option<i64>
Timestamp of earliest activity in the graph
source§fn latest_time(&self) -> Option<i64>
fn latest_time(&self) -> Option<i64>
Timestamp of latest activity in the graph
source§fn count_nodes(&self) -> usize
fn count_nodes(&self) -> usize
Return the number of nodes in the graph.
source§fn count_edges(&self) -> usize
fn count_edges(&self) -> usize
Return the number of edges in the graph.
fn count_temporal_edges(&self) -> usize
source§fn has_edge<T>(&self, src: T, dst: T) -> boolwhere
T: AsNodeRef,
fn has_edge<T>(&self, src: T, dst: T) -> boolwhere
T: AsNodeRef,
Check if the graph contains an edge given a pair of nodes
(src, dst).source§fn edge<T>(&self, src: T, dst: T) -> Option<EdgeView<G>>where
T: AsNodeRef,
fn edge<T>(&self, src: T, dst: T) -> Option<EdgeView<G>>where
T: AsNodeRef,
Get an edge
(src, dst).source§fn properties(&self) -> Properties<G>
fn properties(&self) -> Properties<G>
Get all property values of this graph. Read more
source§fn earliest_date_time(&self) -> Option<DateTime<Utc>>
fn earliest_date_time(&self) -> Option<DateTime<Utc>>
UTC DateTime of earliest activity in the graph
source§impl<G> ImportOps for G
impl<G> ImportOps for G
source§fn import_node<'a, GHH, GH>(
&self,
node: &NodeView<GHH, GH>,
force: bool,
) -> Result<NodeView<G>, GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
fn import_node<'a, GHH, GH>(
&self,
node: &NodeView<GHH, GH>,
force: bool,
) -> Result<NodeView<G>, GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
Imports a single node into the graph. Read more
source§fn import_nodes<'a, GHH, GH>(
&self,
nodes: impl IntoIterator<Item = impl Borrow<NodeView<GHH, GH>>>,
force: bool,
) -> Result<(), GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
fn import_nodes<'a, GHH, GH>(
&self,
nodes: impl IntoIterator<Item = impl Borrow<NodeView<GHH, GH>>>,
force: bool,
) -> Result<(), GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
Imports multiple nodes into the graph. Read more
source§fn import_edge<'a, GHH, GH>(
&self,
edge: &EdgeView<GHH, GH>,
force: bool,
) -> Result<EdgeView<G>, GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
fn import_edge<'a, GHH, GH>(
&self,
edge: &EdgeView<GHH, GH>,
force: bool,
) -> Result<EdgeView<G>, GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
Imports a single edge into the graph. Read more
source§fn import_edges<'a, GHH, GH>(
&self,
edges: impl IntoIterator<Item = impl Borrow<EdgeView<GHH, GH>>>,
force: bool,
) -> Result<(), GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
fn import_edges<'a, GHH, GH>(
&self,
edges: impl IntoIterator<Item = impl Borrow<EdgeView<GHH, GH>>>,
force: bool,
) -> Result<(), GraphError>where
GHH: GraphViewOps<'a>,
GH: GraphViewOps<'a>,
Imports multiple edges into the graph. Read more
source§impl<G> InternalAdditionOps for Gwhere
G: DelegateAdditionOps,
impl<G> InternalAdditionOps for Gwhere
G: DelegateAdditionOps,
source§fn next_event_id(&self) -> Result<usize, GraphError>
fn next_event_id(&self) -> Result<usize, GraphError>
get the sequence id for the next event
source§fn resolve_layer(
&self,
layer: Option<&str>,
) -> Result<MaybeNew<usize>, GraphError>
fn resolve_layer( &self, layer: Option<&str>, ) -> Result<MaybeNew<usize>, GraphError>
map layer name to id and allocate a new layer if needed
source§fn resolve_node<V>(&self, n: V) -> Result<MaybeNew<VID>, GraphError>where
V: AsNodeRef,
fn resolve_node<V>(&self, n: V) -> Result<MaybeNew<VID>, GraphError>where
V: AsNodeRef,
map external node id to internal id, allocating a new empty node if needed
source§fn resolve_node_and_type<V>(
&self,
id: V,
node_type: &str,
) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, GraphError>where
V: AsNodeRef,
fn resolve_node_and_type<V>(
&self,
id: V,
node_type: &str,
) -> Result<MaybeNew<(MaybeNew<VID>, MaybeNew<usize>)>, GraphError>where
V: AsNodeRef,
resolve a node and corresponding type, outer MaybeNew tracks whether the type assignment is new for the node even if both node and type already existed.
source§fn resolve_graph_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, GraphError>
fn resolve_graph_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, GraphError>
map property key to internal id, allocating new property if needed
source§fn resolve_node_property(
&self,
prop: &str,
dtype: PropType,
is_static: bool,
) -> Result<MaybeNew<usize>, GraphError>
fn resolve_node_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, GraphError>
map property key to internal id, allocating new property if needed and checking property type.
returns
None if the type does not matchfn resolve_edge_property( &self, prop: &str, dtype: PropType, is_static: bool, ) -> Result<MaybeNew<usize>, GraphError>
source§fn internal_add_node(
&self,
t: TimeIndexEntry,
v: VID,
props: &[(usize, Prop)],
) -> Result<(), GraphError>
fn internal_add_node( &self, t: TimeIndexEntry, v: VID, props: &[(usize, Prop)], ) -> Result<(), GraphError>
add node update
source§fn internal_add_edge(
&self,
t: TimeIndexEntry,
src: VID,
dst: VID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<MaybeNew<EID>, GraphError>
fn internal_add_edge( &self, t: TimeIndexEntry, src: VID, dst: VID, props: &[(usize, Prop)], layer: usize, ) -> Result<MaybeNew<EID>, GraphError>
add edge update
source§fn internal_add_edge_update(
&self,
t: TimeIndexEntry,
edge: EID,
props: &[(usize, Prop)],
layer: usize,
) -> Result<(), GraphError>
fn internal_add_edge_update( &self, t: TimeIndexEntry, edge: EID, props: &[(usize, Prop)], layer: usize, ) -> Result<(), GraphError>
add update for an existing edge
source§impl<G> InternalDeletionOps for Gwhere
G: DelegateDeletionOps,
impl<G> InternalDeletionOps for Gwhere
G: DelegateDeletionOps,
fn internal_delete_edge( &self, t: TimeIndexEntry, src: VID, dst: VID, layer: usize, ) -> Result<MaybeNew<EID>, GraphError>
fn internal_delete_existing_edge( &self, t: TimeIndexEntry, eid: EID, layer: usize, ) -> Result<(), GraphError>
source§impl<G> InternalLayerOps for Gwhere
G: DelegateLayerOps,
impl<G> InternalLayerOps for Gwhere
G: DelegateLayerOps,
source§fn layer_ids_from_names(&self, key: Layer) -> Result<LayerIds, GraphError>
fn layer_ids_from_names(&self, key: Layer) -> Result<LayerIds, GraphError>
Get the layer id for the given layer name
source§fn valid_layer_ids_from_names(&self, key: Layer) -> LayerIds
fn valid_layer_ids_from_names(&self, key: Layer) -> LayerIds
Get the valid layer ids for given layer names
source§impl<G> InternalPropertyAdditionOps for Gwhere
G: DelegatePropertyAdditionOps,
impl<G> InternalPropertyAdditionOps for Gwhere
G: DelegatePropertyAdditionOps,
fn internal_add_properties( &self, t: TimeIndexEntry, props: &[(usize, Prop)], ) -> Result<(), GraphError>
fn internal_add_constant_properties( &self, props: &[(usize, Prop)], ) -> Result<(), GraphError>
fn internal_update_constant_properties( &self, props: &[(usize, Prop)], ) -> Result<(), GraphError>
fn internal_add_constant_node_properties( &self, vid: VID, props: &[(usize, Prop)], ) -> Result<(), GraphError>
fn internal_update_constant_node_properties( &self, vid: VID, props: &[(usize, Prop)], ) -> Result<(), GraphError>
fn internal_add_constant_edge_properties( &self, eid: EID, layer: usize, props: &[(usize, Prop)], ) -> Result<(), GraphError>
fn internal_update_constant_edge_properties( &self, eid: EID, layer: usize, props: &[(usize, Prop)], ) -> Result<(), GraphError>
source§impl<G> IntoDynamic for Gwhere
G: StaticGraphViewOps + Static,
impl<G> IntoDynamic for Gwhere
G: StaticGraphViewOps + Static,
fn into_dynamic(self) -> DynamicGraph
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<'graph, V> LayerOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
impl<'graph, V> LayerOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
type LayeredViewType = <V as OneHopFilter<'graph>>::Filtered<LayeredGraph<<V as OneHopFilter<'graph>>::FilteredGraph>>
source§fn default_layer(&self) -> <V as LayerOps<'graph>>::LayeredViewType
fn default_layer(&self) -> <V as LayerOps<'graph>>::LayeredViewType
Return a graph containing only the default edge layer
source§fn layers<L>(
&self,
layers: L,
) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
fn layers<L>( &self, layers: L, ) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
Return a graph containing the layers in
names. Errors if one or more of the layers do not exists.source§fn exclude_layers<L>(
&self,
layers: L,
) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
fn exclude_layers<L>( &self, layers: L, ) -> Result<<V as LayerOps<'graph>>::LayeredViewType, GraphError>
Return a graph containing the excluded layers in
names. Errors if one or more of the layers do not exists.fn exclude_valid_layers<L>( &self, layers: L, ) -> <V as LayerOps<'graph>>::LayeredViewType
source§fn valid_layers<L>(&self, names: L) -> <V as LayerOps<'graph>>::LayeredViewType
fn valid_layers<L>(&self, names: L) -> <V as LayerOps<'graph>>::LayeredViewType
Return a graph containing the layers in
names. Any layers that do not exist are ignored.source§impl<G> NodeFilterOps for G
impl<G> NodeFilterOps for G
source§fn nodes_filtered(&self) -> bool
fn nodes_filtered(&self) -> bool
Check if GraphView filters nodes (i.e., there exists nodes in the underlying graph for which
filter_node returns falsesource§fn node_list_trusted(&self) -> bool
fn node_list_trusted(&self) -> bool
Check if node list can be trusted. (if false, nodes in
self.node_list need further filtering,
if true, the result of self.node_list can be trusted, in particular, its len is the number
of nodes in the graph)source§fn filter_node(&self, node: NodeStorageRef<'_>, layer_ids: &LayerIds) -> bool
fn filter_node(&self, node: NodeStorageRef<'_>, layer_ids: &LayerIds) -> bool
If
true, node is included in the graphsource§impl<'graph, G> OneHopFilter<'graph> for Gwhere
G: GraphViewOps<'graph> + 'graph,
impl<'graph, G> OneHopFilter<'graph> for Gwhere
G: GraphViewOps<'graph> + 'graph,
type BaseGraph = G
type FilteredGraph = G
type Filtered<GH: GraphViewOps<'graph> + 'graph> = GH
fn current_filter(&self) -> &<G as OneHopFilter<'graph>>::FilteredGraph
fn base_graph(&self) -> &<G as OneHopFilter<'graph>>::BaseGraph
fn one_hop_filtered<GH>(
&self,
filtered_graph: GH,
) -> <G as OneHopFilter<'graph>>::Filtered<GH>where
GH: GraphViewOps<'graph> + 'graph,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<G> PropertyAdditionOps for Gwhere
G: InternalPropertyAdditionOps + InternalAdditionOps,
impl<G> PropertyAdditionOps for Gwhere
G: InternalPropertyAdditionOps + InternalAdditionOps,
fn add_properties<T, PI>(&self, t: T, props: PI) -> Result<(), GraphError>where
T: TryIntoInputTime,
PI: CollectProperties,
fn add_constant_properties<PI>(&self, props: PI) -> Result<(), GraphError>where
PI: CollectProperties,
fn update_constant_properties<PI>(&self, props: PI) -> Result<(), GraphError>where
PI: CollectProperties,
source§impl<P> TemporalPropertiesOps for P
impl<P> TemporalPropertiesOps for P
source§impl<P> TemporalPropertyViewOps for P
impl<P> TemporalPropertyViewOps for P
fn temporal_value(&self, id: usize) -> Option<Prop>
fn temporal_history(&self, id: usize) -> Vec<i64>
fn temporal_history_date_time(&self, id: usize) -> Option<Vec<DateTime<Utc>>>
fn temporal_values(&self, id: usize) -> Vec<Prop>
fn temporal_value_at(&self, id: usize, t: i64) -> Option<Prop>
source§impl<'graph, V> TimeOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
impl<'graph, V> TimeOps<'graph> for Vwhere
V: OneHopFilter<'graph> + 'graph,
type WindowedViewType = <V as InternalTimeOps<'graph>>::InternalWindowedViewType
source§fn start(&self) -> Option<i64>
fn start(&self) -> Option<i64>
Return the timestamp of the start of the view or None if the view start is unbounded.
source§fn end(&self) -> Option<i64>
fn end(&self) -> Option<i64>
Return the timestamp of the of the view or None if the view end is unbounded.
fn start_date_time(&self) -> Option<DateTime<Utc>>
fn end_date_time(&self) -> Option<DateTime<Utc>>
source§fn shrink_start<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
fn shrink_start<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
set the start of the window to the larger of
start and self.start()source§fn shrink_end<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
fn shrink_end<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
set the end of the window to the smaller of
end and self.end()source§fn shrink_window<T: IntoTime>(&self, start: T, end: T) -> Self::WindowedViewType
fn shrink_window<T: IntoTime>(&self, start: T, end: T) -> Self::WindowedViewType
shrink both the start and end of the window (same as calling
shrink_start followed by shrink_end but more efficient)source§fn window_size(&self) -> Option<u64>
fn window_size(&self) -> Option<u64>
Return the size of the window covered by this view or None if the window is unbounded
source§fn window<T1: IntoTime, T2: IntoTime>(
&self,
start: T1,
end: T2,
) -> Self::WindowedViewType
fn window<T1: IntoTime, T2: IntoTime>( &self, start: T1, end: T2, ) -> Self::WindowedViewType
Create a view including all events between
start (inclusive) and end (exclusive)source§fn at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType
fn at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType
Create a view that only includes events at
timesource§fn after<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
fn after<T: IntoTime>(&self, start: T) -> Self::WindowedViewType
Create a view that only includes events after
start (exclusive)source§fn before<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
fn before<T: IntoTime>(&self, end: T) -> Self::WindowedViewType
Create a view that only includes events before
end (exclusive)source§fn expanding<I>(
&self,
step: I,
) -> Result<WindowSet<'graph, Self>, ParseTimeError>
fn expanding<I>( &self, step: I, ) -> Result<WindowSet<'graph, Self>, ParseTimeError>
Creates a
using an expanding window. The last window may fall partially outside the range of the data/view. Read more
WindowSet with the given step sizeusing an expanding window. The last window may fall partially outside the range of the data/view. Read more