pub struct GlobalSection {
pub values: Vec<Vec<f64>>,
pub is_exact: bool,
pub residual: f64,
}Expand description
A (possibly approximate) global section of a cellular sheaf.
A global section assigns a vector to each stalk such that restriction maps are satisfied on every edge. Equivalently, it lies in the kernel of the sheaf Laplacian.
Fields§
§values: Vec<Vec<f64>>Stalk values at each node.
is_exact: boolTrue if this is an exact global section (residual ≈ 0).
residual: f64The residual ||L_F x||.
Implementations§
Source§impl GlobalSection
impl GlobalSection
Sourcepub fn new(
sheaf: &CellularSheaf,
values: Vec<Vec<f64>>,
tol: f64,
) -> Result<Self, SheafError>
pub fn new( sheaf: &CellularSheaf, values: Vec<Vec<f64>>, tol: f64, ) -> Result<Self, SheafError>
Build a section from per-node values and check exactness.
Sourcepub fn find(
sheaf: &CellularSheaf,
max_iter: usize,
tol: f64,
) -> Result<Self, SheafError>
pub fn find( sheaf: &CellularSheaf, max_iter: usize, tol: f64, ) -> Result<Self, SheafError>
Try to find a nontrivial global section by solving L_F x = 0 using inverse iteration toward the smallest eigenvalue.
Trait Implementations§
Source§impl Clone for GlobalSection
impl Clone for GlobalSection
Source§fn clone(&self) -> GlobalSection
fn clone(&self) -> GlobalSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlobalSection
impl Debug for GlobalSection
Source§impl<'de> Deserialize<'de> for GlobalSection
impl<'de> Deserialize<'de> for GlobalSection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GlobalSection
impl RefUnwindSafe for GlobalSection
impl Send for GlobalSection
impl Sync for GlobalSection
impl Unpin for GlobalSection
impl UnsafeUnpin for GlobalSection
impl UnwindSafe for GlobalSection
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