Struct fast_paths::FastGraph32
source · pub struct FastGraph32 {
pub ranks: Vec<u32>,
pub edges_fwd: Vec<FastGraphEdge32>,
pub first_edge_ids_fwd: Vec<u32>,
pub edges_bwd: Vec<FastGraphEdge32>,
pub first_edge_ids_bwd: Vec<u32>,
/* private fields */
}
Expand description
Special graph data-structure that is identical to FastGraph
except that it uses u32 integers
instead of usize integers. This is used to store a FastGraph
in a 32bit representation on disk
when using a 64bit system.
Fields§
§ranks: Vec<u32>
§edges_fwd: Vec<FastGraphEdge32>
§first_edge_ids_fwd: Vec<u32>
§edges_bwd: Vec<FastGraphEdge32>
§first_edge_ids_bwd: Vec<u32>
Implementations§
source§impl FastGraph32
impl FastGraph32
sourcepub fn new(fast_graph: &FastGraph) -> Self
pub fn new(fast_graph: &FastGraph) -> Self
Creates a 32bit Graph from a given FastGraph
. All (potentially 64bit) usize
integers are
simply converted to u32 and if a value exceeds the 32bit limit an error is thrown. The only
exception is std::u32::MAX
, which is converted to std::usize::MAX
.
sourcepub fn convert_to_usize(self) -> FastGraph
pub fn convert_to_usize(self) -> FastGraph
Converts a 32bit Graph to an actual FastGraph
using usize
such that it can be used with
FastPaths crate. Any integers that equal std::u32::MAX
are mapped to std::usize::MAX
.
Trait Implementations§
source§impl Clone for FastGraph32
impl Clone for FastGraph32
source§fn clone(&self) -> FastGraph32
fn clone(&self) -> FastGraph32
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 FastGraph32
impl Debug for FastGraph32
source§impl<'de> Deserialize<'de> for FastGraph32
impl<'de> Deserialize<'de> for FastGraph32
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
Auto Trait Implementations§
impl Freeze for FastGraph32
impl RefUnwindSafe for FastGraph32
impl Send for FastGraph32
impl Sync for FastGraph32
impl Unpin for FastGraph32
impl UnwindSafe for FastGraph32
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