Komm

Latest version: v0.13.0

Safety actively analyzes 688238 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.13.0

Breaking changes

- Removed `BlockEncoder` and `BlockDecoder` classes in favor of direct methods and specialized decoder classes.

- Block code methods are now called directly: `code.encode(u)`, `code.inverse_encode(v)`, and `code.check(r)` (previously `enc_mapping`, `inv_enc_mapping`, and `chk_mapping`). These methods are now vetorized (i.e., support input arrays of any shape). For example, for a code with dimension $k = 2$, instead of `encoder = BlockEncoder(code); encoder([0, 1, 0, 1])`, use `code.encode([[0, 1], [0, 1]])`.
- Decoder methods are now individual classes: `BCJRDecoder`, `BerlekampDecoder`, `ExhaustiveSearchDecoder`, `ReedDecoder`, `SyndromeTableDecoder`, `ViterbiDecoder`, and `WagnerDecoder`. For example, instead of `decoder = komm.BlockDecoder(code, method="exhaustive-search-hard")`, use `decoder = 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 of `decoder([0, 1, 0, 1, 1, 0])`, use `decoder([[0, 1, 0], [1, 1, 0]])`.
- The decoders `majority-logic-repetition-code` and `meggitt` were removed for now.

- Renamed `ConvolutionalStreamDecoder` to `ViterbiStreamDecoder`.

- Merged lossless source coding encoders/decoders into code classes.

- Removed `FixedToVariableEncoder`, `FixedToVariableDecoder`, `VariableToFixedEncoder`, `VariableToFixedDecoder`. For example, instead of `encoder = FixedToVariableEncoder(code); output = encoder(input)`, use `output = code.encode(input)`.

0.12.0

Added

- Implemented [Marcum Q-function](https://komm.dev/ref/marcum_q).

Breaking changes

- Renamed `int2binlist` to `int_to_bits`, `binlist2int` to `bits_to_int`, `qfunc` to `gaussian_q`, `qfuncinv` to `gaussian_q_inv`, `acorr` to `autocorrelation`, and `cyclic_acorr` to `cyclic_autocorrelation`, for consistency with other functions.
- Removed `pack` and `unpack` functions from `komm` module. Instead of `komm.pack(arr, width)`, use `komm.bits_to_int(arr.reshape(-1, width))`; and instead of `komm.unpack(arr, width)`, use `komm.int_to_bits(arr, width).ravel()`.

0.11.0

Breaking changes

- Converted property `finite_state_machine` of `ConvolutionalCode` to a method.
- Removed properties `state_matrix`, `control_matrix`, `observation_matrix`, `transition_matrix` from `ConvolutionalCode`, and replaced them with the method `state_space_representation()`. The new usage is `state_matrix, control_matrix, observation_matrix, transition_matrix = convolutional_code.state_space_representation()`.

0.10.0

Added

- Implemented [relative entropy](https://komm.dev/ref/relative_entropy) (KL divergence) function.
- Implemented [Slepian array](https://komm.dev/ref/SlepianArray).
- Implemented [Lloyd-Max quantizer](https://komm.dev/ref/LloydMaxQuantizer).
- Implemented [Z-Channel](https://komm.dev/ref/ZChannel).
- Implemented [lexicodes](https://komm.dev/ref/Lexicode).
- Added progress bar (via `tqdm`) to potential slow methods.

Breaking changes

- Converted cached properties to cached methods.
- In `BlockCode`: `codewords`, `codeword_weight_distribution`, `minimum_distance`, `coset_leaders`, `coset_leader_weight_distribution`, `packing_radius`, and `covering_radius`.
- In `ReedMullerCode`: `reed_partitions`.
- In `UniformQuantizer`:
- Replaced `input_peak` with `input_range`.
- Removed `"unquant"` choice (use `input_range=(0.0, input_peak)` and `choice="mid-tread"` instead).
- Converted the classes `BinaryErasureChannel`, `BinarySymmetricChannel`, `DiscreteMemorylessChannel`, `AWGNChannel`, `FixedToVariableEncoder`, `FixedToVariableDecoder`, `VariableToFixedEncoder`, `VariableToFixedDecoder`, and `DiscreteMemorylessSource` from mutable to immutable.
- Removed `RationalPolynomial` and `RationalPolynomialFraction` 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 become `method="exhaustive-search-hard"`

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.