mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 21:26:41 +01:00
prototype trait for Elem<T> + new ciphertext for VmPPmat
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user