pub struct Ostbc { /* private fields */ }Expand description
An orthogonal space-time block code.
Implementations§
Source§impl Ostbc
impl Ostbc
Sourcepub fn from_generator(
name: &str,
n_tx: usize,
n_slots: usize,
n_symbols: usize,
generator: impl Fn(&[C64]) -> CMat,
) -> Result<Ostbc>
pub fn from_generator( name: &str, n_tx: usize, n_slots: usize, n_symbols: usize, generator: impl Fn(&[C64]) -> CMat, ) -> Result<Ostbc>
The code whose codeword is generator(s) ($T \times n_{t}$, linear in the real
and imaginary parts of the $K$ symbols).
§Errors
Error::Config if the generator does not return n_slots × n_tx matrices or
the code is not orthogonal.
Sourcepub fn rate_3_4(n_tx: usize) -> Result<Ostbc>
pub fn rate_3_4(n_tx: usize) -> Result<Ostbc>
The rate-3/4 code for three or four antennas (three symbols over four channel uses).
§Errors
Error::Config for another number of antennas.
Sourcepub fn encode(&self, s: &[C64]) -> Result<CMat>
pub fn encode(&self, s: &[C64]) -> Result<CMat>
Encode symbols (a multiple of $K$) into the signal of the antennas, $n_{t} \times T \cdot$ blocks (antennas along the rows, channel uses along the columns).
§Errors
Error::Shape if the number of symbols is not a multiple of $K$.
Sourcepub fn decode(
&self,
h: &ArrayView2<'_, C64>,
y: &ArrayView2<'_, C64>,
noise_var: f64,
) -> Result<Estimates>
pub fn decode( &self, h: &ArrayView2<'_, C64>, y: &ArrayView2<'_, C64>, noise_var: f64, ) -> Result<Estimates>
Decode received blocks that share the channel h ($n_{r} \times n_{t}$): y is
$n_{r} \times T \cdot$ blocks. Returns the estimate of every symbol and its noise
variance (the receiver noise has the variance noise_var per antenna); the
equivalent channel is computed once for all the blocks.
§Errors
Error::Shape for inconsistent dimensions, Error::Numerical for a zero
channel.
Sourcepub fn decode_blocks(
&self,
hs: &[CMat],
y: &ArrayView2<'_, C64>,
noise_var: f64,
) -> Result<Estimates>
pub fn decode_blocks( &self, hs: &[CMat], y: &ArrayView2<'_, C64>, noise_var: f64, ) -> Result<Estimates>
Trait Implementations§
Source§impl Precode for Ostbc
The code as a precoder: the first stream of x (a multiple of $K$ symbols) becomes
the $n_{t}$ streams of the antennas.
impl Precode for Ostbc
The code as a precoder: the first stream of x (a multiple of $K$ symbols) becomes
the $n_{t}$ streams of the antennas.