Note
Changelog started with version v0.10.0.
- Fixed
parse_prefix_free
whenallow_incomplete=True
.
- Fixed Sardinas–Patterson algorithm.
- Encoding and decoding of variable-to-fixed codes now require the code to be fully covering.
- Removed
primitive_element
method fromFiniteField
class, since the implementation was incorrect. The method was assuming that the modulus was always primitive (which may not be true).
-
Added polynomial irreducibility and primitivity tests for binary polynomials.
-
Restored sequence support in block code and decoders methods.
- Block code methods
encode
,inverse_encode
,check
, and block decoders__call__
now accept sequences spanning multiple blocks (as before v0.13.0) as well as multidimensional arrays.
- Block code methods
-
Added support for multidimensional input in modulation, demodulation, and channel methods.
-
Removed
BlockEncoder
andBlockDecoder
classes in favor of direct methods and specialized decoder classes.- Block code methods are now called directly:
code.encode(u)
,code.inverse_encode(v)
, andcode.check(r)
(previouslyenc_mapping
,inv_enc_mapping
, andchk_mapping
). These methods are now vetorized (i.e., support input arrays of any shape). For example, for a code with dimension$k = 2$ , instead ofencoder = BlockEncoder(code); encoder([0, 1, 0, 1])
, usecode.encode([[0, 1], [0, 1]])
. - Decoder methods are now individual classes:
BCJRDecoder
,BerlekampDecoder
,ExhaustiveSearchDecoder
,ReedDecoder
,SyndromeTableDecoder
,ViterbiDecoder
, andWagnerDecoder
. For example, instead ofdecoder = komm.BlockDecoder(code, method="exhaustive-search-hard")
, usedecoder = komm.ExhaustiveSearchDecoder(code, input_type="hard")
. The decoder__call__
are now vectorized (i.e., support input arrays of any shape). For example, for a code with length$n = 3$ , instead ofdecoder([0, 1, 0, 1, 1, 0])
, usedecoder([[0, 1, 0], [1, 1, 0]])
. - The decoders
majority-logic-repetition-code
andmeggitt
were removed for now.
- Block code methods are now called directly:
-
Renamed
ConvolutionalStreamDecoder
toViterbiStreamDecoder
. -
Merged lossless source coding encoders/decoders into code classes.
- Removed
FixedToVariableEncoder
,FixedToVariableDecoder
,VariableToFixedEncoder
,VariableToFixedDecoder
. For example, instead ofencoder = FixedToVariableEncoder(code); output = encoder(input)
, useoutput = code.encode(input)
.
- Removed
- Implemented Marcum Q-function.
- Renamed
int2binlist
toint_to_bits
,binlist2int
tobits_to_int
,qfunc
togaussian_q
,qfuncinv
togaussian_q_inv
,acorr
toautocorrelation
, andcyclic_acorr
tocyclic_autocorrelation
, for consistency with other functions. - Removed
pack
andunpack
functions fromkomm
module. Instead ofkomm.pack(arr, width)
, usekomm.bits_to_int(arr.reshape(-1, width))
; and instead ofkomm.unpack(arr, width)
, usekomm.int_to_bits(arr, width).ravel()
.
- Converted property
finite_state_machine
ofConvolutionalCode
to a method. - Removed properties
state_matrix
,control_matrix
,observation_matrix
,transition_matrix
fromConvolutionalCode
, and replaced them with the methodstate_space_representation()
. The new usage isstate_matrix, control_matrix, observation_matrix, transition_matrix = convolutional_code.state_space_representation()
.
- Implemented relative entropy (KL divergence) function.
- Implemented Slepian array.
- Implemented Lloyd-Max quantizer.
- Implemented Z-Channel.
- Implemented lexicodes.
- Added progress bar (via
tqdm
) to potential slow methods.
- Converted cached properties to cached methods.
- In
BlockCode
:codewords
,codeword_weight_distribution
,minimum_distance
,coset_leaders
,coset_leader_weight_distribution
,packing_radius
, andcovering_radius
. - In
ReedMullerCode
:reed_partitions
.
- In
- In
UniformQuantizer
:- Replaced
input_peak
withinput_range
. - Removed
"unquant"
choice (useinput_range=(0.0, input_peak)
andchoice="mid-tread"
instead).
- Replaced
- Converted the classes
BinaryErasureChannel
,BinarySymmetricChannel
,DiscreteMemorylessChannel
,AWGNChannel
,FixedToVariableEncoder
,FixedToVariableDecoder
,VariableToFixedEncoder
,VariableToFixedDecoder
, andDiscreteMemorylessSource
from mutable to immutable. - Removed
RationalPolynomial
andRationalPolynomialFraction
classes. - Refactored algebra and pulse modules. See documentation for new usage.
- Adjusted string literals in
BlockDecoder
to kebab-case. For example,method="exhaustive_search_hard"
should becomemethod="exhaustive-search-hard"