pub struct LinearTransformationLayout {
pub indexes: Vec<i64>,
pub slots: usize,
pub strategy: LinearTransformationStrategy,
}Expand description
Scheme-agnostic specification of a linear transformation.
Carries only the integer-level information needed to derive the BSGS schedule: the non-zero diagonal indexes, the slot count, and the schedule-selection strategy.
Fields§
§indexes: Vec<i64>Non-zero diagonal indexes of the matrix.
slots: usizeNumber of slots (typically n / 2 for a CKKS plaintext over C^{n/2}).
strategy: LinearTransformationStrategyStrategy used to pick the BSGS schedule.
Implementations§
Source§impl LinearTransformationLayout
impl LinearTransformationLayout
Sourcepub fn index(&self) -> LinearTransformationPlan
pub fn index(&self) -> LinearTransformationPlan
Returns the BSGS index schedule implied by this layout.
Sourcepub fn plan(&self, giant_step: usize) -> LinearTransformationPlan
pub fn plan(&self, giant_step: usize) -> LinearTransformationPlan
Returns the BSGS schedule for an explicit giant_step, ignoring strategy.
Sourcepub fn baby_steps(&self) -> Vec<i64>
pub fn baby_steps(&self) -> Vec<i64>
Distinct baby-step rotations (k) used by the schedule.
This is the set of rotations the prepared baby cache must hold; pass it
to LinearTransformationBabySteps::alloc to size the cache up-front.
Sourcepub fn galois_elements(&self, cyclotomic_order: i64) -> Vec<i64>
pub fn galois_elements(&self, cyclotomic_order: i64) -> Vec<i64>
Galois elements required for all non-zero baby- and giant-step rotations.
Trait Implementations§
Source§impl Clone for LinearTransformationLayout
impl Clone for LinearTransformationLayout
Source§fn clone(&self) -> LinearTransformationLayout
fn clone(&self) -> LinearTransformationLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinearTransformationLayout
impl Debug for LinearTransformationLayout
impl Eq for LinearTransformationLayout
impl StructuralPartialEq for LinearTransformationLayout
Auto Trait Implementations§
impl Freeze for LinearTransformationLayout
impl RefUnwindSafe for LinearTransformationLayout
impl Send for LinearTransformationLayout
impl Sync for LinearTransformationLayout
impl Unpin for LinearTransformationLayout
impl UnsafeUnpin for LinearTransformationLayout
impl UnwindSafe for LinearTransformationLayout
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
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> ⓘ
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> ⓘ
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