Skip to main content

Build and visualize orbit graphs for discrete iterations under guarded rules.

Project description

VisIter

See what a discrete iteration actually does — as a graph.

The simplest case

Integers 1–9. Rule: divisible by 3 → divide by 3. Everything else → add 2. Where does each value end up?

viter 'range(1, 10), [Rule(lambda x: x%3==0, Op(lambda x: x//3))], Op(lambda x: x+2)'

descent graph, range 1–9

One line, auto-derived edge labels, SVG on stdout.

Install

pip install visiter

Graphviz must be available on PATH (brew install graphviz / apt install graphviz).

Going further

Add explicit labels, write to a file:

viter 'range(1, 10),
       [Rule(lambda x: x%3==0, Op(lambda x: x//3, label="÷3"))],
       Op(lambda x: x+2, label="+2")' \
  -o descent.svg

Crop the view around a node, render only what reaches it:

viter '...' --render 'anchor=1, radius=8, direction="backward"' -o crop.svg

Use the Python API instead of the CLI:

from visiter import iterate, Op, Rule, to_dot

graph = iterate(
    range(1, 10),
    [Rule(lambda x: x % 3 == 0, Op(lambda x: x // 3))],
    Op(lambda x: x + 2),
)
to_dot(graph).render("descent", format="svg")

Two entry points

  • viter — one-shot: argstring in, image out. Safe defaults (--max-nodes 10000, --time-limit 00:00:30) keep a typo'd rule from running away. Output goes to stdout (pipe it!) or to -o FILE.

  • visiter — pipe-composable subcommands for full control:

    visiter build '…' | visiter to-dot '…' | dot -Tsvg > out.svg
    

    build writes JSON; to-dot reads JSON, writes DOT; validate checks the JSON against the bundled schema; analyze bridges to NetworkX for graph algorithms.

Why VisIter?

Free, scriptable, Graphviz-native, Unix-pipe-composable orbit-graph rendering for discrete iterations under guarded rules — with cutoff boundaries (bounds, depth limits, render crops) as a first-class visual primitive, not silent truncation.

Full honest comparison against NetworkX, NestGraph (Mathematica), Maude, LoLA, and continuous-dynamics tooling: docs/comparison.md.

Documentation

  • docs/tutorial.md — gentle introduction: what problem the tool solves, smallest example, what each piece does, what the dashed arrows mean. Start here.
  • docs/manual.md — reference: every parameter, every data field, the rendering model in full, design decisions.
  • docs/comparison.md — how VisIter relates to other tools in the ecosystem, and when to pick something else.
  • demos/ — runnable end-to-end examples: make demo writes SVG/PDF/DOT into demos/out/.

License

MIT

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

visiter-0.7.2.tar.gz (188.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visiter-0.7.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file visiter-0.7.2.tar.gz.

File metadata

  • Download URL: visiter-0.7.2.tar.gz
  • Upload date:
  • Size: 188.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for visiter-0.7.2.tar.gz
Algorithm Hash digest
SHA256 53d4885e0b12fc1a95e2ecbaa1806156102b9c94d1875b621a8a596337db999e
MD5 f1e1041a1932553b94a0bf4d032037a3
BLAKE2b-256 67d9a6f85c197fbdea3a0de14a24b142d0fa9f3a00339a2350947335dc463fe8

See more details on using hashes here.

File details

Details for the file visiter-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: visiter-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for visiter-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad91cd0f3a4e5c8bdd38c9cf7105c417fd6b7e624c607874a9e6af290a030826
MD5 8f5e86b02c9b26875228dfaeb0a83a89
BLAKE2b-256 159bdc5de1c10f22c152bfa5a60ef05d4648d0160f841756c65526d7ede6a85a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page