Skip to main content

FamousGraph

Enum FamousGraph 

Source
pub enum FamousGraph {
Show 31 variants Bull, Chvatal, Coxeter, Cubical, Diamond, Dodecahedron, Folkman, Franklin, Frucht, Grotzsch, Heawood, Herschel, House, HouseX, Icosahedron, KrackhardtKite, Levi, McGee, Meredith, NoPerfectMatching, Nonline, Octahedron, Petersen, Robertson, SmallestCyclicGroup, Tetrahedron, Thomassen, Tutte, Uniquely3Colorable, Walther, Zachary,
}
Expand description

The named graphs known to Graph::famous.

Each variant documents its size; FamousGraph::name gives the name understood by igraph, and FamousGraph::ALL lists them all. FamousGraph implements AsRef<str>, so it can be passed to Graph::famous directly:

use igraph::{constructors::FamousGraph, prelude::*};
let g = Graph::famous(FamousGraph::Heawood).unwrap();
assert_eq!((g.vcount(), g.ecount()), FamousGraph::Heawood.size());

Variants§

§

Bull

The bull graph: a triangle with two pendant “horns” (5 vertices, 5 edges).

§

Chvatal

The Chvátal graph: the smallest triangle-free, 4-chromatic, 4-regular graph (12, 24).

§

Coxeter

The Coxeter graph: a non-Hamiltonian cubic symmetric graph (28, 42).

§

Cubical

The skeleton of the cube (8, 12).

§

Diamond

The diamond: two triangles sharing an edge (4, 5).

§

Dodecahedron

The skeleton of the dodecahedron (20, 30).

§

Folkman

The Folkman graph: the smallest semisymmetric graph (20, 40).

§

Franklin

The Franklin graph, related to colorings of the Klein bottle (12, 18).

§

Frucht

The Frucht graph: the smallest cubic graph with no non-trivial automorphism (12, 18).

§

Grotzsch

The Grötzsch graph: triangle-free with chromatic number 4 (11, 20).

§

Heawood

The Heawood graph: the 6-cage, the smallest cubic graph of girth 6 (14, 21).

§

Herschel

The Herschel graph: the smallest non-Hamiltonian polyhedral graph (11, 18).

§

House

The house graph: a triangle on top of a square (5, 6).

§

HouseX

The house graph with an X in the square (5, 8).

§

Icosahedron

The skeleton of the icosahedron (12, 30).

§

KrackhardtKite

Krackhardt’s kite social network (10, 18).

§

Levi

The Levi graph: a 4-arc transitive cubic graph (30, 45).

§

McGee

The McGee graph: the unique 3-regular 7-cage (24, 36).

§

Meredith

The Meredith graph: 4-regular, 4-connected and non-Hamiltonian (70, 140).

§

NoPerfectMatching

A connected graph without a perfect matching (16, 27).

§

Nonline

The disjoint union of the 9 forbidden subgraphs of line graphs (50, 72).

§

Octahedron

The skeleton of the octahedron (6, 12).

§

Petersen

The Petersen graph: 3-regular, the smallest hypohamiltonian graph (10, 15).

§

Robertson

The Robertson graph: the unique (4,5)-cage (19, 38).

§

SmallestCyclicGroup

A smallest non-trivial graph whose automorphism group is cyclic (9, 15).

§

Tetrahedron

The skeleton of the tetrahedron, i.e. K_4 (4, 6).

§

Thomassen

The Thomassen graph: the smallest hypotraceable graph (34, 52).

§

Tutte

The Tutte graph: a counterexample to Tait’s Hamiltonian conjecture (46, 69).

§

Uniquely3Colorable

A triangle-free, uniquely 3-colorable graph (12, 22).

§

Walther

The Walther graph: an identity graph (25, 31).

§

Zachary

Zachary’s karate club social network (34, 78).

Implementations§

Source§

impl FamousGraph

Source

pub const ALL: &'static [FamousGraph]

All the famous graphs, in the order of the igraph documentation (alphabetical, except that Noperfectmatching precedes Nonline).

Source

pub fn name(self) -> &'static str

The name igraph uses for this graph (matching is case insensitive).

Source

pub fn size(self) -> (usize, usize)

The (vertex count, edge count) of this graph.

Trait Implementations§

Source§

impl AsRef<str> for FamousGraph

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for FamousGraph

Source§

fn clone(&self) -> FamousGraph

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for FamousGraph

Source§

impl Debug for FamousGraph

Source§

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

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

impl Display for FamousGraph

Source§

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

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

impl Eq for FamousGraph

Source§

impl Hash for FamousGraph

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FamousGraph

Source§

fn eq(&self, other: &FamousGraph) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FamousGraph

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