pub struct IntegrityValidator {
pub verbose: bool,
}Expand description
Validates data integrity for VSA operations
Fields§
§verbose: boolEnable verbose logging
Implementations§
Source§impl IntegrityValidator
impl IntegrityValidator
pub fn new() -> Self
pub fn verbose(self) -> Self
Sourcepub fn validate_sparse(&self, v: &SparseVec) -> IntegrityReport
pub fn validate_sparse(&self, v: &SparseVec) -> IntegrityReport
Validate sparse vector invariants
Checks:
- No overlap between pos and neg indices
- Indices are sorted
- No duplicate indices
Sourcepub fn validate_bind_invariants(
&self,
a: &SparseVec,
b: &SparseVec,
) -> IntegrityReport
pub fn validate_bind_invariants( &self, a: &SparseVec, b: &SparseVec, ) -> IntegrityReport
Validate algebraic invariants for bind operation
Checks:
- Commutativity: A ⊙ B = B ⊙ A
Sourcepub fn validate_bundle_invariants(
&self,
a: &SparseVec,
b: &SparseVec,
) -> IntegrityReport
pub fn validate_bundle_invariants( &self, a: &SparseVec, b: &SparseVec, ) -> IntegrityReport
Validate bundle operation properties
Sourcepub fn detect_differences(
&self,
expected: &SparseVec,
actual: &SparseVec,
) -> IntegrityReport
pub fn detect_differences( &self, expected: &SparseVec, actual: &SparseVec, ) -> IntegrityReport
Detect potential corruption by comparing two vectors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IntegrityValidator
impl RefUnwindSafe for IntegrityValidator
impl Send for IntegrityValidator
impl Sync for IntegrityValidator
impl Unpin for IntegrityValidator
impl UnwindSafe for IntegrityValidator
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