Skip to main content

GraphRecord

Struct GraphRecord 

Source
pub struct GraphRecord { /* private fields */ }

Implementations§

Source§

impl GraphRecord

Source

pub fn new() -> Self

Source

pub fn with_schema(schema: Schema) -> Self

Source

pub fn with_capacity(nodes: usize, edges: usize, schema: Option<Schema>) -> Self

Source

pub fn from_tuples( nodes: Vec<(NodeIndex, Attributes)>, edges: Option<Vec<(NodeIndex, NodeIndex, Attributes)>>, schema: Option<Schema>, ) -> GraphRecordResult<Self>

Source

pub fn from_dataframes( nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, schema: Option<Schema>, ) -> GraphRecordResult<Self>

Source

pub fn from_nodes_dataframes( nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, schema: Option<Schema>, ) -> GraphRecordResult<Self>

Source

pub fn to_dataframes(&self) -> GraphRecordResult<DataFramesExport>

Source

pub const unsafe fn set_schema_unchecked(&mut self, schema: &mut Schema)

§Safety

This function should only be used if the data has been validated against the schema. Using this function with invalid data may lead to undefined behavior. This function does not run any plugin hooks.

Source

pub const fn get_schema(&self) -> &Schema

Source

pub fn node_indices(&self) -> impl Iterator<Item = &NodeIndex>

Source

pub fn node_attributes( &self, node_index: &NodeIndex, ) -> GraphRecordResult<&Attributes>

Source

pub fn node_attributes_mut<'a>( &'a mut self, node_index: &'a NodeIndex, ) -> GraphRecordResult<NodeAttributesMut<'a>>

Source

pub fn outgoing_edges( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &EdgeIndex> + use<'_>>

Source

pub fn incoming_edges( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &EdgeIndex> + use<'_>>

Source

pub fn edge_indices(&self) -> impl Iterator<Item = &EdgeIndex>

Source

pub fn edge_attributes( &self, edge_index: &EdgeIndex, ) -> GraphRecordResult<&Attributes>

Source

pub fn edge_attributes_mut<'a>( &'a mut self, edge_index: &'a EdgeIndex, ) -> GraphRecordResult<EdgeAttributesMut<'a>>

Source

pub fn edge_endpoints( &self, edge_index: &EdgeIndex, ) -> GraphRecordResult<(&NodeIndex, &NodeIndex)>

Source

pub fn edges_connecting<'a>( &'a self, outgoing_node_indices: Vec<&'a NodeIndex>, incoming_node_indices: Vec<&'a NodeIndex>, ) -> impl Iterator<Item = &'a EdgeIndex> + 'a

Source

pub fn edges_connecting_undirected<'a>( &'a self, first_node_indices: Vec<&'a NodeIndex>, second_node_indices: Vec<&'a NodeIndex>, ) -> impl Iterator<Item = &'a EdgeIndex> + 'a

Source

pub fn groups(&self) -> impl Iterator<Item = &Group>

Source

pub fn nodes_in_group( &self, group: &Group, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>

Source

pub fn ungrouped_nodes(&self) -> impl Iterator<Item = &NodeIndex>

Source

pub fn edges_in_group( &self, group: &Group, ) -> GraphRecordResult<impl Iterator<Item = &EdgeIndex> + use<'_>>

Source

pub fn ungrouped_edges(&self) -> impl Iterator<Item = &EdgeIndex>

Source

pub fn groups_of_node( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &Group> + use<'_>>

Source

pub fn groups_of_edge( &self, edge_index: &EdgeIndex, ) -> GraphRecordResult<impl Iterator<Item = &Group> + use<'_>>

Source

pub fn node_count(&self) -> usize

Source

pub fn edge_count(&self) -> usize

Source

pub fn group_count(&self) -> usize

Source

pub fn contains_node(&self, node_index: &NodeIndex) -> bool

Source

pub fn contains_edge(&self, edge_index: &EdgeIndex) -> bool

Source

pub fn contains_group(&self, group: &Group) -> bool

Source

pub fn neighbors_outgoing( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>

Source

pub fn neighbors_incoming( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>

Source

pub fn neighbors_undirected( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>

Source

pub fn query_nodes<'a, Q, R>(&'a self, query: Q) -> Selection<'a, R>
where Q: FnOnce(&Wrapper<NodeOperand>) -> R, R: ReturnOperand<'a>,

Source

pub fn query_edges<'a, Q, R>(&'a self, query: Q) -> Selection<'a, R>
where Q: FnOnce(&Wrapper<EdgeOperand>) -> R, R: ReturnOperand<'a>,

Source

pub fn overview( &self, truncate_details: Option<usize>, ) -> GraphRecordResult<Overview>

Source

pub fn group_overview( &self, group: &Group, truncate_details: Option<usize>, ) -> GraphRecordResult<GroupOverview>

Source§

impl GraphRecord

Source

pub fn set_schema(&mut self, schema: Schema) -> GraphRecordResult<()>

Source

pub const fn freeze_schema(&mut self) -> GraphRecordResult<()>

Source

pub const fn unfreeze_schema(&mut self) -> GraphRecordResult<()>

Source

pub fn add_node( &mut self, node_index: NodeIndex, attributes: Attributes, ) -> GraphRecordResult<()>

Source

pub fn add_node_with_group( &mut self, node_index: NodeIndex, attributes: Attributes, group: Group, ) -> GraphRecordResult<()>

Source

pub fn add_node_with_groups( &mut self, node_index: NodeIndex, attributes: Attributes, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<()>

Source

pub fn remove_node( &mut self, node_index: &NodeIndex, ) -> GraphRecordResult<Attributes>

Source

pub fn add_nodes( &mut self, nodes: Vec<(NodeIndex, Attributes)>, ) -> GraphRecordResult<()>

Source

pub fn add_nodes_with_group( &mut self, nodes: Vec<(NodeIndex, Attributes)>, group: Group, ) -> GraphRecordResult<()>

Source

pub fn add_nodes_with_groups( &mut self, nodes: Vec<(NodeIndex, Attributes)>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<()>

Source

pub fn add_nodes_dataframes( &mut self, nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, ) -> GraphRecordResult<()>

Source

pub fn add_nodes_dataframes_with_group( &mut self, nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, group: Group, ) -> GraphRecordResult<()>

Source

pub fn add_nodes_dataframes_with_groups( &mut self, nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<()>

Source

pub fn add_edge( &mut self, source_node_index: NodeIndex, target_node_index: NodeIndex, attributes: Attributes, ) -> GraphRecordResult<EdgeIndex>

Source

pub fn add_edge_with_group( &mut self, source_node_index: NodeIndex, target_node_index: NodeIndex, attributes: Attributes, group: Group, ) -> GraphRecordResult<EdgeIndex>

Source

pub fn add_edge_with_groups( &mut self, source_node_index: NodeIndex, target_node_index: NodeIndex, attributes: Attributes, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<EdgeIndex>

Source

pub fn remove_edge( &mut self, edge_index: &EdgeIndex, ) -> GraphRecordResult<Attributes>

Source

pub fn add_edges( &mut self, edges: Vec<(NodeIndex, NodeIndex, Attributes)>, ) -> GraphRecordResult<Vec<EdgeIndex>>

Source

pub fn add_edges_with_group( &mut self, edges: Vec<(NodeIndex, NodeIndex, Attributes)>, group: &Group, ) -> GraphRecordResult<Vec<EdgeIndex>>

Source

pub fn add_edges_with_groups( &mut self, edges: Vec<(NodeIndex, NodeIndex, Attributes)>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<Vec<EdgeIndex>>

Source

pub fn add_edges_dataframes( &mut self, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, ) -> GraphRecordResult<Vec<EdgeIndex>>

Source

pub fn add_edges_dataframes_with_group( &mut self, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, group: &Group, ) -> GraphRecordResult<Vec<EdgeIndex>>

Source

pub fn add_edges_dataframes_with_groups( &mut self, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<Vec<EdgeIndex>>

Source

pub fn add_group( &mut self, group: Group, node_indices: Option<Vec<NodeIndex>>, edge_indices: Option<Vec<EdgeIndex>>, ) -> GraphRecordResult<()>

Source

pub fn remove_group(&mut self, group: &Group) -> GraphRecordResult<()>

Source

pub fn add_node_to_group( &mut self, group: Group, node_index: NodeIndex, ) -> GraphRecordResult<()>

Source

pub fn add_node_to_groups( &mut self, groups: impl AsRef<[Group]>, node_index: NodeIndex, ) -> GraphRecordResult<()>

Source

pub fn add_nodes_to_groups( &mut self, groups: impl AsRef<[Group]>, node_indices: Vec<NodeIndex>, ) -> GraphRecordResult<()>

Source

pub fn add_edge_to_group( &mut self, group: Group, edge_index: EdgeIndex, ) -> GraphRecordResult<()>

Source

pub fn add_edge_to_groups( &mut self, groups: impl AsRef<[Group]>, edge_index: EdgeIndex, ) -> GraphRecordResult<()>

Source

pub fn add_edges_to_groups( &mut self, groups: impl AsRef<[Group]>, edge_indices: Vec<EdgeIndex>, ) -> GraphRecordResult<()>

Source

pub fn remove_node_from_group( &mut self, group: &Group, node_index: &NodeIndex, ) -> GraphRecordResult<()>

Source

pub fn remove_node_from_groups( &mut self, groups: impl AsRef<[Group]>, node_index: &NodeIndex, ) -> GraphRecordResult<()>

Source

pub fn remove_nodes_from_groups( &mut self, groups: impl AsRef<[Group]>, node_indices: &[NodeIndex], ) -> GraphRecordResult<()>

Source

pub fn remove_edge_from_group( &mut self, group: &Group, edge_index: &EdgeIndex, ) -> GraphRecordResult<()>

Source

pub fn remove_edge_from_groups( &mut self, groups: impl AsRef<[Group]>, edge_index: &EdgeIndex, ) -> GraphRecordResult<()>

Source

pub fn remove_edges_from_groups( &mut self, groups: impl AsRef<[Group]>, edge_indices: &[EdgeIndex], ) -> GraphRecordResult<()>

Source

pub fn clear(&mut self) -> GraphRecordResult<()>

Trait Implementations§

Source§

impl Clone for GraphRecord

Source§

fn clone(&self) -> GraphRecord

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 Debug for GraphRecord

Source§

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

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

impl Default for GraphRecord

Source§

fn default() -> GraphRecord

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

impl Display for GraphRecord

Source§

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

Formats the value using the given formatter. Read more

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> 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<T> Key for T
where T: Clone,

Source§

fn align() -> usize

The alignment necessary for the key. Must return a power of two.
Source§

fn size(&self) -> usize

The size of the key in bytes.
Source§

unsafe fn init(&self, ptr: *mut u8)

Initialize the key in the given memory location. Read more
Source§

unsafe fn get<'a>(ptr: *const u8) -> &'a T

Get a reference to the key from the given memory location. Read more
Source§

unsafe fn drop_in_place(ptr: *mut u8)

Drop the key in place. 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<T> ToCompactString for T
where T: Display,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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