Hey /pros/, gimme graphing algorithms. Specifically, I have a bunch of connected nodes. The graph has a bunch of "input" nodes on the far left and a bunch of "output" nodes on the far right. These are fixed and can't be repositioned. In the middle is a rat's nest of connected nodes and anything goes (loops, self-connections, double connections, etc). So, there's no guarantee that the graph can even be made planar (non-overlapping). I need an algorithm that does the best possible job of moving those middle nodes around and sorting things out, efficiently.
DESCRIPTION
Gnuplot is a command-driven interactive function plotting program.
If files are given, gnuplot loads each file with the load command, in the order specified. Gnuplot exits after the last
file is processed.
Here are some of its features:
Plots any number of functions, built up of C operators, C library functions, and some things C doesn't have like **,
sgn(), etc. Also support for plotting data files, to compare actual data to theoretical curves.
User-defined X and Y ranges (optional auto-ranging), smart axes scaling, smart tic marks.
Labelling of X and Y axes.
User-defined constants and functions.
Support for many output devices and file formats
Shell escapes and command line substitution.
Load and save capability.
Output redirection.
All computations performed in the complex domain. Just the real part is plotted by default, but functions like imag()
and abs() and arg() are available to override this.
>>5
Like I give a shit if it has anything to do with it. I just said something random and difficult but not 100% implausible and hoped he would go away.
But ``he'' didn't, did ``he''?
Name:
Anonymous2010-07-31 3:43
Here's the general idea for a good solution to your problem:
1. Move center nodes that have more inputs than outputs closer to the input side.
2. Move center nodes that have more outputs than inputs closer to the output side
3. Spread the nodes away from each other using a distance threshold that would scale down as more nodes are added to the graph.