pub struct ShellableComplex {
pub dim: usize,
pub f_vector: Vec<usize>,
pub shelling_order: Vec<usize>,
pub facets: Vec<Vec<usize>>,
}Expand description
Shellable simplicial complex with f-vector and h-vector.
A simplicial complex is shellable if its facets can be ordered so that each new facet’s intersection with the previous ones is pure codimension-1.
Fields§
§dim: usizeDimension of the complex.
f_vector: Vec<usize>f-vector: f[k] = number of k-faces.
shelling_order: Vec<usize>Shelling order of facets (indices into facet list).
facets: Vec<Vec<usize>>Facets as vertex sets.
Implementations§
Source§impl ShellableComplex
impl ShellableComplex
Sourcepub fn new(facets: Vec<Vec<usize>>) -> Self
pub fn new(facets: Vec<Vec<usize>>) -> Self
Create a shellable complex from its facets.
The shelling order is automatically generated (greedy).
Sourcepub fn f_vector_extended(&self) -> Vec<usize>
pub fn f_vector_extended(&self) -> Vec<usize>
f-vector f = (f_{-1}, f_0, f_1, …, f_d) where f_{-1} = 1 (empty face).
Sourcepub fn h_vector(&self) -> Vec<i64>
pub fn h_vector(&self) -> Vec<i64>
h-vector from f-vector via the relation: Σ h_k x^(d+1-k) = Σ f_{k-1} (x-1)^(d+1-k).
Sourcepub fn euler_characteristic(&self) -> i64
pub fn euler_characteristic(&self) -> i64
Euler characteristic from f-vector.
Sourcepub fn dehn_sommerville_check(&self) -> bool
pub fn dehn_sommerville_check(&self) -> bool
Check Dehn-Sommerville relations h_k = h_{d+1-k} for simplicial spheres.
Trait Implementations§
Source§impl Clone for ShellableComplex
impl Clone for ShellableComplex
Source§fn clone(&self) -> ShellableComplex
fn clone(&self) -> ShellableComplex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShellableComplex
impl RefUnwindSafe for ShellableComplex
impl Send for ShellableComplex
impl Sync for ShellableComplex
impl Unpin for ShellableComplex
impl UnsafeUnpin for ShellableComplex
impl UnwindSafe for ShellableComplex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.