[][src]Struct truncated_free_groups::truncated_subgroup::TruncatedSubgroup

pub struct TruncatedSubgroup {
    pub elements: Box<BTreeSet<ShortFreeGroupTerm>>,
    // some fields omitted
}

Represents the closed ball of radius 3 around e in the Cayley graph of a free group with respect to the standard free generating set.

Examples

Basic usage:

use truncated_free_groups::truncated_subgroup::TruncatedSubgroup;
use l_group_formulas::short_free_group_term::ShortFreeGroupTerm;
use l_group_formulas::literal::Literal;
use std::collections::BTreeSet;
let s = ShortFreeGroupTerm::from("xY");
let t = ShortFreeGroupTerm::from("yz");
let mut set = BTreeSet::new();
set.insert(s);
set.insert(t);
let mut gens = BTreeSet::new();
gens.insert(Literal::from('x'));
gens.insert(Literal::from('y'));
gens.insert(Literal::from('z'));
let truncated = TruncatedSubgroup::new(Box::new(set), gens, false, false, false);
let mut expected = Box::new(BTreeSet::new());
expected.insert(s);
expected.insert(t);
expected.insert(ShortFreeGroupTerm::from("xz"));
assert_eq!(expected, truncated.elements.clone());

Fields

elements: Box<BTreeSet<ShortFreeGroupTerm>>

Implementations

impl TruncatedSubgroup[src]

pub fn new(
    elements: Box<BTreeSet<ShortFreeGroupTerm>>,
    gens: BTreeSet<Literal>,
    closed: bool,
    break_at_identity: bool,
    verbose: bool
) -> TruncatedSubgroup
[src]

Trait Implementations

impl Debug for TruncatedSubgroup[src]

impl Insert for TruncatedSubgroup[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.