illustration du tri fusion
Project description
trifusionviz
Installation via Pypi.org
$ pip3 install trifusionviz
Utilisation en ligne de commande
L'installation fournit la commande tfv
$ tfv -h
usage: tfv [-h] [-nb] [-al] [-ft [FORMAT]] [-fo [FONCTIONORDRE]]
[liste] [fichier]
Application facilitant l'utilisation de trifusionviz
positional arguments:
liste liste Python avec guillemets
fichier nom du fichier de sortie. Mettre "pipe" pour une sortie console.
optional arguments:
-h, --help show this help message and exit
-nb, --noirblanc Noir et Blanc
-al, --appels sortie des appels
-ft [FORMAT], --format [FORMAT]
format fichier, par défaut : pdf
-fo [FONCTIONORDRE], --fonctionordre [FONCTIONORDRE]
par défaut : lambda x, y: x < y
Exemples :
-
$ tfv "[1, 4, 3, 2]" test -ft pngcréera un fichiertest.png -
$ tfv -nb -al "[1, 4, 3, 2]" testcréera deux fichiers en noir et blanc :test.pdfettest_appels.pdf -
$ tfv "[1, 4, 10, 2]" test -fo "lambda x, y: str(x) < str(y)"créera un fichier :test.pdf
Remarques :
-
Sans argument,
tfvproduit une erreur. -
Avec une liste pour seul argument, par exemple
$ tfv "[1, 5, 2]", cela produit dans le répertoire courant un fichierDigraph.gv.pdf. -
la sortie
pipe(en nom de fichier) produira une sortie console au format souhaité permettant le pipe avec un autre programme. -
tfvn'implémente pas pour le moment toutes les fonctionnalités de la bibliothèque.
Utilisation en module
import trifusionviz as tfv
import random
liste = list(range(13))
random.shuffle(liste)
t = tfv.trifusionviz(liste)
# sorties pdf : graphe et appels
t.sortie_appels = True
t.sortie("exemple_sortie")
u = tfv.trifusionviz(liste)
u.fonction_ordre = lambda x, y: str(x) < str(y)
u.noirblanc = True
u.profondeurs_cachees = range(2, 2 + 7)
u.forme_diviser, u.forme_arreter, u.forme_combiner = \
"invhouse", "rectangle", "house"
# sortie png
u.sortie("exemple_sortie_lexico", "png")
v = tfv.trifusionviz(range(13))
v.style = "invis"
# sortie png
v.sortie("exemple_invisible", "png")
Sorties de l'exemple
Licence
CC-BY-NC-SA
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
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 trifusionviz-0.7.1.tar.gz.
File metadata
- Download URL: trifusionviz-0.7.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2f1aa044a10e66f1eab0c9fdb66528fbd120ee5c47ab7fd7f8a79d8478da876
|
|
| MD5 |
34ed049c5de28c15cf308770fe1103f7
|
|
| BLAKE2b-256 |
860938f82f7f5f356182a06ffe38aa2e0770cea966c34b817b364ac64d6a6740
|
File details
Details for the file trifusionviz-0.7.1-py3-none-any.whl.
File metadata
- Download URL: trifusionviz-0.7.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f586c4319ee02b781cc9c401d71d234e087c80959d60f06a423ebe53500d12e7
|
|
| MD5 |
1d6bd7244077c5760b1868688bbaa619
|
|
| BLAKE2b-256 |
01fb58d33d2377b2b04623b63a67a7be04d0bdde0007827c52b5ee16448a5fa1
|