arnaucube
arnaucube/poulpyPublic Self-hosted repository
poulpy/base2k/src/infos.rs
base2k/src/infos.rsRaw
 1use crate::LAYOUT;
 2
 3pub trait Infos {
 4    /// Returns the ring degree of the receiver.
 5    fn n(&self) -> usize;
 6
 7    /// Returns the base two logarithm of the ring dimension of the receiver.
 8    fn log_n(&self) -> usize;
 9
10    /// Returns the number of stacked polynomials.
11    fn size(&self) -> usize;
12
13    /// Returns the memory layout of the stacked polynomials.
14    fn layout(&self) -> LAYOUT;
15
16    /// Returns the number of columns of the receiver.
17    /// This method is equivalent to [Infos::cols].
18    fn cols(&self) -> usize;
19
20    /// Returns the number of rows of the receiver.
21    fn rows(&self) -> usize;
22}