[−][src]Struct flag_algebra::flags::CGraph
Edge-colored graphs.
Implentation of graphs whose edges are colored by a number in a set {1,…,k-1}
(So that accounting for non-edges, each pair has k
possible states).
The number k
is determined at compile-time by a type-level number
from the typenum
crate.
Specifically, CGraph<Uk>
represents k
-edge-colored graphs if Uk
is
the typenum
type reprenting k
.
Fields
size: usize
Implementations
impl<E> CGraph<E>
[src]
pub fn is_edge(&self, u: usize, v: usize) -> bool
[src]
Returns true
id uv
is an edge.
pub fn edge(&self, u: usize, v: usize) -> u8
[src]
Return the color of an edge uv
.
Returns 0
if there is no edge.
pub fn nbrs(&self, v: usize) -> Vec<usize>
[src]
Return the vector of vertices adjacent to v
.
pub fn new(n: usize, edge: &[((usize, usize), u8)]) -> Self where
E: Unsigned,
[src]
E: Unsigned,
Create a new colored graph with the specified edges. Edges not listed get value 0.
pub fn empty(n: usize) -> Self
[src]
Create the graph on n
vertices with no edge.
Trait Implementations
impl<E> Canonize for CGraph<E> where
E: Unsigned + Clone + Eq + Ord + Debug,
[src]
E: Unsigned + Clone + Eq + Ord + Debug,
fn size(&self) -> usize
[src]
fn invariant_neighborhood(&self, v: usize) -> Vec<Vec<usize>>
[src]
fn apply_morphism(&self, p: &[usize]) -> Self
[src]
fn invariant_coloring(&self) -> Option<Vec<u64>>
[src]
fn canonical(&self) -> Self
[src]
fn canonical_typed(&self, sigma: usize) -> Self
[src]
fn morphism_to_canonical(&self) -> Vec<usize>
[src]
fn morphism_to_canonical_typed(&self, sigma: usize) -> Vec<usize>
[src]
fn automorphisms(&self) -> AutomorphismIterator<Self>
[src]
fn stabilizer(&self, sigma: usize) -> AutomorphismIterator<Self>
[src]
impl<E: Clone> Clone for CGraph<E>
[src]
impl<E: Debug> Debug for CGraph<E>
[src]
impl<'de, E> Deserialize<'de> for CGraph<E>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<E> Display for CGraph<E>
[src]
impl<E> Draw for CGraph<E>
[src]
fn draw_with_parameters<C>(&self, col: C, type_size: usize) -> SVG where
C: FnMut(usize) -> usize,
[src]
C: FnMut(usize) -> usize,
fn draw(&self) -> SVG
[src]
fn draw_typed(&self, type_size: usize) -> SVG
[src]
fn to_svg_file(&self, filename: &str)
[src]
impl<E: Eq> Eq for CGraph<E>
[src]
impl<E> Flag for CGraph<E> where
E: Unsigned + Clone + Eq + Ord + Debug,
[src]
E: Unsigned + Clone + Eq + Ord + Debug,
fn induce(&self, p: &[usize]) -> Self
[src]
const NAME: &'static str
[src]
fn size_zero_flags() -> Vec<Self>
[src]
fn superflags(&self) -> Vec<Self>
[src]
const HEREDITARY: bool
[src]
fn generate_next(previous: &[Self]) -> Vec<Self>
[src]
fn generate(n: usize) -> Vec<Self>
[src]
fn generate_typed_up(type_flag: &Self, g_vec: &[Self]) -> Vec<Self>
[src]
fn generate_typed(type_flag: &Self, size: usize) -> Vec<Self>
[src]
fn select_type(&self, eta: &[usize]) -> Self
[src]
impl<E: Ord> Ord for CGraph<E>
[src]
fn cmp(&self, other: &CGraph<E>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<E: PartialEq> PartialEq<CGraph<E>> for CGraph<E>
[src]
impl<E: PartialOrd> PartialOrd<CGraph<E>> for CGraph<E>
[src]
fn partial_cmp(&self, other: &CGraph<E>) -> Option<Ordering>
[src]
fn lt(&self, other: &CGraph<E>) -> bool
[src]
fn le(&self, other: &CGraph<E>) -> bool
[src]
fn gt(&self, other: &CGraph<E>) -> bool
[src]
fn ge(&self, other: &CGraph<E>) -> bool
[src]
impl<E> Serialize for CGraph<E>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<E> StructuralEq for CGraph<E>
[src]
impl<E> StructuralPartialEq for CGraph<E>
[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for CGraph<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> Send for CGraph<E> where
E: Send,
E: Send,
impl<E> Sync for CGraph<E> where
E: Sync,
E: Sync,
impl<E> Unpin for CGraph<E> where
E: Unpin,
E: Unpin,
impl<E> UnwindSafe for CGraph<E> where
E: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<F> Html for F where
F: Draw,
[src]
F: Draw,
pub fn print_html<W>(&Self, &mut W) -> Result<(), Error> where
W: Write,
[src]
W: Write,
const LATEX: bool
[src]
fn html(&self, name: &str) -> Result<()>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub unsafe fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,