Skip to main content

Nodes

Struct Nodes 

Source
pub struct Nodes<'graph, G, GH = G, F = Const<bool>> { /* private fields */ }

Implementations§

Source§

impl<'graph, G> Nodes<'graph, G>
where G: GraphViewOps<'graph> + Clone,

Source

pub fn new(graph: G) -> Self

Source§

impl<'graph, G, GH, F> Nodes<'graph, G, GH, F>
where G: GraphViewOps<'graph> + 'graph, GH: GraphViewOps<'graph> + 'graph, F: NodeFilterOp + Clone + 'graph,

Source

pub fn new_filtered( base_graph: G, graph: GH, predicate: F, nodes: Option<Index<VID>>, ) -> Self

Source

pub fn node_list(&self) -> NodeList

Source

pub fn indexed(&self, index: Index<VID>) -> Nodes<'graph, G, GH, F>

Source

pub fn iter( &self, ) -> impl Iterator<Item = NodeView<'_, &GH>> + use<'_, 'graph, G, GH, F>

Source

pub fn iter_unlocked( &self, ) -> impl Iterator<Item = NodeView<'_, &GH>> + use<'_, 'graph, G, GH, F>

Source

pub fn iter_owned(&self) -> BoxedLIter<'graph, NodeView<'graph, GH>>

Source

pub fn iter_owned_unlocked(&self) -> BoxedLIter<'graph, NodeView<'graph, GH>>

Source

pub fn par_iter( &self, ) -> impl ParallelIterator<Item = NodeView<'_, &GH>> + use<'_, 'graph, G, GH, F>

Source

pub fn into_par_iter( self, ) -> impl ParallelIterator<Item = NodeView<'graph, GH>> + 'graph

Source

pub fn len(&self) -> usize

Returns the number of nodes in the graph.

Source

pub fn is_empty(&self) -> bool

Returns true if the graph contains no nodes.

Source

pub fn get<V: AsNodeRef>(&self, node: V) -> Option<NodeView<'graph, GH>>

Source

pub fn type_filter<I: IntoIterator<Item = V>, V: AsRef<str>>( &self, node_types: I, ) -> Nodes<'graph, G, GH, AndOp<F, NodeTypeFilterOp>>

Source

pub fn id_filter( &self, nodes: impl IntoIterator<Item = impl AsNodeRef>, ) -> Nodes<'graph, G, GH, F>

Source

pub fn collect(&self) -> Vec<NodeView<'graph, GH>>

Collect nodes into a vec

Source

pub fn get_metadata_id(&self, prop_name: &str) -> Option<usize>

Source

pub fn get_temporal_prop_id(&self, prop_name: &str) -> Option<usize>

Source

pub fn is_list_filtered(&self) -> bool

Source

pub fn is_filtered(&self) -> bool

Source

pub fn contains<V: AsNodeRef>(&self, node: V) -> bool

Trait Implementations§

Source§

impl<'graph, G: Clone, GH: Clone, F: Clone> Clone for Nodes<'graph, G, GH, F>

Source§

fn clone(&self) -> Nodes<'graph, G, GH, F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>, F: NodeFilterOp + Clone + 'graph + Debug> Debug for Nodes<'graph, G, GH, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'graph, G, Current, F> InternalFilter<'graph> for Nodes<'graph, G, Current, F>
where G: GraphViewOps<'graph> + 'graph, Current: GraphViewOps<'graph> + 'graph, F: NodeFilterOp + Clone + 'graph,

Source§

type Graph = Current

Source§

type Filtered<Next: GraphViewOps<'graph>> = Nodes<'graph, G, Next, F>

Source§

fn base_graph(&self) -> &Self::Graph

Source§

fn apply_filter<Next: GraphViewOps<'graph>>( &self, filtered_graph: Next, ) -> Self::Filtered<Next>

Source§

impl<'graph, G, GH, F> InternalNodeSelect<'graph> for Nodes<'graph, G, GH, F>
where G: GraphViewOps<'graph> + 'graph, GH: GraphViewOps<'graph> + 'graph, F: NodeFilterOp + 'graph,

Source§

type IterGraph = GH

Source§

type IterFiltered<Filter: NodeFilterOp + 'graph> = Nodes<'graph, G, GH, AndOp<F, Filter>>

Source§

fn iter_graph(&self) -> &Self::IterGraph

Source§

fn apply_iter_filter<Filter: NodeFilterOp + 'graph>( &self, filter: Filter, ) -> Self::IterFiltered<Filter>

Source§

impl<G: IntoDynamic, GH: IntoDynamic, F: NodeFilterOp + IntoDynNodeOp + 'static> IntoDynNodes for Nodes<'static, G, GH, F>

Source§

impl<'graph, G, GH, F> IntoIterator for Nodes<'graph, G, GH, F>
where G: GraphViewOps<'graph> + 'graph, GH: GraphViewOps<'graph> + 'graph, F: NodeFilterOp + 'graph,

Source§

type Item = NodeView<'graph, GH>

The type of the elements being iterated over.
Source§

type IntoIter = Box<dyn Iterator<Item = <Nodes<'graph, G, GH, F> as IntoIterator>::Item> + Send + Sync + 'graph>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>, F: NodeFilterOp + Clone + 'graph, V: AsNodeRef + Hash + Eq, S: BuildHasher> PartialEq<HashSet<V, S>> for Nodes<'graph, G, GH, F>

Source§

fn eq(&self, other: &HashSet<V, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>, F: NodeFilterOp + Clone + 'graph, V: AsNodeRef> PartialEq<Vec<V>> for Nodes<'graph, G, GH, F>

Source§

fn eq(&self, other: &Vec<V>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'graph, G: GraphViewOps<'graph>, GH: GraphViewOps<'graph>, F: NodeFilterOp + Clone + 'graph> PartialEq for Nodes<'graph, G, GH, F>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<'graph, G, GH, F> Freeze for Nodes<'graph, G, GH, F>
where G: Freeze, GH: Freeze, F: Freeze,

§

impl<'graph, G, GH, F> RefUnwindSafe for Nodes<'graph, G, GH, F>

§

impl<'graph, G, GH, F> Send for Nodes<'graph, G, GH, F>
where G: Send, GH: Send, F: Send,

§

impl<'graph, G, GH, F> Sync for Nodes<'graph, G, GH, F>
where G: Sync, GH: Sync, F: Sync,

§

impl<'graph, G, GH, F> Unpin for Nodes<'graph, G, GH, F>
where G: Unpin, GH: Unpin, F: Unpin,

§

impl<'graph, G, GH, F> UnsafeUnpin for Nodes<'graph, G, GH, F>

§

impl<'graph, G, GH, F> UnwindSafe for Nodes<'graph, G, GH, F>
where G: UnwindSafe, GH: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<'graph, T> Filter<'graph> for T
where T: InternalFilter<'graph>,

Source§

fn filter<F: CreateFilter>( &self, filter: F, ) -> Result<Self::Filtered<F::EntityFiltered<'graph, F::FilteredGraph<'graph, Self::Graph>>>, GraphError>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoDynHop for T
where T: InternalFilter<'static>, <T as InternalFilter<'static>>::Graph: IntoDynamic + Clone,

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<I, V> IntoSeeds for I
where I: IntoIterator<Item = V>, V: AsNodeRef + Debug,

Source§

fn into_initial_list<G, R>( self, graph: &G, _rng: &mut R, ) -> Result<Vec<VID>, SeedError>
where G: StaticGraphViewOps, R: Rng + ?Sized,

Source§

impl<'graph, V> LayerOps<'graph> for V
where V: InternalFilter<'graph> + 'graph,

Source§

type LayeredViewType = <V as InternalFilter<'graph>>::Filtered<LayeredGraph<<V as InternalFilter<'graph>>::Graph>>

Source§

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>
where L: Into<Layer>,

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>
where L: Into<Layer>,

Return a graph containing the excluded layers in names. Errors if one or more of the layers do not exists.
Source§

fn exclude_valid_layers<L>( &self, layers: L, ) -> <V as LayerOps<'graph>>::LayeredViewType
where L: Into<Layer>,

Source§

fn has_layer<L>(&self, name: L) -> bool
where L: SingleLayer,

Check if name is a valid layer name
Source§

fn valid_layers<L>(&self, names: L) -> <V as LayerOps<'graph>>::LayeredViewType
where L: Into<Layer>,

Return a graph containing the layers in names. Any layers that do not exist are ignored.
Source§

fn num_layers(&self) -> usize

Returns the number of layers
Source§

impl<'graph, T> NodeSelect<'graph> for T
where T: InternalNodeSelect<'graph>,

Source§

fn select<F: CreateFilter>( &self, filter: F, ) -> Result<Self::IterFiltered<F::NodeFilter<'graph, F::FilteredGraph<'graph, Self::IterGraph>>>, GraphError>

Source§

impl<'graph, V> NodeViewOps<'graph> for V
where V: BaseNodeViewOps<'graph> + 'graph,

Source§

fn is_active( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<ArrowMap<Map<HistoryOp<'graph, <V as NodeViewOps<'graph>>::Graph>, bool>, IsActiveRow>>

Returns true if the node has any updates within the current window, otherwise false.

Source§

type Graph = <V as BaseNodeViewOps<'graph>>::Graph

Source§

type ValueType<T: ArrowNodeOp + 'graph> = <V as BaseNodeViewOps<'graph>>::ValueType<T> where <T as NodeOp>::Output: 'graph

Source§

type PathType = <V as BaseNodeViewOps<'graph>>::PathType

Source§

type Edges = <V as BaseNodeViewOps<'graph>>::Edges

Source§

fn id(&self) -> <V as NodeViewOps<'graph>>::ValueType<Id>

Get the numeric id of the node
Source§

fn name(&self) -> <V as NodeViewOps<'graph>>::ValueType<Name>

Get the name of this node if a user has set one otherwise it returns the ID. Read more
Source§

fn node_type(&self) -> <V as NodeViewOps<'graph>>::ValueType<Type>

Returns the type of node
Source§

fn node_type_id(&self) -> <V as NodeViewOps<'graph>>::ValueType<TypeId>

Source§

fn earliest_time( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<EarliestTime<<V as NodeViewOps<'graph>>::Graph>>

Get the time entry for the earliest activity of the node
Source§

fn latest_time( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<LatestTime<<V as NodeViewOps<'graph>>::Graph>>

Get the time entry for the latest activity of the node
Source§

fn history( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<HistoryOp<'graph, <V as NodeViewOps<'graph>>::Graph>>

Gets the history of the node (time that the node was added and times when changes were made to the node)
Source§

fn edge_history_count( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<EdgeHistoryCount<<V as NodeViewOps<'graph>>::Graph>>

Gets a count of edge history events.
Source§

fn properties( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<GetProperties<'graph, <V as NodeViewOps<'graph>>::Graph>>

Get a view of the temporal properties of this node. Read more
Source§

fn metadata( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<GetMetadata<'graph, <V as NodeViewOps<'graph>>::Graph>>

Get a view of the metadata of this node.
Source§

fn degree( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Degree<<V as NodeViewOps<'graph>>::Graph>>

Get the degree of this node (i.e., the number of edges that are incident to it). Read more
Source§

fn in_degree( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Degree<<V as NodeViewOps<'graph>>::Graph>>

Get the in-degree of this node (i.e., the number of edges that point into it). Read more
Source§

fn out_degree( &self, ) -> <V as NodeViewOps<'graph>>::ValueType<Degree<<V as NodeViewOps<'graph>>::Graph>>

Get the out-degree of this node (i.e., the number of edges that point out of it). Read more
Source§

fn edges(&self) -> <V as NodeViewOps<'graph>>::Edges

Get the edges that are incident to this node. Read more
Source§

fn in_edges(&self) -> <V as NodeViewOps<'graph>>::Edges

Get the edges that point into this node. Read more
Source§

fn out_edges(&self) -> <V as NodeViewOps<'graph>>::Edges

Get the edges that point out of this node. Read more
Source§

fn neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType

Get the neighbours of this node. Read more
Source§

fn in_neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType

Get the neighbours of this node that point into this node. Read more
Source§

fn out_neighbours(&self) -> <V as NodeViewOps<'graph>>::PathType

Get the neighbours of this node that point out of this node. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<'graph, V> TimeOps<'graph> for V
where V: InternalFilter<'graph> + 'graph + InternalTimeOps<'graph>,

Source§

type WindowedViewType = <V as InternalTimeOps<'graph>>::InternalWindowedView

Source§

fn start(&self) -> Option<EventTime>

Return the time entry of the start of the view or None if the view start is unbounded.
Source§

fn end(&self) -> Option<EventTime>

Return the time entry of the view or None if the view end is unbounded.
Source§

fn shrink_start<T>(&self, start: T) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

set the start of the window to the larger of start and self.start()
Source§

fn shrink_end<T>(&self, end: T) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

set the end of the window to the smaller of end and self.end()
Source§

fn shrink_window<T>( &self, start: T, end: T, ) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

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>

Return the size of the window covered by this view or None if the window is unbounded
Source§

fn window<T1, T2>( &self, start: T1, end: T2, ) -> <V as TimeOps<'graph>>::WindowedViewType
where T1: IntoTime, T2: IntoTime,

Create a view including all events between start (inclusive) and end (exclusive)
Source§

fn at<T>(&self, time: T) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

Create a view that only includes events at time
Source§

fn latest(&self) -> <V as TimeOps<'graph>>::WindowedViewType

Create a view that only includes events at the latest time
Source§

fn snapshot_at<T>(&self, time: T) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

Create a view including all events that have not been explicitly deleted at time Read more
Source§

fn snapshot_latest(&self) -> <V as TimeOps<'graph>>::WindowedViewType

Create a view including all events that have not been explicitly deleted at the latest time Read more
Source§

fn after<T>(&self, start: T) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

Create a view that only includes events after start (exclusive)
Source§

fn before<T>(&self, end: T) -> <V as TimeOps<'graph>>::WindowedViewType
where T: IntoTime,

Create a view that only includes events before end (exclusive)
Source§

fn expanding<I>(&self, step: I) -> Result<WindowSet<'graph, V>, ParseTimeError>
where V: Clone + 'graph, I: TryInto<Interval> + Clone, ParseTimeError: From<<I as TryInto<Interval>>::Error>,

Creates a WindowSet with the given step size using an expanding window. The last window may fall partially outside the range of the data/view. Read more
Source§

fn expanding_aligned<I>( &self, step: I, alignment_unit: AlignmentUnit, ) -> Result<WindowSet<'graph, V>, ParseTimeError>
where V: Clone + 'graph, I: TryInto<Interval>, ParseTimeError: From<<I as TryInto<Interval>>::Error>,

Creates a WindowSet with the given step size using an expanding window, where the windows are aligned with the alignment_unit passed. The last window may fall partially outside the range of the data/view. Read more
Source§

fn rolling<I>( &self, window: I, step: Option<I>, ) -> Result<WindowSet<'graph, V>, ParseTimeError>
where V: Clone + 'graph, I: TryInto<Interval> + Clone, ParseTimeError: From<<I as TryInto<Interval>>::Error>,

Creates a WindowSet with the given window size and optional step using a rolling window. The last window may fall partially outside the range of the data/view. Note that passing a step larger than window can lead to some entries appearing before the start of the first window and/or after the end of the last window (i.e. not included in any window) Read more
Source§

fn rolling_aligned<I>( &self, window: I, step: Option<I>, alignment_unit: AlignmentUnit, ) -> Result<WindowSet<'graph, V>, ParseTimeError>
where V: Clone + 'graph, I: TryInto<Interval>, ParseTimeError: From<<I as TryInto<Interval>>::Error>,

Creates a WindowSet with the given window size and optional step using a rolling window, where the windows are aligned with the alignment_unit passed. The last window may fall partially outside the range of the data/view. Note that, depending on the alignment_unit, passing a step larger than window can lead to some entries appearing before the start of the first window and/or after the end of the last window (i.e. not included in any window) Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> StateType for T
where T: PartialEq + Clone + Debug + Send + Sync + 'static,