pub struct GraphIndex {
pub topology: Arc<Topology>,
pub ids: Arc<IdMap>,
/* private fields */
}Expand description
A built graph: its topology, and the map from dense node indexes back to the edges’ ids.
Fields§
§topology: Arc<Topology>§ids: Arc<IdMap>Implementations§
Source§impl GraphIndex
impl GraphIndex
pub fn new(topology: Arc<Topology>, ids: Arc<IdMap>) -> Self
Sourcepub fn with_stored_weights(
self,
keys: Vec<String>,
read: Box<dyn Fn(&str) -> Option<Vec<Vec<f64>>> + Send + Sync>,
) -> Self
pub fn with_stored_weights( self, keys: Vec<String>, read: Box<dyn Fn(&str) -> Option<Vec<Vec<f64>>> + Send + Sync>, ) -> Self
This index, with the weight sets stored on disk under keys, which
read reads when one is first asked for.
Sourcepub fn weights(&self, key: &str) -> Option<Weights>
pub fn weights(&self, key: &str) -> Option<Weights>
The weight columns stored under key in memory, if they are.
Sourcepub fn has_stored_weights(&self, key: &str) -> bool
pub fn has_stored_weights(&self, key: &str) -> bool
Whether weights are stored under key on disk.
Sourcepub fn stored_weights(&self, key: &str, n_columns: usize) -> Option<Weights>
pub fn stored_weights(&self, key: &str, n_columns: usize) -> Option<Weights>
The weight columns stored under key, in memory or else on disk, if
they are and have n_columns columns of one value per edge row. Read
from disk, they are kept in memory too. Blocking: it may read a file.
Sourcepub fn weight_sets(&self) -> Vec<(String, Weights)>
pub fn weight_sets(&self) -> Vec<(String, Weights)>
Every set of weight columns held in memory, with its key.
Sourcepub fn store_weights(&self, key: String, weights: Weights)
pub fn store_weights(&self, key: String, weights: Weights)
Store weight columns under key. They must be one per edge row of this
index, in its edge-row order.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GraphIndex
impl !RefUnwindSafe for GraphIndex
impl !UnwindSafe for GraphIndex
impl Forget for GraphIndex
impl Send for GraphIndex
impl Sync for GraphIndex
impl Unpin for GraphIndex
impl UnsafeUnpin for GraphIndex
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more