pub struct OESS { /* private fields */ }
Expand description
Encoder / decoder using the OESS algorithm
The implementation follows https://doi.org/10.1109/JLT.2022.3201901. Most of the algorithm is implemented in trellis::Trellis though.
Implementations§
Source§impl OESS
impl OESS
Sourcepub fn new(e_max: usize, n_max: usize, ask: ASK) -> OESS
pub fn new(e_max: usize, n_max: usize, ask: ASK) -> OESS
Returns a new OESS instance
OESS is sensitive to the maximum energy parameter. If there is a lower maximum energy that would allow the same number of bits in the index, all sequences with energy higher than this lower maximum energy will not be used. Thus the OESS algorithm is only defined for the lowest maximum energy that allows for a certain number of bits in the index. More specifically the following condition must hold:
|S(e_max - 8)| < 2^k ≤ |S(e_max)|
|S(E)|
is the cardinality of the set of all amplitude sequences with energy less than or equal toE
k
is a positive integer (equal to the number of bits in the index)
To find an acceptable e_max
argument use OESS::optimal_e_max().
Sourcepub fn optimal_e_max(e_max: usize, n_max: usize, ask: &ASK) -> usize
pub fn optimal_e_max(e_max: usize, n_max: usize, ask: &ASK) -> usize
Returns the next lower optimal e_max
value
An ESS encoder with the provided arguments can encode a certain number of bits. This
function returns the lowest e_max
parameter so that an ESS encoder with the new
e_max
still encodes the same number of bits.
Trait Implementations§
Source§impl DistributionMatcher for OESS
impl DistributionMatcher for OESS
Source§fn amplitude_distribution(&self) -> Vec<f32>
fn amplitude_distribution(&self) -> Vec<f32>
Returns the probabilities of the amplitude values
The probabilities are returned as an array with the lowest index corresponding to the lowest amplitude.
Calculation for the partial trellis is based on formula (36) in section IV-D in https://doi.org/10.1109/JLT.2022.3201901.