|
C(++)ECCO
C++ Error Control COding: a header-only library for ECC simulations and experiments, modeling complete coding systems across arbitrary finite fields and complex inter-field relationships - Christian Senger <senger@inue.uni-stuttgart.de>
|
Vector arithmetic library. More...


Go to the source code of this file.
Classes | |
| class | CECCO::Vector< T > |
| Vector v = (v₀, v₁, …, vₙ₋₁) over a CECCO::ComponentType. More... | |
Namespaces | |
| namespace | CECCO |
| Provides a framework for error correcting codes. | |
| namespace | CECCO::details |
| Contains implementation details not to be exposed to the user. Functions and classes here may change without notice. | |
Functions | |
| template<ComponentType T> | |
| T | CECCO::inner_product (const Vector< T > &lhs, const Vector< T > &rhs) |
| Inner product ⟨lhs, rhs⟩ = Σᵢ lhs[i] · rhs[i]. | |
| template<ComponentType T> | |
| Vector< T > | CECCO::Schur_product (const Vector< T > &lhs, const Vector< T > &rhs) |
| Schur (component-wise) product. | |
| template<ComponentType T> | |
| Vector< T > | CECCO::unit_vector (size_t length, size_t i) |
| Length-length vector with T(1) at index i and zeros elsewhere. | |
| template<ComponentType T> | |
| std::ostream & | CECCO::operator<< (std::ostream &os, const Vector< T > &rhs) |
| Stream output as ( c₀, c₁, …, cₙ₋₁ ). | |
| template<ComponentType T> | |
| Vector< T > | CECCO::delete_component (const Vector< T > &lhs, size_t i) |
| template<ComponentType T> | |
| Vector< T > | CECCO::delete_component (Vector< T > &&lhs, size_t i) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator+ (const Vector< T > &lhs, const Vector< T > &rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator+ (Vector< T > &&lhs, const Vector< T > &rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator+ (const Vector< T > &lhs, Vector< T > &&rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator+ (Vector< T > &&lhs, Vector< T > &&rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator- (const Vector< T > &lhs, const Vector< T > &rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator- (Vector< T > &&lhs, const Vector< T > &rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator- (const Vector< T > &lhs, Vector< T > &&rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator- (Vector< T > &&lhs, Vector< T > &&rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator* (const Vector< T > &lhs, const T &rhs) noexcept |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator* (Vector< T > &&lhs, const T &rhs) noexcept |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator* (const T &lhs, const Vector< T > &rhs) noexcept |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator* (const T &lhs, Vector< T > &&rhs) noexcept |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::operator/ (const Vector< T > &lhs, const T &rhs) |
| template<FieldType T> | |
| constexpr Vector< T > | CECCO::operator/ (Vector< T > &&lhs, const T &rhs) |
| template<ComponentType T> | |
| Vector< T > | CECCO::convolve (const Vector< T > &v, const Vector< T > &w) |
| Discrete linear convolution (= coefficients of Polynomial(v) * Polynomial(w)). | |
| template<ComponentType T> | |
| Vector< T > | CECCO::randomize (const Vector< T > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::randomize (Vector< T > &&v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::set_component (const Vector< T > &v, size_t i, const T &c) |
| template<ComponentType T> | |
| Vector< T > | CECCO::set_component (Vector< T > &&v, size_t i, const T &c) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::get_subvector (const Vector< T > &v, size_t start, size_t end) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::get_subvector (Vector< T > &&v, size_t start, size_t end) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::set_subvector (Vector< T > v, size_t start, const Vector< T > &w) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::set_subvector (Vector< T > &&v, size_t start, const Vector< T > &w) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::concatenate (const Vector< T > &lhs, const Vector< T > &rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::concatenate (Vector< T > &&lhs, const Vector< T > &rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::concatenate (const Vector< T > &lhs, Vector< T > &&rhs) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::concatenate (Vector< T > &&lhs, Vector< T > &&rhs) |
| template<ComponentType T> | |
| Vector< T > | CECCO::delete_components (const Vector< T > &lhs, const std::vector< size_t > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::delete_components (Vector< T > &&lhs, const std::vector< size_t > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::erase_components (const Vector< T > &lhs, const std::vector< size_t > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::erase_components (Vector< T > &&lhs, const std::vector< size_t > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::erase_component (const Vector< T > &lhs, size_t i) |
| template<ComponentType T> | |
| Vector< T > | CECCO::erase_component (Vector< T > &&lhs, size_t i) |
| template<ComponentType T> | |
| Vector< T > | CECCO::unerase_components (const Vector< T > &lhs, const std::vector< size_t > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::unerase_components (Vector< T > &&lhs, const std::vector< size_t > &v) |
| template<ComponentType T> | |
| Vector< T > | CECCO::unerase_component (const Vector< T > &lhs, size_t i) |
| template<ComponentType T> | |
| Vector< T > | CECCO::unerase_component (Vector< T > &&lhs, size_t i) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::pad_front (const Vector< T > &v, size_t n) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::pad_front (Vector< T > &&v, size_t n) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::pad_back (const Vector< T > &v, size_t n) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::pad_back (Vector< T > &&v, size_t n) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::rotate_left (const Vector< T > &v, size_t i) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::rotate_left (Vector< T > &&v, size_t i) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::rotate_right (const Vector< T > &v, size_t i) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::rotate_right (Vector< T > &&v, size_t i) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::reverse (const Vector< T > &v) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::reverse (Vector< T > &&v) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::fill (const Vector< T > &v, const T &value) |
| template<ComponentType T> | |
| constexpr Vector< T > | CECCO::fill (Vector< T > &&v, const T &value) |
| template<ReliablyComparableType T> | |
| constexpr bool | CECCO::operator== (const Vector< T > &lhs, const Vector< T > &rhs) noexcept |
| template<ReliablyComparableType T> | |
| constexpr bool | CECCO::operator!= (const Vector< T > &lhs, const Vector< T > &rhs) noexcept |
Error control coding-related functions | |
| double | CECCO::dE (const Vector< std::complex< double > > &lhs, const Vector< std::complex< double > > &rhs) |
| Euclidean distance ‖lhs − rhs‖₂ = √(Σᵢ |lhs[i] − rhs[i]|²) for complex vectors. | |
| template<ReliablyComparableType T> | |
| constexpr size_t | CECCO::wH (const Vector< T > &v) noexcept |
| Hamming weight; see Vector::wH for semantics. | |
| template<ReliablyComparableType T> | |
| std::vector< size_t > | CECCO::supp (const Vector< T > &v) |
| Support; see Vector::supp for semantics. | |
| template<ReliablyComparableType T> | |
| size_t | CECCO::dH (const Vector< T > &lhs, const Vector< T > &rhs) |
| Hamming distance dₕ(lhs, rhs) = wₕ(lhs − rhs). | |
| template<ReliablyComparableType T> | |
| size_t | CECCO::dH (Vector< T > &&lhs, const Vector< T > &rhs) |
| template<ReliablyComparableType T> | |
| size_t | CECCO::dH (const Vector< T > &lhs, Vector< T > &&rhs) |
| template<ReliablyComparableType T> | |
| size_t | CECCO::dH (Vector< T > &&lhs, Vector< T > &&rhs) |
| template<ReliablyComparableType T> | |
| constexpr size_t | CECCO::burst_length (const Vector< T > &v) noexcept |
| Burst length; see Vector::burst_length for semantics. | |
| template<ReliablyComparableType T> | |
| constexpr size_t | CECCO::cyclic_burst_length (const Vector< T > &v) noexcept |
| Cyclic burst length; see Vector::cyclic_burst_length for semantics. | |
Vector arithmetic library.
Licensed for noncommercial use only, including academic teaching, research, and personal non-profit purposes. Commercial use is prohibited without a separate commercial license. See the LICENSE file in the repository root for full terms and how to request a commercial license.
Vector arithmetic for error-control coding over any CECCO::ComponentType (finite fields, floating-point, complex, signed integers including InfInt). Supports safe cross-field conversions via CECCO::SubfieldOf / CECCO::ExtensionOf / CECCO::largest_common_subfield_t, bidirectional Vector ↔ Matrix integration, and lazy O(1) caching of Hamming weight / burst length.
Definition in file vectors.hpp.