Trait flag_algebra::Flag
source · pub trait Flag{
const NAME: &'static str;
const HEREDITARY: bool = true;
// Required methods
fn induce(&self, set: &[usize]) -> Self;
fn size_zero_flags() -> Vec<Self>;
fn superflags(&self) -> Vec<Self>;
// Provided methods
fn generate_next(previous: &[Self]) -> Vec<Self> { ... }
fn generate(n: usize) -> Vec<Self> { ... }
fn generate_typed_up(type_flag: &Self, g_vec: &[Self]) -> Vec<Self> { ... }
fn generate_typed(type_flag: &Self, size: usize) -> Vec<Self> { ... }
fn select_type(&self, eta: &[usize]) -> Self { ... }
}
Expand description
Trait for combinatorial objects that can be used as flags.
Flags must implement the Canonize
trait
from the canonical_form
crate, that allows
reduction modulo isomorphism.
Required Associated Constants§
Provided Associated Constants§
sourceconst HEREDITARY: bool = true
const HEREDITARY: bool = true
Setting this parameter to false
deactivate checks that induced subflags exists.
Must be true
in every classic case.
Required Methods§
sourcefn induce(&self, set: &[usize]) -> Self
fn induce(&self, set: &[usize]) -> Self
Returns the subflag induced by the vertices in the slice set
.
sourcefn size_zero_flags() -> Vec<Self>
fn size_zero_flags() -> Vec<Self>
Returns the set of all flags of size 0.
This list is used for initialisation in the flag construction.
sourcefn superflags(&self) -> Vec<Self>
fn superflags(&self) -> Vec<Self>
Return the list of flags of size self.size() + 1
that contain self
as an induced subflag.
This list can have redundancy and is a priori not reduced modulo isomorphism.
Provided Methods§
sourcefn generate_next(previous: &[Self]) -> Vec<Self>
fn generate_next(previous: &[Self]) -> Vec<Self>
Return the list of flags of size self.size() + 1
that contain self
as an induced subflag reduced modulo isomorphism.
sourcefn generate(n: usize) -> Vec<Self>
fn generate(n: usize) -> Vec<Self>
Return the list of flags of size n
reduced modulo isomorphism.
sourcefn generate_typed_up(type_flag: &Self, g_vec: &[Self]) -> Vec<Self>
fn generate_typed_up(type_flag: &Self, g_vec: &[Self]) -> Vec<Self>
Return the list of flags of g_vec
that can be rooted on the
flag type_flag
.
Each different way to root this flag give a different flag in the result.
sourcefn generate_typed(type_flag: &Self, size: usize) -> Vec<Self>
fn generate_typed(type_flag: &Self, size: usize) -> Vec<Self>
Return the list of flag of size size
rooted on type_flag
reduced modulo (typed) isomorphism.
sourcefn select_type(&self, eta: &[usize]) -> Self
fn select_type(&self, eta: &[usize]) -> Self
Reorder self so that the eta.len()
first vertices are the values
of eta
in the corresponding order.