Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
snakes
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2013-03-03 09:03:59 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2f816770da26283ca9a7b6e599bf1776b8fb8273
2f816770
1 parent
95bad18b
doc converted
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
snakes/plugins/pos.py
snakes/plugins/pos.py
View file @
2f81677
"""A plugin to add positions to the nodes.
- C{Place} and C{Transition} constructors are added an optional
argument C{pos=(x,y)} to set their position
- C{Place} and C{Transition} are added an attribute C{pos} that is
pair of numbers with attributes C{x} and C{y} and methods
C{shift(dx, dy)} and C{moveto(x, y)}
- Petri nets are added methods C{bbox()} that returns a pair of
extrema C{((xmin, ymin), (xmax, ymax))}, a method C{shift(dx, dy)}
that shift all the nodes, and a method C{transpose()} that rotates
* `Place` and `Transition` constructors are added an optional argument
`pos=(x,y)` to set their position
* `Place` and `Transition` are added an attribute `pos` that is pair
of numbers with attributes `x` and `y` and methods `shift(dx, dy)`
and `moveto(x, y)`
* Petri nets are added methods `bbox()` that returns a pair of
extrema `((xmin, ymin), (xmax, ymax))`, a method `shift(dx, dy)`
that shift all the nodes, and a method `transpose()` that rotates
the net in such a way that the top-down direction becomes
left-right
...
...
Please
register
or
login
to post a comment