pub struct SubmoduleMembership<R: Ring> { /* private fields */ }Expand description
Replayable coefficients proving that an element belongs to a submodule.
The coefficient vector is expressed in the canonical generator map retained
by Submodule, so generator_map * coefficients = element can be checked
without trusting the membership computation.
Implementations§
Source§impl<R: Ring> SubmoduleMembership<R>
impl<R: Ring> SubmoduleMembership<R>
Sourcepub fn element(&self) -> &ModuleElement<R>
pub fn element(&self) -> &ModuleElement<R>
Ambient element certified to lie in the submodule.
Sourcepub fn coefficients(&self) -> &Vector<R>
pub fn coefficients(&self) -> &Vector<R>
Coefficients in the retained canonical generators.
Sourcepub fn verify(&self) -> Result<(), VerificationError>
pub fn verify(&self) -> Result<(), VerificationError>
Reconstruct the represented element from the canonical generator map.
Sourcepub fn to_json(&self) -> Result<String, NoetherError>
pub fn to_json(&self) -> Result<String, NoetherError>
Serialize this proof with exact context identity and replay data.
Sourcepub fn from_json(value: &str) -> Result<Self, NoetherError>
pub fn from_json(value: &str) -> Result<Self, NoetherError>
Deserialize and replay a membership proof.
Trait Implementations§
Source§impl<R: Clone + Ring> Clone for SubmoduleMembership<R>
impl<R: Clone + Ring> Clone for SubmoduleMembership<R>
Source§fn clone(&self) -> SubmoduleMembership<R>
fn clone(&self) -> SubmoduleMembership<R>
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 moreSource§impl<'de, R> Deserialize<'de> for SubmoduleMembership<R>
impl<'de, R> Deserialize<'de> for SubmoduleMembership<R>
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
Source§impl<R: Ring> SemanticType for SubmoduleMembership<R>
impl<R: Ring> SemanticType for SubmoduleMembership<R>
Source§const TYPE_ID: &'static str = "noether/homalg/SubmoduleMembership@1"
const TYPE_ID: &'static str = "noether/homalg/SubmoduleMembership@1"
Versioned, language-neutral semantic identity.
Source§fn canonical_bytes(&self) -> Result<Vec<u8>, NoetherError>
fn canonical_bytes(&self) -> Result<Vec<u8>, NoetherError>
Serialize without backend- or language-specific identity.
Source§fn describe() -> &'static TypeDescription
fn describe() -> &'static TypeDescription
Return static discovery metadata for the type.
Auto Trait Implementations§
impl<R> Freeze for SubmoduleMembership<R>
impl<R> RefUnwindSafe for SubmoduleMembership<R>
impl<R> Send for SubmoduleMembership<R>
impl<R> Sync for SubmoduleMembership<R>
impl<R> Unpin for SubmoduleMembership<R>
impl<R> UnwindSafe for SubmoduleMembership<R>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more