SBU Engine: Unified Block Syntax for Mathematical Operations
Project description
🛠️ Symbol Table (Available Operators) Use these symbols in the op parameter of the eject method to perform instantaneous calculations:
🛠️ SBU Operator Table (Version 1.0.2) Symbol (op),Internal Function,Operation Description """sum""",sum_op,Total sum of all block elements. """mult""",mult_op,Product (multiplication) of all items. """avg""",avg_op,Calculates the simple arithmetic mean. """sqrt""",sqrt_op,Calculates the square root of each individual element. """diff""",diff_op,Difference between the last and the first term of the block. """approx""",approx_op,Rounding of values (default: 2 decimal places). """wave""",wave_op,Applies oscillatory function (sin(n) * cos(n)). """limit""",limit_op,Noise filter (zeros values below a tolerance). """const""",const_op,Multiplication of all elements by a constant c. """integ""",integ_op,Simple numerical integration (Total Sum * Step). """median""",median_op,Calculation of the central value (median) of the data block. """std""",std_op,Measure of statistical dispersion (standard deviation). """min""",min_op,Returns the smallest value found in the block. """max""",max_op,Returns the largest value found in the block. """range""",range_op,Difference between the maximum and minimum value (amplitude). """sin""",sin_op,Applies the Sine function to each individual element. """cos""",cos_op,Applies the Cosine function to each individual element. """tan""",tan_op,Applies the Tangent function to each individual element. """log""",log_op,Natural logarithm (base e) of the elements. """pow""",pow_op,Raises elements to a power p (default 2). """norm""",norm_op,Rescales the block to the linear scale [0, 1]. """clip""",clip_op,Keeps values within a defined interval (min/max). """abs""",abs_op,Absolute value (positive) of each element in the block. """ceil""",ceil_op,Rounds each element to the upper integer. """floor""",floor_op,Rounds each element to the lower integer. """var""",var_op,Calculation of the statistical variance of the data block.
📖 Usage Example (Visual Sample) See how the SBU engine processes a list of data with fine adjustment:
Python from oriebir_math import SBU
1. Initialize the SBU engine
sbu = SBU()
2. Define your input block
data = [10.5, 20.2, 30.8, 5.1]
3. Execute the operation with an Adjustment
The SBU rule subtracts the sum of 'adjustment' from the result of the 'op' operation.
result = sbu.eject( input_block=data, op="sum", adjustment=[1.5, 2.5] )
pip install pytest
pytest tests/test_sbu_complete.py
print(f"Final Result: {result}")
Internal calculation: (10.5 + 20.2 + 30.8 + 5.1) - (1.5 + 2.5) = 62.6
======================= TEST SESSION SUMMARY ======================= Plataforma: win32 | Python: 3.13.11 | Pytest: 9.0.2 Diretório Raiz: oriebir_math_project Configuração: pyproject.toml
Coletados: 27 itens Status: 27 PASSED (100% de aproveitamento) Tempo de execução: 0.16s
Categoria,Operadores Validados,Resultado Aritmética de Bloco,"sum, mult, avg, diff, const, integ",PASS ✅ Estatística Avançada,"median, std, var, min, max, range",PASS ✅ Trigonometria,"sin, cos, tan, wave",PASS ✅ Transformações,"sqrt, log, pow, abs, ceil, floor",PASS ✅ Data Cleaning,"norm, clip, limit, approx",PASS ✅ Regra SBU,Lógica de Ajuste (Adjustment),PASS ✅
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oriebir_math-1.0.2.tar.gz.
File metadata
- Download URL: oriebir_math-1.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8778f763080d2f457b763a6b43495d54299bc977610bfd6344f236fa95937730
|
|
| MD5 |
277d06d303e3344d89c889f6940bfaac
|
|
| BLAKE2b-256 |
f3c64f211e8be5e09cf28f8235e1604c9684c8ea6e7e5d4820dd4568b5f3da7b
|
File details
Details for the file oriebir_math-1.0.2-py3-none-any.whl.
File metadata
- Download URL: oriebir_math-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86fe54840f4752a5cc3807d08234174c34f0b893ed19853828979093b07bd288
|
|
| MD5 |
1239c0938e2e35ca725d7af35939b8a9
|
|
| BLAKE2b-256 |
9eaa6ed3cdfe736d96440e82988cc0511902e7d56bfe7f75145122123503802e
|