Skip to main content

ActionGroupoid

Struct ActionGroupoid 

Source
pub struct ActionGroupoid { /* private fields */ }
Expand description

The action groupoid X ⫽ G: assignments over nv variables acted on by the group generated by gens (literal permutations). Small nv only — it enumerates all 2^nv objects, which is the point: it makes the orbit collapse visible and checkable.

Implementations§

Source§

impl ActionGroupoid

Source

pub fn new(nv: usize, gens: Vec<Perm>) -> Self

Source

pub fn orbits(&self) -> Vec<u32>

The orbit id of every assignment — π₀(X ⫽ G), computed as the connected components of the action via union-find. orbits()[a] is the canonical representative (smallest member) of a’s orbit.

Source

pub fn num_orbits(&self) -> usize

|π₀(X ⫽ G)| — the number of essentially-different worlds, i.e. exactly what symmetry breaking reduces the search space to.

Source

pub fn group_elements(&self, cap: usize) -> Vec<Perm>

The full group G generated by gens (closed under composition, including the identity). Bounded to cap elements so a pathological generating set can’t blow up; the caller’s small examples are well within it.

Source

pub fn stabilizer_size(&self, a: u32, group: &[Perm]) -> usize

π₁(X ⫽ G) at the assignment a — its stabilizer: the group elements that fix a (g · a = a). These are the loops at a in the action groupoid; the fundamental-group data of the homotopy type at that component.

Source

pub fn orbit_size(&self, a: u32) -> usize

The size of a’s orbit (the connected component of a).

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