------------------
A small library implementing linear combinations of "stuff".
Such a linear combination is stored as a map, mapping "stuff" to its coefficient.
That is {"a" 5, "b" 17} stands for the linear combination 5 * "a" + 17 * "b"::
import linear_combination.linear_combination as lc
lc1 = lc.LinearCombination( {"x":7,"y":8} )
lc2 = lc.LinearCombination( {"x":2.1, "z":3} )
print( lc1 + lc2 )
# => "+9.10 x +8 y +3 z"
The main application is to `Hopf Algebras <https://en.wikipedia.org/wiki/Hopf_algebra>`_.
The package comes with two sample implementations of Hopf algebrase;
the concatenation Hop algebra and, its dual, the shuffle algebras (Reutenauer - Free Lie algebras).
Much of its code is borrowed from `free-lie-algebra-py <https://github.com/bottler/free-lie-algebra-py>`_, by Jeremy Reizenstein::
import linear_combination.linear_combination as lc
import linear_combination.words as words
print( lc.LinearCombination.lift( words.ShuffleWord( (1,2 ) ) ) * lc.LinearCombination.lift( words.ShuffleWord( (3,4 ) ) ) )
# => +1 1234 +1 1324 +1 1342 +1 3124 +1 3142 +1 3412
Installation
------------
Install with::
pip install linear-combination-py
or::
pip install git+git://github.com/diehlj/linear-combination-py
Copyright © 2018 Joscha Diehl
Distributed under the `Eclipse Public License <https://opensource.org/licenses/eclipse-1.0.php>`_.
Metadata
Release files for linear-combination-py 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| linear-combination-py-0.1.4.tar.gz | 5.9 kB | Without provenance | Details for linear-combination-py-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linear_combination_py-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for linear_combination_py-0.1.4-py3-none-any.whl |
Total release size: 13.0 kB
Release files / linear-combination-py-0.1.4.tar.gz
| Download URL | linear-combination-py-0.1.4.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
714602087455b830be2f80e8d49c4a6db6132a88b01df47d9d318c5f60695ff0
|
|
BLAKE2b-256 checksum How to use checksums |
d4063eb97b7b3c1bb2e0e51da4c7e316e93de6443240aa68adb413ffaf7b5c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Release files / linear_combination_py-0.1.4-py3-none-any.whl
| Download URL | linear_combination_py-0.1.4-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9496a084a9013ebfb6996210998256e8d47378efaa3153feada43d106e09f42b
|
|
BLAKE2b-256 checksum How to use checksums |
357f08cf2733c469fdfbf42a01c06691365d676327a9abb08cbe4a87ce8861d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Security for linear-combination-py 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.