prototype trait for Elem<T> + new ciphertext for VmPPmat

This commit is contained in:
Jean-Philippe Bossuat
2025-02-18 11:04:13 +01:00
parent fdc2f3ac42
commit d486e89761
21 changed files with 767 additions and 811 deletions

View File

@@ -7,10 +7,6 @@ pub trait Infos {
/// Returns the base two logarithm of the ring dimension of the receiver.
fn log_n(&self) -> usize;
/// Returns the number of limbs of the receiver.
/// This method is equivalent to [Infos::cols].
fn limbs(&self) -> usize;
/// Returns the number of columns of the receiver.
/// This method is equivalent to [Infos::limbs].
fn cols(&self) -> usize;
@@ -30,11 +26,6 @@ impl Infos for VecZnx {
self.n
}
/// Returns the number of limbs of the [VecZnx].
fn limbs(&self) -> usize {
self.data.len() / self.n
}
/// Returns the number of limbs of the [VecZnx].
fn cols(&self) -> usize {
self.data.len() / self.n
@@ -57,11 +48,6 @@ impl Infos for VecZnxBorrow {
self.n
}
/// Returns the number of limbs of the [VecZnx].
fn limbs(&self) -> usize {
self.limbs
}
/// Returns the number of limbs of the [VecZnx].
fn cols(&self) -> usize {
self.limbs
@@ -83,12 +69,6 @@ impl Infos for VmpPMat {
(usize::BITS - (self.n() - 1).leading_zeros()) as _
}
/// Returns the number of limbs of each [VecZnxDft].
/// This method is equivalent to [Self::cols].
fn limbs(&self) -> usize {
self.cols
}
/// Returns the number of rows (i.e. of [VecZnxDft]) of the [VmpPMat]
fn rows(&self) -> usize {
self.rows