How do I add extra space between clusters? - graphviz

For nodes, there is nodesep which increases space between nodes. Is there such an attribute for subgraph cluster?

I already tried to do this before. According to this link http://lists.research.att.com/pipermail/graphviz-devel/2009/000947.html, it seems that there is no current solution to the problem.
However, a little "hack" consists in surrounding your cluster with a chosen number of invisible clusters. In fact, the clusters have a small margin that can't be altered, but nesting them and hiding the border simulates a custom margin.

Another possible hack if you're not using rank as an attribute, set rank=same within each cluster and then add a ranksep=K, where K is some factor you want to separate by. Worked nicely for me.

I set the margin option within each cluster. Though this does not separate the clusters, it add space between the nearest nodes, which may be sufficient for you, especially if you are using style=invis.

Related

Fixing the position of clusters in graphviz

How would I force the order of clusters in Graphviz? For example, I have three clusters: inputs, processes, outputs. I want to ensure that the clusters are in the diagram in that order from leaft to right, then in each cluster I don't really care which order they appear or layout used.
There seems to be no easy fix to the problem of positioning clusters. (see How do I get individual clusters on 3 different levels?)
If invisible edges don't work for your graph (sometimes they do and sometimes not), look at gvpack (https://graphviz.org/pdf/gvpack.1.pdf). This program lets you create the 3 "clusters" as independent graphs and then will allow you to pack (glue) the three graphs into one graph.

Barnes-Hut tree creating

I am currently trying to create a Barnes-Hut octree, however, I still not fully understand how to do this properly. I have read threads here, this article and some others. I believe I do understand how to make a tree if every node contains the information about the indices of particles inside, and if you keep storing the empty nodes. But if you do not want to? How to make a tree such that at the end you will only have necessary information: say, monopoles and quadrupoles for all non-empty nodes. I made so many different attempts that now I am completely confused, to be honest. What should I contain in each node? What would be the pseudocode for such thing?
P.S. By the way, is it different for monopoles and quadrupoles? I mean I can imagine that you do not need the exact information about the particles inside the node to calculate a monopole (it is just a full mass of node), but for quadruple?
Thank you in advance!
P.S. By the way, I use julia language if it is somehow relevant.

Can I use my own labels for carrot2

I am modifying the source code of carrot for a project.
Acc. to the LINGO algorithm, it first generates the most probable labels and builds clusters which best suit the labels right?
So, can I input my own set of labels to the carrot to see how it clusters the documents around them?
Unfortunately, you can't provide your own labels for clustering with Lingo.
On the other hand, the label-to-document assignment algorithm is very simple in Lingo -- if the document contains the label's words, it will be assigned to the label. Therefore, you can achieve the same effect by, for example, indexing your documents in Lucene and then querying the index using the predefined labels you have.

Cluster / group counting algorithm on live grid

I have a circular grid of ~2700 cells that represent the face of a detector. This grid is live, constantly updating, so we need to find clusters of hits with a couple microseconds.
Each cell is either a hit or a miss (0 or 1), and a cluster is a grouping of these hit cells that has a distinct perimeter. I want to count the number of clusters of hit cells very quickly so that we can save the data from events with a certain number of clusters (2) and toss out everything else.
Some algorithms currently in use rely on assigning a value for the number of hit neighbors to the cell. This is too slow because it requires all of the hit crystals to be identified before the clusters may be identified. Another, much prettier algorithm that works in parallel is based on the number of turns around a given perimeter of a cluster. It's really quite clever, so here's the link to the paper: http://www.sciencedirect.com/science/article/pii/0168900295007997 This paper also has an image of an ideal grid with clusters.
Most of the posts / papers I've read take data and apply markov chains or some other offline processing to create clusters of data-- we're looking for the opposite. We want to identify clusters of cells that we already have, and fast.
How might we find these clusters faster? Any tips or ideas to put me in the right (or a) direction?
Thank you!

Arranging circuitry paths

Are there any recommended algorithms for placing circuitry?
Restrictions:
Only perfectly vertical/horizontal lines
Can cross at right-angles, but can't run over one another in parallel.
Input:
A set of input points with output points defined. These points have a radius in which no other circuit wire can pass, except for the one going to it.
A bit left field, but check out the open source Graphviz tool. It uses some kind of spring like algorithm from memory to place nodes without overlapping connections. Not sure how suitable it would be for circuitry though: http://www.graphviz.org/Gallery/twopi/twopi2.html

Resources