hypercomplex-engine 0.4.2.6__tar.gz → 0.4.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hypercomplex_engine-0.4.2.6/hypercomplex_engine.egg-info → hypercomplex_engine-0.4.2.7}/PKG-INFO +20 -19
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/README.md +18 -17
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/printer/cd_table_printer.py +1 -2
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7/hypercomplex_engine.egg-info}/PKG-INFO +20 -19
- hypercomplex_engine-0.4.2.7/hypercomplex_engine.egg-info/SOURCES.txt +37 -0
- hypercomplex_engine-0.4.2.7/hypercomplex_engine.egg-info/top_level.txt +1 -0
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/pyproject.toml +3 -3
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/tests/test_dual_tuple_regression.py +3 -2
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/tests/test_fast_mode.py +3 -3
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/tests/test_fixes_0_4.py +1 -1
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/tests/test_mega_mother.py +1 -1
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/tests/test_split_dim.py +1 -1
- hypercomplex_engine-0.4.2.6/hypercomplex_engine.egg-info/SOURCES.txt +0 -38
- hypercomplex_engine-0.4.2.6/hypercomplex_engine.egg-info/top_level.txt +0 -1
- hypercomplex_engine-0.4.2.6/tests/test_logging.py +0 -66
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/LICENSE +0 -0
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/NOTICE +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/__init__.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/__init__.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/basis_element.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/basis_notation.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/fast/__init__.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/fast/bit_utils.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/fast/fast_dual.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/fast/fast_split.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/fast/fast_standard.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/holographic/__init__.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/holographic/dual.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/holographic/split.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/holographic/standard.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/table_builder/__init__.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/table_builder/common.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/table_builder/dual.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/table_builder/split.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/table_builder/standard.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/core/validation.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/facade.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/printer/__init__.py +0 -0
- {hypercomplex_engine-0.4.2.6/hypercomplex-engine → hypercomplex_engine-0.4.2.7/hypercomplex_engine}/printer/cd_format.py +0 -0
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/hypercomplex_engine.egg-info/dependency_links.txt +0 -0
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/hypercomplex_engine.egg-info/requires.txt +0 -0
- {hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/setup.cfg +0 -0
{hypercomplex_engine-0.4.2.6/hypercomplex_engine.egg-info → hypercomplex_engine-0.4.2.7}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hypercomplex-engine
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.7
|
|
4
4
|
Summary: Fast O(1)/O(n) multiplication engine for arbitrary dimensions and table generator for ordinary, split, and dual Cayley-Dickson algebras.
|
|
5
5
|
Author-email: Maher Ben Abdessalem <ba.maher94@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/maher1719/hypercomplex-engine
|
|
8
8
|
Project-URL: Repository, https://github.com/maher1719/hypercomplex-engine
|
|
9
9
|
Project-URL: Preprint: Sign Structure, https://doi.org/10.6084/m9.figshare.33705022
|
|
10
|
-
Keywords: hypercomplex,cayley-dickson,quaternions,octonions,split-algebra,math,physics,geometry
|
|
10
|
+
Keywords: hypercomplex,cayley-dickson,quaternions,octonions,split-algebra,math,physics,geometry,sedenions
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -111,7 +111,7 @@ pytest -v
|
|
|
111
111
|
The simplest way to use the library is through the top-level facade API.
|
|
112
112
|
|
|
113
113
|
```python
|
|
114
|
-
from
|
|
114
|
+
from hypercomplex_engine import (
|
|
115
115
|
build_table,
|
|
116
116
|
multiply,
|
|
117
117
|
format_element,
|
|
@@ -324,7 +324,7 @@ multiply(kind, a, b, dim=None, engine="fast")
|
|
|
324
324
|
Example:
|
|
325
325
|
|
|
326
326
|
```python
|
|
327
|
-
from
|
|
327
|
+
from hypercomplex_engine import multiply
|
|
328
328
|
|
|
329
329
|
a = (1, 3)
|
|
330
330
|
b = (1, 5)
|
|
@@ -355,7 +355,7 @@ For `split`, `dual` and `dual_split`, `dim` is required.
|
|
|
355
355
|
## Table builders directly
|
|
356
356
|
|
|
357
357
|
```python
|
|
358
|
-
from
|
|
358
|
+
from hypercomplex_engine import (
|
|
359
359
|
StandardTableBuilder,
|
|
360
360
|
SplitTableBuilder,
|
|
361
361
|
DualTableBuilder,
|
|
@@ -394,7 +394,7 @@ For dual tables:
|
|
|
394
394
|
## Multipliers directly
|
|
395
395
|
|
|
396
396
|
```python
|
|
397
|
-
from
|
|
397
|
+
from hypercomplex_engine import (
|
|
398
398
|
StandardHolographic,
|
|
399
399
|
SplitHolographic,
|
|
400
400
|
DualHolographic,
|
|
@@ -433,7 +433,7 @@ print(result)
|
|
|
433
433
|
## Fast O(1) multipliers directly
|
|
434
434
|
|
|
435
435
|
```python
|
|
436
|
-
from
|
|
436
|
+
from hypercomplex_engine import (
|
|
437
437
|
FastStandard,
|
|
438
438
|
FastSplit,
|
|
439
439
|
FastDual,
|
|
@@ -484,7 +484,7 @@ print(result)
|
|
|
484
484
|
Example:
|
|
485
485
|
|
|
486
486
|
```python
|
|
487
|
-
from
|
|
487
|
+
from hypercomplex_engine import format_element
|
|
488
488
|
|
|
489
489
|
element = (-1, 5)
|
|
490
490
|
|
|
@@ -517,25 +517,25 @@ This section is for contributors, benchmarking, physics engines, and symbolic pi
|
|
|
517
517
|
If you prefer explicit imports:
|
|
518
518
|
|
|
519
519
|
```python
|
|
520
|
-
from
|
|
520
|
+
from hypercomplex_engine.core.table_builder import (
|
|
521
521
|
StandardTableBuilder,
|
|
522
522
|
SplitTableBuilder,
|
|
523
523
|
DualTableBuilder,
|
|
524
524
|
)
|
|
525
525
|
|
|
526
|
-
from
|
|
526
|
+
from hypercomplex_engine.core.holographic import (
|
|
527
527
|
StandardHolographic,
|
|
528
528
|
SplitHolographic,
|
|
529
529
|
DualHolographic,
|
|
530
530
|
)
|
|
531
531
|
|
|
532
|
-
from
|
|
532
|
+
from hypercomplex_engine.core.fast import (
|
|
533
533
|
FastStandard,
|
|
534
534
|
FastSplit,
|
|
535
535
|
FastDual,
|
|
536
536
|
)
|
|
537
537
|
|
|
538
|
-
from
|
|
538
|
+
from hypercomplex_engine.printer import (
|
|
539
539
|
CDFormat,
|
|
540
540
|
CDTablePrinter,
|
|
541
541
|
)
|
|
@@ -546,7 +546,7 @@ from hypercomplex.printer import (
|
|
|
546
546
|
## Cross-validating O(1) against the full table
|
|
547
547
|
|
|
548
548
|
```python
|
|
549
|
-
from
|
|
549
|
+
from hypercomplex_engine import StandardTableBuilder, FastStandard
|
|
550
550
|
|
|
551
551
|
builder = StandardTableBuilder()
|
|
552
552
|
fast = FastStandard()
|
|
@@ -571,7 +571,7 @@ This proves that the O(1) evaluator agrees with the O(4^n) table builder.
|
|
|
571
571
|
## Cross-validating split O(1) against the split table
|
|
572
572
|
|
|
573
573
|
```python
|
|
574
|
-
from
|
|
574
|
+
from hypercomplex_engine import SplitTableBuilder, FastSplit
|
|
575
575
|
|
|
576
576
|
builder = SplitTableBuilder()
|
|
577
577
|
fast = FastSplit()
|
|
@@ -629,7 +629,7 @@ The output convention is:
|
|
|
629
629
|
This makes formatting easy:
|
|
630
630
|
|
|
631
631
|
```python
|
|
632
|
-
from
|
|
632
|
+
from hypercomplex_engine import format_element
|
|
633
633
|
|
|
634
634
|
result = (1, 0, 1)
|
|
635
635
|
|
|
@@ -647,7 +647,7 @@ print(format_element(result, mode="latex"))
|
|
|
647
647
|
For simulations, avoid building large tables. Use the fast engine directly.
|
|
648
648
|
|
|
649
649
|
```python
|
|
650
|
-
from
|
|
650
|
+
from hypercomplex_engine import FastStandard
|
|
651
651
|
|
|
652
652
|
fast = FastStandard()
|
|
653
653
|
|
|
@@ -1114,18 +1114,19 @@ If you use this engine in your research, physics simulations, or geometric deep
|
|
|
1114
1114
|
```bibtex
|
|
1115
1115
|
@article{ben abdessalem2026,
|
|
1116
1116
|
author = "maher ben abdessalem",
|
|
1117
|
-
title = "{
|
|
1117
|
+
title = "{An O(1) Bitwise Evaluator for Cayley--Dickson Sign Structure: Ordinary, Split, Dual, and Tensor Constructions}",
|
|
1118
1118
|
year = "2026",
|
|
1119
1119
|
month = "9",
|
|
1120
1120
|
url = "https://figshare.com/articles/preprint/A_Proven_Sign_Law_for_Cayley-Dickson_Algebras_Ordinary_and_Split_Constructions/33705022",
|
|
1121
|
-
doi = "10.6084/m9.figshare.33705022.
|
|
1121
|
+
doi = "10.6084/m9.figshare.33705022.v8"
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
```
|
|
1125
1125
|
|
|
1126
1126
|
### Acknowledgments
|
|
1127
1127
|
|
|
1128
|
-
The author gratefully acknowledges **Greg Wilmot** for his work on the structure of Cayley-Dickson algebras and for acknowledging the author's contribution to his paper *"Structure of the Cayley-Dickson algebras"* ([arXiv:2505.11747](https://arxiv.org
|
|
1128
|
+
The author gratefully acknowledges **Prof. Derek Abbott**, **Dr. James M. Chappell**, and PhD candidate **Greg P. Wilmot** from the University of Adelaide, Australia, for the opportunity of collaboration and a deeper study of hypercomplex numbers. Special thanks go to **Greg P. Wilmot** for his work on the structure of Cayley-Dickson algebras and for acknowledging the author's contribution to his paper, *"Structure of the Cayley-Dickson algebras"* ([arXiv:2505.11747](https://arxiv.org)).
|
|
1129
|
+
|
|
1129
1130
|
|
|
1130
1131
|
---
|
|
1131
1132
|
|
|
@@ -83,7 +83,7 @@ pytest -v
|
|
|
83
83
|
The simplest way to use the library is through the top-level facade API.
|
|
84
84
|
|
|
85
85
|
```python
|
|
86
|
-
from
|
|
86
|
+
from hypercomplex_engine import (
|
|
87
87
|
build_table,
|
|
88
88
|
multiply,
|
|
89
89
|
format_element,
|
|
@@ -296,7 +296,7 @@ multiply(kind, a, b, dim=None, engine="fast")
|
|
|
296
296
|
Example:
|
|
297
297
|
|
|
298
298
|
```python
|
|
299
|
-
from
|
|
299
|
+
from hypercomplex_engine import multiply
|
|
300
300
|
|
|
301
301
|
a = (1, 3)
|
|
302
302
|
b = (1, 5)
|
|
@@ -327,7 +327,7 @@ For `split`, `dual` and `dual_split`, `dim` is required.
|
|
|
327
327
|
## Table builders directly
|
|
328
328
|
|
|
329
329
|
```python
|
|
330
|
-
from
|
|
330
|
+
from hypercomplex_engine import (
|
|
331
331
|
StandardTableBuilder,
|
|
332
332
|
SplitTableBuilder,
|
|
333
333
|
DualTableBuilder,
|
|
@@ -366,7 +366,7 @@ For dual tables:
|
|
|
366
366
|
## Multipliers directly
|
|
367
367
|
|
|
368
368
|
```python
|
|
369
|
-
from
|
|
369
|
+
from hypercomplex_engine import (
|
|
370
370
|
StandardHolographic,
|
|
371
371
|
SplitHolographic,
|
|
372
372
|
DualHolographic,
|
|
@@ -405,7 +405,7 @@ print(result)
|
|
|
405
405
|
## Fast O(1) multipliers directly
|
|
406
406
|
|
|
407
407
|
```python
|
|
408
|
-
from
|
|
408
|
+
from hypercomplex_engine import (
|
|
409
409
|
FastStandard,
|
|
410
410
|
FastSplit,
|
|
411
411
|
FastDual,
|
|
@@ -456,7 +456,7 @@ print(result)
|
|
|
456
456
|
Example:
|
|
457
457
|
|
|
458
458
|
```python
|
|
459
|
-
from
|
|
459
|
+
from hypercomplex_engine import format_element
|
|
460
460
|
|
|
461
461
|
element = (-1, 5)
|
|
462
462
|
|
|
@@ -489,25 +489,25 @@ This section is for contributors, benchmarking, physics engines, and symbolic pi
|
|
|
489
489
|
If you prefer explicit imports:
|
|
490
490
|
|
|
491
491
|
```python
|
|
492
|
-
from
|
|
492
|
+
from hypercomplex_engine.core.table_builder import (
|
|
493
493
|
StandardTableBuilder,
|
|
494
494
|
SplitTableBuilder,
|
|
495
495
|
DualTableBuilder,
|
|
496
496
|
)
|
|
497
497
|
|
|
498
|
-
from
|
|
498
|
+
from hypercomplex_engine.core.holographic import (
|
|
499
499
|
StandardHolographic,
|
|
500
500
|
SplitHolographic,
|
|
501
501
|
DualHolographic,
|
|
502
502
|
)
|
|
503
503
|
|
|
504
|
-
from
|
|
504
|
+
from hypercomplex_engine.core.fast import (
|
|
505
505
|
FastStandard,
|
|
506
506
|
FastSplit,
|
|
507
507
|
FastDual,
|
|
508
508
|
)
|
|
509
509
|
|
|
510
|
-
from
|
|
510
|
+
from hypercomplex_engine.printer import (
|
|
511
511
|
CDFormat,
|
|
512
512
|
CDTablePrinter,
|
|
513
513
|
)
|
|
@@ -518,7 +518,7 @@ from hypercomplex.printer import (
|
|
|
518
518
|
## Cross-validating O(1) against the full table
|
|
519
519
|
|
|
520
520
|
```python
|
|
521
|
-
from
|
|
521
|
+
from hypercomplex_engine import StandardTableBuilder, FastStandard
|
|
522
522
|
|
|
523
523
|
builder = StandardTableBuilder()
|
|
524
524
|
fast = FastStandard()
|
|
@@ -543,7 +543,7 @@ This proves that the O(1) evaluator agrees with the O(4^n) table builder.
|
|
|
543
543
|
## Cross-validating split O(1) against the split table
|
|
544
544
|
|
|
545
545
|
```python
|
|
546
|
-
from
|
|
546
|
+
from hypercomplex_engine import SplitTableBuilder, FastSplit
|
|
547
547
|
|
|
548
548
|
builder = SplitTableBuilder()
|
|
549
549
|
fast = FastSplit()
|
|
@@ -601,7 +601,7 @@ The output convention is:
|
|
|
601
601
|
This makes formatting easy:
|
|
602
602
|
|
|
603
603
|
```python
|
|
604
|
-
from
|
|
604
|
+
from hypercomplex_engine import format_element
|
|
605
605
|
|
|
606
606
|
result = (1, 0, 1)
|
|
607
607
|
|
|
@@ -619,7 +619,7 @@ print(format_element(result, mode="latex"))
|
|
|
619
619
|
For simulations, avoid building large tables. Use the fast engine directly.
|
|
620
620
|
|
|
621
621
|
```python
|
|
622
|
-
from
|
|
622
|
+
from hypercomplex_engine import FastStandard
|
|
623
623
|
|
|
624
624
|
fast = FastStandard()
|
|
625
625
|
|
|
@@ -1086,18 +1086,19 @@ If you use this engine in your research, physics simulations, or geometric deep
|
|
|
1086
1086
|
```bibtex
|
|
1087
1087
|
@article{ben abdessalem2026,
|
|
1088
1088
|
author = "maher ben abdessalem",
|
|
1089
|
-
title = "{
|
|
1089
|
+
title = "{An O(1) Bitwise Evaluator for Cayley--Dickson Sign Structure: Ordinary, Split, Dual, and Tensor Constructions}",
|
|
1090
1090
|
year = "2026",
|
|
1091
1091
|
month = "9",
|
|
1092
1092
|
url = "https://figshare.com/articles/preprint/A_Proven_Sign_Law_for_Cayley-Dickson_Algebras_Ordinary_and_Split_Constructions/33705022",
|
|
1093
|
-
doi = "10.6084/m9.figshare.33705022.
|
|
1093
|
+
doi = "10.6084/m9.figshare.33705022.v8"
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
1096
1096
|
```
|
|
1097
1097
|
|
|
1098
1098
|
### Acknowledgments
|
|
1099
1099
|
|
|
1100
|
-
The author gratefully acknowledges **Greg Wilmot** for his work on the structure of Cayley-Dickson algebras and for acknowledging the author's contribution to his paper *"Structure of the Cayley-Dickson algebras"* ([arXiv:2505.11747](https://arxiv.org
|
|
1100
|
+
The author gratefully acknowledges **Prof. Derek Abbott**, **Dr. James M. Chappell**, and PhD candidate **Greg P. Wilmot** from the University of Adelaide, Australia, for the opportunity of collaboration and a deeper study of hypercomplex numbers. Special thanks go to **Greg P. Wilmot** for his work on the structure of Cayley-Dickson algebras and for acknowledging the author's contribution to his paper, *"Structure of the Cayley-Dickson algebras"* ([arXiv:2505.11747](https://arxiv.org)).
|
|
1101
|
+
|
|
1101
1102
|
|
|
1102
1103
|
---
|
|
1103
1104
|
|
{hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7/hypercomplex_engine.egg-info}/PKG-INFO
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hypercomplex-engine
|
|
3
|
-
Version: 0.4.2.
|
|
3
|
+
Version: 0.4.2.7
|
|
4
4
|
Summary: Fast O(1)/O(n) multiplication engine for arbitrary dimensions and table generator for ordinary, split, and dual Cayley-Dickson algebras.
|
|
5
5
|
Author-email: Maher Ben Abdessalem <ba.maher94@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/maher1719/hypercomplex-engine
|
|
8
8
|
Project-URL: Repository, https://github.com/maher1719/hypercomplex-engine
|
|
9
9
|
Project-URL: Preprint: Sign Structure, https://doi.org/10.6084/m9.figshare.33705022
|
|
10
|
-
Keywords: hypercomplex,cayley-dickson,quaternions,octonions,split-algebra,math,physics,geometry
|
|
10
|
+
Keywords: hypercomplex,cayley-dickson,quaternions,octonions,split-algebra,math,physics,geometry,sedenions
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -111,7 +111,7 @@ pytest -v
|
|
|
111
111
|
The simplest way to use the library is through the top-level facade API.
|
|
112
112
|
|
|
113
113
|
```python
|
|
114
|
-
from
|
|
114
|
+
from hypercomplex_engine import (
|
|
115
115
|
build_table,
|
|
116
116
|
multiply,
|
|
117
117
|
format_element,
|
|
@@ -324,7 +324,7 @@ multiply(kind, a, b, dim=None, engine="fast")
|
|
|
324
324
|
Example:
|
|
325
325
|
|
|
326
326
|
```python
|
|
327
|
-
from
|
|
327
|
+
from hypercomplex_engine import multiply
|
|
328
328
|
|
|
329
329
|
a = (1, 3)
|
|
330
330
|
b = (1, 5)
|
|
@@ -355,7 +355,7 @@ For `split`, `dual` and `dual_split`, `dim` is required.
|
|
|
355
355
|
## Table builders directly
|
|
356
356
|
|
|
357
357
|
```python
|
|
358
|
-
from
|
|
358
|
+
from hypercomplex_engine import (
|
|
359
359
|
StandardTableBuilder,
|
|
360
360
|
SplitTableBuilder,
|
|
361
361
|
DualTableBuilder,
|
|
@@ -394,7 +394,7 @@ For dual tables:
|
|
|
394
394
|
## Multipliers directly
|
|
395
395
|
|
|
396
396
|
```python
|
|
397
|
-
from
|
|
397
|
+
from hypercomplex_engine import (
|
|
398
398
|
StandardHolographic,
|
|
399
399
|
SplitHolographic,
|
|
400
400
|
DualHolographic,
|
|
@@ -433,7 +433,7 @@ print(result)
|
|
|
433
433
|
## Fast O(1) multipliers directly
|
|
434
434
|
|
|
435
435
|
```python
|
|
436
|
-
from
|
|
436
|
+
from hypercomplex_engine import (
|
|
437
437
|
FastStandard,
|
|
438
438
|
FastSplit,
|
|
439
439
|
FastDual,
|
|
@@ -484,7 +484,7 @@ print(result)
|
|
|
484
484
|
Example:
|
|
485
485
|
|
|
486
486
|
```python
|
|
487
|
-
from
|
|
487
|
+
from hypercomplex_engine import format_element
|
|
488
488
|
|
|
489
489
|
element = (-1, 5)
|
|
490
490
|
|
|
@@ -517,25 +517,25 @@ This section is for contributors, benchmarking, physics engines, and symbolic pi
|
|
|
517
517
|
If you prefer explicit imports:
|
|
518
518
|
|
|
519
519
|
```python
|
|
520
|
-
from
|
|
520
|
+
from hypercomplex_engine.core.table_builder import (
|
|
521
521
|
StandardTableBuilder,
|
|
522
522
|
SplitTableBuilder,
|
|
523
523
|
DualTableBuilder,
|
|
524
524
|
)
|
|
525
525
|
|
|
526
|
-
from
|
|
526
|
+
from hypercomplex_engine.core.holographic import (
|
|
527
527
|
StandardHolographic,
|
|
528
528
|
SplitHolographic,
|
|
529
529
|
DualHolographic,
|
|
530
530
|
)
|
|
531
531
|
|
|
532
|
-
from
|
|
532
|
+
from hypercomplex_engine.core.fast import (
|
|
533
533
|
FastStandard,
|
|
534
534
|
FastSplit,
|
|
535
535
|
FastDual,
|
|
536
536
|
)
|
|
537
537
|
|
|
538
|
-
from
|
|
538
|
+
from hypercomplex_engine.printer import (
|
|
539
539
|
CDFormat,
|
|
540
540
|
CDTablePrinter,
|
|
541
541
|
)
|
|
@@ -546,7 +546,7 @@ from hypercomplex.printer import (
|
|
|
546
546
|
## Cross-validating O(1) against the full table
|
|
547
547
|
|
|
548
548
|
```python
|
|
549
|
-
from
|
|
549
|
+
from hypercomplex_engine import StandardTableBuilder, FastStandard
|
|
550
550
|
|
|
551
551
|
builder = StandardTableBuilder()
|
|
552
552
|
fast = FastStandard()
|
|
@@ -571,7 +571,7 @@ This proves that the O(1) evaluator agrees with the O(4^n) table builder.
|
|
|
571
571
|
## Cross-validating split O(1) against the split table
|
|
572
572
|
|
|
573
573
|
```python
|
|
574
|
-
from
|
|
574
|
+
from hypercomplex_engine import SplitTableBuilder, FastSplit
|
|
575
575
|
|
|
576
576
|
builder = SplitTableBuilder()
|
|
577
577
|
fast = FastSplit()
|
|
@@ -629,7 +629,7 @@ The output convention is:
|
|
|
629
629
|
This makes formatting easy:
|
|
630
630
|
|
|
631
631
|
```python
|
|
632
|
-
from
|
|
632
|
+
from hypercomplex_engine import format_element
|
|
633
633
|
|
|
634
634
|
result = (1, 0, 1)
|
|
635
635
|
|
|
@@ -647,7 +647,7 @@ print(format_element(result, mode="latex"))
|
|
|
647
647
|
For simulations, avoid building large tables. Use the fast engine directly.
|
|
648
648
|
|
|
649
649
|
```python
|
|
650
|
-
from
|
|
650
|
+
from hypercomplex_engine import FastStandard
|
|
651
651
|
|
|
652
652
|
fast = FastStandard()
|
|
653
653
|
|
|
@@ -1114,18 +1114,19 @@ If you use this engine in your research, physics simulations, or geometric deep
|
|
|
1114
1114
|
```bibtex
|
|
1115
1115
|
@article{ben abdessalem2026,
|
|
1116
1116
|
author = "maher ben abdessalem",
|
|
1117
|
-
title = "{
|
|
1117
|
+
title = "{An O(1) Bitwise Evaluator for Cayley--Dickson Sign Structure: Ordinary, Split, Dual, and Tensor Constructions}",
|
|
1118
1118
|
year = "2026",
|
|
1119
1119
|
month = "9",
|
|
1120
1120
|
url = "https://figshare.com/articles/preprint/A_Proven_Sign_Law_for_Cayley-Dickson_Algebras_Ordinary_and_Split_Constructions/33705022",
|
|
1121
|
-
doi = "10.6084/m9.figshare.33705022.
|
|
1121
|
+
doi = "10.6084/m9.figshare.33705022.v8"
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
```
|
|
1125
1125
|
|
|
1126
1126
|
### Acknowledgments
|
|
1127
1127
|
|
|
1128
|
-
The author gratefully acknowledges **Greg Wilmot** for his work on the structure of Cayley-Dickson algebras and for acknowledging the author's contribution to his paper *"Structure of the Cayley-Dickson algebras"* ([arXiv:2505.11747](https://arxiv.org
|
|
1128
|
+
The author gratefully acknowledges **Prof. Derek Abbott**, **Dr. James M. Chappell**, and PhD candidate **Greg P. Wilmot** from the University of Adelaide, Australia, for the opportunity of collaboration and a deeper study of hypercomplex numbers. Special thanks go to **Greg P. Wilmot** for his work on the structure of Cayley-Dickson algebras and for acknowledging the author's contribution to his paper, *"Structure of the Cayley-Dickson algebras"* ([arXiv:2505.11747](https://arxiv.org)).
|
|
1129
|
+
|
|
1129
1130
|
|
|
1130
1131
|
---
|
|
1131
1132
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
NOTICE
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
hypercomplex_engine/__init__.py
|
|
6
|
+
hypercomplex_engine/facade.py
|
|
7
|
+
hypercomplex_engine.egg-info/PKG-INFO
|
|
8
|
+
hypercomplex_engine.egg-info/SOURCES.txt
|
|
9
|
+
hypercomplex_engine.egg-info/dependency_links.txt
|
|
10
|
+
hypercomplex_engine.egg-info/requires.txt
|
|
11
|
+
hypercomplex_engine.egg-info/top_level.txt
|
|
12
|
+
hypercomplex_engine/core/__init__.py
|
|
13
|
+
hypercomplex_engine/core/basis_element.py
|
|
14
|
+
hypercomplex_engine/core/basis_notation.py
|
|
15
|
+
hypercomplex_engine/core/validation.py
|
|
16
|
+
hypercomplex_engine/core/fast/__init__.py
|
|
17
|
+
hypercomplex_engine/core/fast/bit_utils.py
|
|
18
|
+
hypercomplex_engine/core/fast/fast_dual.py
|
|
19
|
+
hypercomplex_engine/core/fast/fast_split.py
|
|
20
|
+
hypercomplex_engine/core/fast/fast_standard.py
|
|
21
|
+
hypercomplex_engine/core/holographic/__init__.py
|
|
22
|
+
hypercomplex_engine/core/holographic/dual.py
|
|
23
|
+
hypercomplex_engine/core/holographic/split.py
|
|
24
|
+
hypercomplex_engine/core/holographic/standard.py
|
|
25
|
+
hypercomplex_engine/core/table_builder/__init__.py
|
|
26
|
+
hypercomplex_engine/core/table_builder/common.py
|
|
27
|
+
hypercomplex_engine/core/table_builder/dual.py
|
|
28
|
+
hypercomplex_engine/core/table_builder/split.py
|
|
29
|
+
hypercomplex_engine/core/table_builder/standard.py
|
|
30
|
+
hypercomplex_engine/printer/__init__.py
|
|
31
|
+
hypercomplex_engine/printer/cd_format.py
|
|
32
|
+
hypercomplex_engine/printer/cd_table_printer.py
|
|
33
|
+
tests/test_dual_tuple_regression.py
|
|
34
|
+
tests/test_fast_mode.py
|
|
35
|
+
tests/test_fixes_0_4.py
|
|
36
|
+
tests/test_mega_mother.py
|
|
37
|
+
tests/test_split_dim.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hypercomplex_engine
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hypercomplex-engine"
|
|
7
|
-
version = "0.4.2.
|
|
7
|
+
version = "0.4.2.7"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Maher Ben Abdessalem", email="ba.maher94@gmail.com" },
|
|
10
10
|
]
|
|
@@ -18,7 +18,7 @@ dependencies = [
|
|
|
18
18
|
]
|
|
19
19
|
keywords = [
|
|
20
20
|
"hypercomplex", "cayley-dickson", "quaternions", "octonions",
|
|
21
|
-
"split-algebra", "math", "physics", "geometry"
|
|
21
|
+
"split-algebra", "math", "physics", "geometry","sedenions"
|
|
22
22
|
]
|
|
23
23
|
classifiers = [
|
|
24
24
|
"Development Status :: 4 - Beta",
|
|
@@ -42,6 +42,6 @@ classifiers = [
|
|
|
42
42
|
|
|
43
43
|
# CRITICAL: This prevents tests/ and examples/ from being packaged
|
|
44
44
|
[tool.setuptools.packages.find]
|
|
45
|
-
include = ["
|
|
45
|
+
include = ["hypercomplex_engine*"]
|
|
46
46
|
exclude = ["tests*", "examples*"]
|
|
47
47
|
|
{hypercomplex_engine-0.4.2.6 → hypercomplex_engine-0.4.2.7}/tests/test_dual_tuple_regression.py
RENAMED
|
@@ -12,8 +12,9 @@ History:
|
|
|
12
12
|
import pytest
|
|
13
13
|
|
|
14
14
|
# Adjust these imports to whatever hypercomplex/__init__.py exports.
|
|
15
|
-
from
|
|
16
|
-
from
|
|
15
|
+
from hypercomplex_engine import multiply, FastDual, DualHolographic
|
|
16
|
+
from hypercomplex_engine.core.validation import Validation
|
|
17
|
+
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
# ---------- tuple normalization: engines must agree on identical input ----------
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from hypercomplex_engine.core.table_builder import (
|
|
4
4
|
StandardTableBuilder,
|
|
5
5
|
SplitTableBuilder,
|
|
6
6
|
DualTableBuilder,
|
|
7
7
|
)
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from hypercomplex_engine.core.fast import (
|
|
10
10
|
FastStandard,
|
|
11
11
|
FastSplit,
|
|
12
12
|
FastDual,
|
|
13
13
|
)
|
|
14
14
|
|
|
15
|
-
from
|
|
15
|
+
from hypercomplex_engine import multiply
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# ======================================================================
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
NOTICE
|
|
3
|
-
README.md
|
|
4
|
-
pyproject.toml
|
|
5
|
-
hypercomplex-engine/__init__.py
|
|
6
|
-
hypercomplex-engine/facade.py
|
|
7
|
-
hypercomplex-engine/core/__init__.py
|
|
8
|
-
hypercomplex-engine/core/basis_element.py
|
|
9
|
-
hypercomplex-engine/core/basis_notation.py
|
|
10
|
-
hypercomplex-engine/core/validation.py
|
|
11
|
-
hypercomplex-engine/core/fast/__init__.py
|
|
12
|
-
hypercomplex-engine/core/fast/bit_utils.py
|
|
13
|
-
hypercomplex-engine/core/fast/fast_dual.py
|
|
14
|
-
hypercomplex-engine/core/fast/fast_split.py
|
|
15
|
-
hypercomplex-engine/core/fast/fast_standard.py
|
|
16
|
-
hypercomplex-engine/core/holographic/__init__.py
|
|
17
|
-
hypercomplex-engine/core/holographic/dual.py
|
|
18
|
-
hypercomplex-engine/core/holographic/split.py
|
|
19
|
-
hypercomplex-engine/core/holographic/standard.py
|
|
20
|
-
hypercomplex-engine/core/table_builder/__init__.py
|
|
21
|
-
hypercomplex-engine/core/table_builder/common.py
|
|
22
|
-
hypercomplex-engine/core/table_builder/dual.py
|
|
23
|
-
hypercomplex-engine/core/table_builder/split.py
|
|
24
|
-
hypercomplex-engine/core/table_builder/standard.py
|
|
25
|
-
hypercomplex-engine/printer/__init__.py
|
|
26
|
-
hypercomplex-engine/printer/cd_format.py
|
|
27
|
-
hypercomplex-engine/printer/cd_table_printer.py
|
|
28
|
-
hypercomplex_engine.egg-info/PKG-INFO
|
|
29
|
-
hypercomplex_engine.egg-info/SOURCES.txt
|
|
30
|
-
hypercomplex_engine.egg-info/dependency_links.txt
|
|
31
|
-
hypercomplex_engine.egg-info/requires.txt
|
|
32
|
-
hypercomplex_engine.egg-info/top_level.txt
|
|
33
|
-
tests/test_dual_tuple_regression.py
|
|
34
|
-
tests/test_fast_mode.py
|
|
35
|
-
tests/test_fixes_0_4.py
|
|
36
|
-
tests/test_logging.py
|
|
37
|
-
tests/test_mega_mother.py
|
|
38
|
-
tests/test_split_dim.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
hypercomplex-engine
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"""The library must announce exports through `logging` without touching the app's logging setup."""
|
|
2
|
-
import logging
|
|
3
|
-
import subprocess
|
|
4
|
-
import sys
|
|
5
|
-
|
|
6
|
-
from hypercomplex import build_table, export_csv
|
|
7
|
-
|
|
8
|
-
TABLE_ARGS = dict(mode="integer", csv_mode="long")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def test_export_returns_the_path_and_writes_the_file(tmp_path):
|
|
12
|
-
path = str(tmp_path / "t.csv")
|
|
13
|
-
assert export_csv(path, build_table("standard", 2), **TABLE_ARGS) == path
|
|
14
|
-
assert (tmp_path / "t.csv").read_text().startswith("i,j,sign,index")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def test_message_is_logged_on_the_package_logger_at_info(tmp_path, caplog):
|
|
18
|
-
path = str(tmp_path / "t.csv")
|
|
19
|
-
with caplog.at_level(logging.INFO, logger="hypercomplex"):
|
|
20
|
-
export_csv(path, build_table("standard", 2), **TABLE_ARGS)
|
|
21
|
-
records = [r for r in caplog.records if r.name.startswith("hypercomplex")]
|
|
22
|
-
assert len(records) == 1
|
|
23
|
-
assert records[0].levelno == logging.INFO
|
|
24
|
-
assert path in records[0].getMessage()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def test_export_does_not_touch_root_logger_configuration(tmp_path):
|
|
28
|
-
root = logging.getLogger()
|
|
29
|
-
handlers, level = list(root.handlers), root.level
|
|
30
|
-
export_csv(str(tmp_path / "t.csv"), build_table("standard", 2), **TABLE_ARGS)
|
|
31
|
-
assert list(root.handlers) == handlers
|
|
32
|
-
assert root.level == level
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def test_package_logger_has_a_null_handler():
|
|
36
|
-
handlers = logging.getLogger("hypercomplex").handlers
|
|
37
|
-
assert any(isinstance(h, logging.NullHandler) for h in handlers)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def test_clean_interpreter_stays_silent_and_unconfigured(tmp_path):
|
|
41
|
-
"""Fresh process, no app logging setup: nothing printed, root logger untouched."""
|
|
42
|
-
code = (
|
|
43
|
-
"import logging, sys\n"
|
|
44
|
-
"from hypercomplex import build_table, export_csv\n"
|
|
45
|
-
"root = logging.getLogger()\n"
|
|
46
|
-
"before = (len(root.handlers), root.level)\n"
|
|
47
|
-
f"export_csv({str(tmp_path / 'c.csv')!r}, build_table('standard', 2), mode='integer', csv_mode='long')\n"
|
|
48
|
-
"after = (len(root.handlers), root.level)\n"
|
|
49
|
-
"print('UNCHANGED' if before == after else f'CHANGED {before}->{after}')\n"
|
|
50
|
-
)
|
|
51
|
-
result = subprocess.run([sys.executable, "-c", code], capture_output=True, text=True, check=True)
|
|
52
|
-
assert result.stdout.strip() == "UNCHANGED"
|
|
53
|
-
assert result.stderr == ""
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def test_application_can_opt_in_to_the_message(tmp_path):
|
|
57
|
-
"""The documented way for an application to see the message."""
|
|
58
|
-
code = (
|
|
59
|
-
"import logging\n"
|
|
60
|
-
"logging.basicConfig(level=logging.INFO, format='%(name)s: %(message)s')\n"
|
|
61
|
-
"from hypercomplex import build_table, export_csv\n"
|
|
62
|
-
f"export_csv({str(tmp_path / 'c.csv')!r}, build_table('standard', 2), mode='integer', csv_mode='long')\n"
|
|
63
|
-
)
|
|
64
|
-
result = subprocess.run([sys.executable, "-c", code], capture_output=True, text=True, check=True)
|
|
65
|
-
assert "Table exported to" in result.stderr
|
|
66
|
-
assert "hypercomplex.printer.cd_table_printer" in result.stderr
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|