Skip to main content

Swarmauri Hamming (7,4) matrix community package.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_matrix_hamming74


Swarmauri Matrix Hamming(7,4)

The swarmauri_matrix_hamming74 package provides a binary Hamming (7,4) code matrix that extends MatrixBase. It includes generator and parity-check representations, encoding and decoding helpers, and tight integration with the swarmauri_metric_hamming package for error detection and correction workflows.

Features

  • 🧮 Binary matrix implementation built on MatrixBase with full indexing and arithmetic support.
  • 🧷 Generator and parity-check matrix accessors for classic Hamming (7,4) coding schemes.
  • 📨 Encoding, syndrome calculation, and nearest-codeword decoding helpers powered by the Hamming metric.
  • 🔁 Binary-safe matrix operations (addition, subtraction, multiplication, and matrix multiplication modulo 2).

Installation

Using uv

uv pip install swarmauri_matrix_hamming74

Using pip

pip install swarmauri_matrix_hamming74

Usage

from swarmauri_matrix_hamming74 import Hamming74Matrix

matrix = Hamming74Matrix()
message = [1, 0, 1, 1]
codeword = matrix.encode(message)

# Introduce a single-bit error
received = codeword.copy()
received[3] ^= 1

# Decode using syndrome lookup and Hamming distance search
nearest = matrix.nearest_codeword(received)
print(nearest)  # Recovers the original codeword

Support

  • Python 3.10, 3.11, and 3.12
  • Licensed under the Apache-2.0 license

Contributing

We welcome contributions! Please submit issues and pull requests through the Swarmauri SDK GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_matrix_hamming74-0.9.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmauri_matrix_hamming74-0.9.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_matrix_hamming74-0.9.2.tar.gz.

File metadata

  • Download URL: swarmauri_matrix_hamming74-0.9.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_matrix_hamming74-0.9.2.tar.gz
Algorithm Hash digest
SHA256 95269f4a13d28d00c3c4d00f34ab2deb1255f4cf8a2bff8f63753e543b8ddf42
MD5 5a2e1e3493cff7b1d3f5621b4c60788e
BLAKE2b-256 2958d635198b88aae83d4464fd171169fc2cd9b34231e650181e4b360ac38ced

See more details on using hashes here.

File details

Details for the file swarmauri_matrix_hamming74-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_matrix_hamming74-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for swarmauri_matrix_hamming74-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d706b34ff3c541f2d9a9fa078c349e498ac7d080ff0efbd934093696f891dbc7
MD5 ba200482543499f2ecd10fdaeb2e473d
BLAKE2b-256 50ddf1436956bc2fb77270cf8dbbc210a1c8ba7e55df685db89e8e7b498455c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page