graph

Generate pretty image of tree/graph

Hello, I want to generate a pretty image of my tree/graph data. I had a look at Graphviz, but the renderings are not great. Do you know of a solution that will produce pretty images and run on Linux? ...

Java: JGraphT: Iterate through nodes

I'm trying to iterate through all nodes, so I can print them out for graphviz. What is the best way to do that using the JGraphT library? public static void main(String[] args) { UndirectedGraph<String, DefaultEdge> g = new SimpleWeightedGraph<String, DefaultEdge>(DefaultEdge.class); String odp = "ODP"; String cck = "CCK"; String m...

Java: Access local variables from anon inner class? (PriorityQueue)

I want to use a PriorityQueue to do a topological sort on a graph. For brevity, I'd like to use an anonymous inner class for the comparator. However, I need access to the graph g in order to determine the in degree of the nodes I'm looking at. Is this possible? /** * topological sort * @param g must be a dag */ public static Queue<...

Why won't my Python scatter plot work?

I created a very simple scatter plot using pylab. pylab.scatter(engineSize, fuelMile) pylab.show() The rest of the program isn't worth posting, because it's that line that's giving me the problem. When I change "scatter" to "plot" it graphs the data, but each point is part of a line and that makes the whole things a scribbly mess. I j...

Partitioning of a directed graph

I'm trying to partition a network into one or more parts based on a set of critical vertices. I've got code that I believe solves my problem (at least, it has for the cases I'm interested in), but for the sake of ensuring correctness in general, I'm looking for the name of what I'm doing from graph theory, or even a reference on an equiv...

wpf set barchart graph width programmatically C#

I have a chart and I am adding ColumnSeries and chart legend etc but how to programmatically set its bar width... ??? | |------| | | | | |set | | |this | | |width | | | | | | | | | |BarChart Graph |_______|______|_______________________________ <charting:Chart...

Graph Database in Java (other than Neo4J)

Greetings, Is there any open source graph database available other than Neo4J?? NOTE: Why not Neo4J? Neo4J is opensource, but counts primitives (number of nodes,relationships & properties). If you are using it for commercial use. And does not have any straight forward information of pricing on official website. so there can be potenti...

Connected direct graph, find alg...

You are given a connected directed graph G = (V,E). Design a O(n+m)-time algorithm that computes a directed path that starts from a vertex v 2 G, visit each edge exactly once (according to its direction) and ends in v. If such path cannot be found, your algorithm should determine that. ...

How do I generate a contour graph?

How do I generate a contour graph like this: It's easy enough if the points are on a regular grid, but what if they aren't, like in my example? Is there a fairly simple algorithm to determine the color for each pixel? ...

How to generate a graphic on the fly with cherrypy

I am developing a small web application using cherrypy and I would like to generate some graphs from the data stored in a database. The web pages with tables are easy and I plan to use matplotlib for the graphs themselves, but how do I set the content-type for the method so they return images instead of plain text? Will cherrypy "snif...

Node layering in Graphviz

I'm creating a graph using Graphviz (compiled with neato). This graph contains many overlapping nodes which is perfectly fine. However, there is a group of large nodes which I prefer to always be on top of other small nodes - even-though I prefer to define the large nodes first in the graph (which makes them get painted at the very botto...

where can I find graph input resources/files?

Hi! I want to test various algorithms on graphs. Does anyone know a web where I can get lots of examples in text files? I've found many examples but they are always images. I want a text description of a graph, by edge listing or whatever... do you know one such source? Thanks! Manuel ...

Plotting Histogram: How can I do it from scratch using data stored in a database?

I have some data stored in a database like this: TableName: faults Table: +------------+--------------+ | fault_type | total | +------------+--------------+ | 1 | 1 | | 2 | 3 | | 3 | 8 | | 4 | 2 | ............................. How am I supposed...

Java: Minimum spanning tree with JGraphT?

I have a problem that can essentially be viewed as a graph. I'm considering using JGraphT to implement it instead of rolling my own. What would be the best way to get a minimum spanning tree out of a graph using JGraphT? ...

Constrained graph transformation in scheduling applications

I'm working on an interactive job scheduling application. Given a set of resources with corresponding capacity/availabilty profiles, a set of jobs to be executed on these resources and a set of constraints that determine job sequence and earliest/latest start/end times for jobs I want to enable the user to manually move jobs around. Esse...

Node drag sensibility in Flare

I have a graph to which I add and delete nodes (using animation with FunctionSequence) according to the user's interaction with the application. My problem is that as I add or remove more nodes, the drag sensibility of nodes increases. In other words when I drag a node after adding and removing nodes from the graph even a small movement ...

Ruby charting library?

I need to display some charts/graphs based upon user inputs on my web aplication built using Ruby on Rails. Are there any charting libraries out there that I could use with ROR for displaying simple bar, line and pie graphs? ...

Tracing the longest path using Bellman-Ford with negative edge weights.

Hello All, I'm currently finding the longest path in a directed acyclic positive-weighted graph by negating all edge weights and running Bellman Ford. This is working great. However, I'd like to print the trace of which nodes/edges were used. Any help? The program takes as input the number of nodes, a source, destination and edge weight...

Strategy to collect Analytics from a large app

Superfeedr is a feed-parsing on demand service. We want to provide analytics to our users and we're investigating waht would be the best strategy to do so. In a nutshell, we want to track the number of operations (events, like : new entry in a given feed) in our system as well as agregated data (number of subscriber for feed). Of cours...

algorithm to traverse 3D coordinates without revisiting

Say we have a set of 3D (integer) coordinates from (0,0,0) to (100,100,100) We want to visit each possible coordinate (100^3 possible coordinates to visit) without visiting each coordinate more than once. The sum of the differences between each coordinate in adjacent steps cannot be more than 2 (I don't know if this is possible. If not,...