pub struct UnGraph { /* private fields */ }Expand description
A struct representing an undirected graph using an adjacency matrix.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UnGraph
impl<'de> Deserialize<'de> for UnGraph
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
Source§impl DotIO for UnGraph
impl DotIO for UnGraph
Source§impl From<&UnGraph> for DOT
Convert an undirected graph into the graph-agnostic DOT representation.
impl From<&UnGraph> for DOT
Convert an undirected graph into the graph-agnostic DOT representation.
Source§impl From<&UnGraph> for GML
Convert an undirected graph into the graph-agnostic GML representation.
impl From<&UnGraph> for GML
Convert an undirected graph into the graph-agnostic GML representation.
Source§impl GmlIO for UnGraph
impl GmlIO for UnGraph
Source§impl Graph for UnGraph
impl Graph for UnGraph
Source§fn empty<I, V>(labels: I) -> Result<Self>
fn empty<I, V>(labels: I) -> Result<Self>
Creates an empty graph with the given labels. Read more
Source§fn complete<I, V>(labels: I) -> Result<Self>
fn complete<I, V>(labels: I) -> Result<Self>
Creates a complete graph with the given labels. Read more
Source§fn add_vertex<V>(&mut self, x: V) -> usize
fn add_vertex<V>(&mut self, x: V) -> usize
Adds a new vertex with the given label to the graph. Read more
Source§fn del_vertex(&mut self, x: usize) -> bool
fn del_vertex(&mut self, x: usize) -> bool
Deletes the vertex at the given index from the graph,
together with all its incident edges. Read more
Source§fn select(&self, x: &Set<usize>) -> Result<Self>where
Self: Sized,
fn select(&self, x: &Set<usize>) -> Result<Self>where
Self: Sized,
Restrict the graph to the specified variables. Read more
Source§impl HasLabels for UnGraph
impl HasLabels for UnGraph
Source§fn label_to_index(&self, x: &str) -> Result<usize>
fn label_to_index(&self, x: &str) -> Result<usize>
Return the variable index for a given label. Read more
Source§fn index_to_label(&self, x: usize) -> Result<&str>
fn index_to_label(&self, x: usize) -> Result<&str>
Return the label for a given variable index. Read more
Source§fn index_to(&self, x: usize, other: &Labels) -> Result<usize>
fn index_to(&self, x: usize, other: &Labels) -> Result<usize>
Maps an index from this model to another model with the same label. Read more
Source§fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Result<Set<usize>>
fn indices_to(&self, x: &Set<usize>, other: &Labels) -> Result<Set<usize>>
Maps a set of indices from this model to another model with the same labels. Read more
Source§impl JsonIO for UnGraph
impl JsonIO for UnGraph
Source§fn from_json_reader<R: Read>(reader: R) -> Result<Self>
fn from_json_reader<R: Read>(reader: R) -> Result<Self>
Create an instance of the type from a JSON reader. Read more
Source§fn to_json_writer<W: Write>(&self, writer: W) -> Result<()>
fn to_json_writer<W: Write>(&self, writer: W) -> Result<()>
Write the instance to a JSON writer. Read more
Source§fn from_json_string(json: &str) -> Result<Self>
fn from_json_string(json: &str) -> Result<Self>
Create an instance of the type from a JSON string. Read more
Auto Trait Implementations§
impl Freeze for UnGraph
impl RefUnwindSafe for UnGraph
impl Send for UnGraph
impl Sync for UnGraph
impl Unpin for UnGraph
impl UnsafeUnpin for UnGraph
impl UnwindSafe for UnGraph
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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