pub struct KoalaBearInternalLayerParameters;
Expand description
Contains data needed to define the internal layers of the Poseidon2 permutation.
Trait Implementations§
Source§impl Clone for KoalaBearInternalLayerParameters
impl Clone for KoalaBearInternalLayerParameters
Source§fn clone(&self) -> KoalaBearInternalLayerParameters
fn clone(&self) -> KoalaBearInternalLayerParameters
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 Default for KoalaBearInternalLayerParameters
impl Default for KoalaBearInternalLayerParameters
Source§fn default() -> KoalaBearInternalLayerParameters
fn default() -> KoalaBearInternalLayerParameters
Returns the “default value” for a type. Read more
Source§impl InternalLayerBaseParameters<KoalaBearParameters, 16> for KoalaBearInternalLayerParameters
impl InternalLayerBaseParameters<KoalaBearParameters, 16> for KoalaBearInternalLayerParameters
Source§fn internal_layer_mat_mul(
state: &mut [MontyField31<KoalaBearParameters>; 16],
sum: MontyField31<KoalaBearParameters>,
)
fn internal_layer_mat_mul( state: &mut [MontyField31<KoalaBearParameters>; 16], sum: MontyField31<KoalaBearParameters>, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0]
as it is handled separately.
const INTERNAL_DIAG_MONTY: [MontyField31<KoalaBearParameters>; 16] = INTERNAL_DIAG_MONTY_16
type ArrayLike = [MontyField31<KoalaBearParameters>; 15]
Source§fn generic_internal_linear_layer<FA>(state: &mut [FA; 16])
fn generic_internal_linear_layer<FA>(state: &mut [FA; 16])
Perform the internal matrix multiplication for any Abstract field
which implements multiplication by MontyField31 elements.
Source§impl InternalLayerBaseParameters<KoalaBearParameters, 24> for KoalaBearInternalLayerParameters
impl InternalLayerBaseParameters<KoalaBearParameters, 24> for KoalaBearInternalLayerParameters
Source§fn internal_layer_mat_mul(
state: &mut [MontyField31<KoalaBearParameters>; 24],
sum: MontyField31<KoalaBearParameters>,
)
fn internal_layer_mat_mul( state: &mut [MontyField31<KoalaBearParameters>; 24], sum: MontyField31<KoalaBearParameters>, )
Perform the internal matrix multiplication: s -> (1 + Diag(V))s.
We ignore state[0]
as it is handled separately.
const INTERNAL_DIAG_MONTY: [MontyField31<KoalaBearParameters>; 24] = INTERNAL_DIAG_MONTY_24
type ArrayLike = [MontyField31<KoalaBearParameters>; 23]
Source§fn generic_internal_linear_layer<FA>(state: &mut [FA; 24])
fn generic_internal_linear_layer<FA>(state: &mut [FA; 24])
Perform the internal matrix multiplication for any Abstract field
which implements multiplication by MontyField31 elements.
impl InternalLayerParameters<KoalaBearParameters, 16> for KoalaBearInternalLayerParameters
impl InternalLayerParameters<KoalaBearParameters, 24> for KoalaBearInternalLayerParameters
Auto Trait Implementations§
impl Freeze for KoalaBearInternalLayerParameters
impl RefUnwindSafe for KoalaBearInternalLayerParameters
impl Send for KoalaBearInternalLayerParameters
impl Sync for KoalaBearInternalLayerParameters
impl Unpin for KoalaBearInternalLayerParameters
impl UnwindSafe for KoalaBearInternalLayerParameters
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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