EdgeStorage

Struct EdgeStorage 

Source
pub struct EdgeStorage {
    pub edges: Array<Edge>,
    /* private fields */
}

Fields§

§edges: Array<Edge>

Implementations§

Source§

impl EdgeStorage

Source

pub fn new_large() -> Self

Creates a new graph with the assumption that the usage will be dynamic. It will create the graph with high reserve count of 50 to avoid reallocations.

Source

pub fn with_reserve(capacity: Ci) -> Self

Creates a new graph with a custom reserve

Source

pub fn new() -> Self

Creates a new graph with the assumption that the graph size is known ahead of time. No reserve.

Trait Implementations§

Source§

impl Clone for EdgeStorage

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
Source§

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

Performs copy-assignment from source. Read more
Source§

impl Default for EdgeStorage

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl EdgeConnect for EdgeStorage

Source§

fn connect_edges(&mut self, from: VHandle, to: &[Edge])

Source§

fn disconnect(&mut self, from: VHandle, to: VHandle)

Source§

fn connect(&mut self, from: VHandle, to: VHandle)

Source§

impl EdgeStore for EdgeStorage

Source§

fn create_vertex_entry(&mut self, size: Ci) -> VHandle

Source§

fn edges_as_slice(&self, vertex: VHandle) -> &[Edge]

Source§

fn edges_as_mut_slice(&mut self, vertex: VHandle) -> &mut [Edge]

Source§

fn edges_as_ptr(&self, vertex: VHandle) -> FatPtr<Edge>

Source§

fn edges_as_mut_ptr(&mut self, vertex: VHandle) -> FatPtrMut<Edge>

Source§

fn edges_is_empty(&self, handle: VHandle) -> bool

Source§

fn edges_len(&self, handle: VHandle) -> usize

Source§

fn edges_capacity(&self, handle: VHandle) -> usize

Source§

fn edges_index(&self, vertex: VHandle) -> usize

Source§

fn iter(&self) -> impl Iterator<Item = &Edge>

Source§

fn iter_mut(&mut self) -> impl Iterator<Item = &mut Edge>

Source§

fn edges_iter(&self, handle: VHandle) -> impl Iterator<Item = &Edge>

Source§

fn edges_iter_mut(&mut self, handle: VHandle) -> impl Iterator<Item = &mut Edge>

Source§

unsafe fn edges_iter_mut_unchecked( &mut self, handle: VHandle, ) -> impl Iterator<Item = &mut Edge>

Extremely unsafe function. Use when you know what you are doing. Recommended to use if you dynamically want multiple non-overlapping iterators to edges. Read more
Source§

impl Index<usize> for EdgeStorage

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for EdgeStorage

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl WeightedEdgeConnect for EdgeStorage

Source§

fn connect_weighted(&mut self, from: VHandle, to: VHandle, weight: Weight)

Source§

impl EdgeManipulate for EdgeStorage

Source§

impl WeightedEdgeManipulate for EdgeStorage

Auto Trait Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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.