Struct eiffelvis_core::graph_storage::chunked_storage::ChunkedGraph
source · [−]pub struct ChunkedGraph<K: Key, N, E> { /* private fields */ }
Implementations
sourceimpl<K: Key, N, E> ChunkedGraph<K, N, E>
impl<K: Key, N, E> ChunkedGraph<K, N, E>
pub fn new(max_chunks: usize, chunk_size: u32) -> Self
sourcepub fn to_index(&self, key: K) -> Option<ChunkedIndex>
pub fn to_index(&self, key: K) -> Option<ChunkedIndex>
Translates given key to internal index. This is generally an relatively expensive operation, avoid frequent translations.
sourcepub fn from_index(&self, index: ChunkedIndex) -> Option<K>
pub fn from_index(&self, index: ChunkedIndex) -> Option<K>
Translates given internal index to key
pub fn chunks(&self) -> usize
sourcepub fn last(&self) -> Option<ChunkedIndex>
pub fn last(&self) -> Option<ChunkedIndex>
Returns the index of the most recent added node
pub fn node_count(&self) -> usize
Trait Implementations
sourceimpl<K: Key, N, E> Graph for ChunkedGraph<K, N, E>
impl<K: Key, N, E> Graph for ChunkedGraph<K, N, E>
sourcefn add_node(&mut self, key: K, data: N) -> Option<ChunkedIndex>
fn add_node(&mut self, key: K, data: N) -> Option<ChunkedIndex>
Creates a new edge with given data without any edges
sourcefn add_edge(&mut self, a: K, b: K, data: E)
fn add_edge(&mut self, a: K, b: K, data: E)
Creates a new edge between a and b with given edge data
sourcefn node_count(&self) -> usize
fn node_count(&self) -> usize
Returns the total amount of nodes this graph holds
sourcefn add_node_with_edges<I>(
&mut self,
key: Self::Key,
data: Self::Data,
edges: I
) -> Option<Self::Idx>where
I: Iterator<Item = (Self::Key, Self::EdgeData)>,
fn add_node_with_edges<I>(
&mut self,
key: Self::Key,
data: Self::Data,
edges: I
) -> Option<Self::Idx>where
I: Iterator<Item = (Self::Key, Self::EdgeData)>,
Convenience function, implemented in terms of Graph::add_node and Graph::add_edge
sourceimpl<'a, K: Key, N, E> HasNode<'a, &'a ChunkedGraph<K, N, E>> for ChunkedGraph<K, N, E>
impl<'a, K: Key, N, E> HasNode<'a, &'a ChunkedGraph<K, N, E>> for ChunkedGraph<K, N, E>
type NodeType = (ChunkedIndex, &'a Element<N, E>)
sourceimpl<'a, K: Key, N, E> HasNodeIter<'a, &'a ChunkedGraph<K, N, E>> for ChunkedGraph<K, N, E>
impl<'a, K: Key, N, E> HasNodeIter<'a, &'a ChunkedGraph<K, N, E>> for ChunkedGraph<K, N, E>
sourceimpl<'a, K: Key, N, E> HasNodeRangeIter<'a, &'a ChunkedGraph<K, N, E>> for ChunkedGraph<K, N, E>
impl<'a, K: Key, N, E> HasNodeRangeIter<'a, &'a ChunkedGraph<K, N, E>> for ChunkedGraph<K, N, E>
sourceimpl<K: Key, N, E> Indexable<ChunkedIndex> for ChunkedGraph<K, N, E>
impl<K: Key, N, E> Indexable<ChunkedIndex> for ChunkedGraph<K, N, E>
sourceimpl<K: Key, N, E> Indexable<K> for ChunkedGraph<K, N, E>
impl<K: Key, N, E> Indexable<K> for ChunkedGraph<K, N, E>
sourceimpl<K: Key, N, E> Indexable<usize> for ChunkedGraph<K, N, E>
impl<K: Key, N, E> Indexable<usize> for ChunkedGraph<K, N, E>
sourceimpl<K: Key, N, E> ItemIter for ChunkedGraph<K, N, E>
impl<K: Key, N, E> ItemIter for ChunkedGraph<K, N, E>
fn items(&self) -> NodeIterType<'_, Self>
fn range<R>(&self, range: R) -> NodeRangeIterType<'_, Self>where
R: RangeBounds<Self::Idx>,
sourceimpl<K: Key, N, E> Meta for ChunkedGraph<K, N, E>
impl<K: Key, N, E> Meta for ChunkedGraph<K, N, E>
Auto Trait Implementations
impl<K, N, E> RefUnwindSafe for ChunkedGraph<K, N, E>where
E: RefUnwindSafe,
K: RefUnwindSafe,
N: RefUnwindSafe,
impl<K, N, E> Send for ChunkedGraph<K, N, E>where
E: Send,
N: Send,
impl<K, N, E> Sync for ChunkedGraph<K, N, E>where
E: Sync,
K: Sync,
N: Sync,
impl<K, N, E> Unpin for ChunkedGraph<K, N, E>where
E: Unpin,
K: Unpin,
N: Unpin,
impl<K, N, E> UnwindSafe for ChunkedGraph<K, N, E>where
E: UnwindSafe,
K: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more