...
 
Commits (3)
Raphaël Bleuse <cs@research.bleuse.net> <raphael.bleuse@uni.lu>
Martin Rosalie <martin.rosalie@univ-perp.fr> <martin.rosalie@uni.lu>
......@@ -2,10 +2,10 @@
Credits (in alphabetical order)
===============================
* Raphaël BLEUSE <raphael.bleuse@uni.lu>
* Raphaël BLEUSE <cs@research.bleuse.net>
* Pascal BOUVRY <pascal.bouvry@uni.lu>
* Grégoire DANOY <gregoire.danoy@uni.lu>
* Emmanuel KIEFFER <emmanuel.kieffer@uni.lu>
* Jeff MEDER <jeffmeder2303@gmail.com>
* Maya Alexandra OLSZEWSKI <maya.olszewski@gmail.com>
* Martin ROSALIE <martin.rosalie@uni.lu>
* Martin ROSALIE <martin.rosalie@univ-perp.fr>
......@@ -26,11 +26,32 @@ as a Scalable Vector Graphics (SVG) file.
Citation
--------
If you use ``cate`` for your research, please cite the following paper:
``cate`` is developed as a research project.
The motivation for a tool such as ``cate``, an introduction to linking
matrices, and a description of the optimization logic are described, *inter
alia*, in a publication presented at the conference Graph Drawing 2018.
This publication is available in the conference proceedings
(`doi:10.1007/978-3-030-04414-5\_8 <https://doi.org/10.1007/978-3-030-04414-5_8>`__, paywalled),
or on arXiv (`arxiv:1807.11853 <https://arxiv.org/abs/1807.11853>`__).
If you use ``cate`` for a publication, please cite as follows:
Maya Olszewski, Jeff Meder, Emmanuel Kieffer, Raphaël Bleuse, Martin Rosalie,
Grégoire Danoy, and Pascal Bouvry.
**Visualizing the Template of a Chaotic Attractor.**
In *Graph Drawing*, volume 11282 of Lecture Notes in Computer Science, 106–119.
Springer, 2018.
`doi:10.1007/978-3-030-04414-5\_8 <https://doi.org/10.1007/978-3-030-04414-5_8>`__.
Or you may use, at your convenience, the following
`BibTeX entry <https://gitlab.uni.lu/PCOG/cate/raw/master/doc/OlszewskiM2018Visualizing.bib>`__:
.. code-block:: bibtex
@article{OlszewskiM2018Visualizing,
@inproceedings{OlszewskiM2018Visualizing,
author = {Olszewski, Maya and
Meder, Jeff and
Kieffer, Emmanuel and
......@@ -39,20 +60,24 @@ If you use ``cate`` for your research, please cite the following paper:
Danoy, Gr{\'{e}}goire and
Bouvry, Pascal},
title = {{V}isualizing the {T}emplate of a {C}haotic {A}ttractor},
journal = {arXiv e-prints},
booktitle = {Graph Drawing},
series = {Lecture Notes in Computer Science},
volume = 11282,
pages = {106--119},
publisher = {Springer},
year = 2018,
month = jul,
url = {https://arxiv.org/abs/1807.11853},
archivePrefix = {arXiv},
eprint = {1807.11853},
month = sep,
doi = {10.1007/978-3-030-04414-5_8},
isbn = {978-3-030-04413-8},
}
Installation
------------
``cate`` is available as a regular Python package. It hence can easily be
installed with ``pip``.
``cate`` is packaged as a regular Python package, and is published on
`PyPI <https://pypi.org/project/cate/>`__. It hence can easily be installed
with ``pip``.
For more details on how to install a Python package, one can refer to
https://packaging.python.org/tutorials/installing-packages/
......
@inproceedings{OlszewskiM2018Visualizing,
author = {Olszewski, Maya and
Meder, Jeff and
Kieffer, Emmanuel and
Bleuse, Rapha{\"{e}}l and
Rosalie, Martin and
Danoy, Gr{\'{e}}goire and
Bouvry, Pascal},
title = {{V}isualizing the {T}emplate of a {C}haotic {A}ttractor},
booktitle = {Graph Drawing},
series = {Lecture Notes in Computer Science},
volume = 11282,
pages = {106--119},
publisher = {Springer},
year = 2018,
month = sep,
doi = {10.1007/978-3-030-04414-5_8},
isbn = {978-3-030-04413-8},
language = english,
}
......@@ -4,7 +4,7 @@
name = cate
url = https://gitlab.uni.lu/pcog/cate
maintainer = Raphaël Bleuse
maintainer_email = raphael.bleuse@uni.lu
maintainer_email = cs@research.bleuse.net
version = attr: src.cate.__version__
description = Tool to draw the templates of chaotic attractors.
long_description = file: README.rst
......
......@@ -462,7 +462,7 @@ class SVGExporter(_export.Exporter, alias='svg'):
self.drawer.draw_crossing(
left=(lstrand, lpos),
right=(rstrand, rpos),
orientation=template.matrix[lstrand][rstrand] > 0
orientation=template.crossings[lstrand, rstrand] > 0
)
uncrossed -= {lstrand, rstrand}
self.positions[lstrand], self.positions[rstrand] = \
......
......@@ -184,19 +184,28 @@ class Template:
@property
def crossings(self):
"""Mapping of (crossing, arity) for each crossing of the template."""
"""
Mapping of {crossing: arity} for each (oriented) crossing of the template.
"""
return {
(j, i): abs(self.matrix[i][j])
(j, i): self.matrix[i][j]
for i in range(len(self.matrix))
for j in range(i)
if self.matrix[i][j] # keep only non-zero crossings
if self.matrix[i][j] # keep only crossings with non-zero arity
}
def _optimize_crosslevels(self):
"""Compute a sequence of crossing levels of minimum depth."""
initial_state = _OptimizerState(
tuple(range(self.size)),
_multiset.FrozenMultiset(self.crossings)
_multiset.FrozenMultiset(
{
# the optimization loop needs the arity of each crossing
# without their orientation: drop orientation
crossing: abs(arity)
for crossing, arity in self.crossings.items()
}
)
)
final_state = _OptimizerState(
tuple(final_position(self.matrix)),
......