libqif
Install
pip install qiftmp
- Needs
python>= 3.8 and asandybridgeor later CPU - On linux
pip>= 19 is needed (make sure topip install -U pip)
A sample program
from qif import *
def compute_bayes(C):
pi = probab.uniform(C.shape[0])
print("Channel:\n", C)
print("Prior:\n", pi)
print("Bayes vulnerability", measure.bayes_vuln.posterior(pi, C))
print("Bayes mult-capacity", measure.bayes_vuln.mult_capacity(C))
compute_bayes(channel.randu(5))
# same, but using rational arithmetic
set_default_type(rat)
C = numpy.array([
[rat(1,2), rat(1,4), rat(1,4)],
[rat(1,6), rat(3,6), rat(2,6)],
[rat(1,2), rat(1,2), rat(0)],
])
compute_bayes(C)
Documentation
A list of methods provided by qif is available here.
Use libqif with C++
See the installation instructions.
Metadata
Release files for qiftmp 2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qiftmp-2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
Release files / qiftmp-2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | qiftmp-2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6b0a40f15e6e7822b01811c206dd77350a86d477fcd234c8c64c9c990ecb28a5
|
|
BLAKE2b-256 checksum How to use checksums |
dacf7730b3a3f575f6feb787dd20514bd767fba6b972bd3f155c15b48f88dce4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|