pub struct SheafStructure { /* private fields */ }Expand description
Sheaf structure for consistency checking
A sheaf enforces that local data (sections) must agree on overlaps.
Implementations§
Source§impl SheafStructure
impl SheafStructure
Sourcepub fn add_section(&self, section: Section) -> SectionId
pub fn add_section(&self, section: Section) -> SectionId
Add a section to the sheaf
Sourcepub fn get_section(&self, id: &SectionId) -> Option<Section>
pub fn get_section(&self, id: &SectionId) -> Option<Section>
Get a section by ID
Sourcepub fn restrict(&self, section: &Section, subdomain: &Domain) -> Value
pub fn restrict(&self, section: &Section, subdomain: &Domain) -> Value
Restrict a section to a subdomain
This implements the restriction map ρ: F(U) → F(V) for V ⊆ U
Sourcepub fn update_sections(
&mut self,
hyperedge_id: HyperedgeId,
entities: &[EntityId],
) -> Result<(), Error>
pub fn update_sections( &mut self, hyperedge_id: HyperedgeId, entities: &[EntityId], ) -> Result<(), Error>
Update sections when a hyperedge is created
Sourcepub fn check_consistency(
&self,
section_ids: &[SectionId],
) -> SheafConsistencyResult
pub fn check_consistency( &self, section_ids: &[SectionId], ) -> SheafConsistencyResult
Check sheaf consistency (from pseudocode: CheckSheafConsistency)
Verifies that local sections agree on their overlaps, satisfying the sheaf axioms.
Sourcepub fn get_hyperedge_sections(
&self,
hyperedge_id: &HyperedgeId,
) -> Vec<SectionId>
pub fn get_hyperedge_sections( &self, hyperedge_id: &HyperedgeId, ) -> Vec<SectionId>
Get sections associated with a hyperedge
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SheafStructure
impl !RefUnwindSafe for SheafStructure
impl Send for SheafStructure
impl Sync for SheafStructure
impl Unpin for SheafStructure
impl !UnwindSafe for SheafStructure
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