graph

Safe way for getting/finding a vertex in a graph with custom properties -> good programming practice?

Hi, I am writing a Graph-class using boost-graph-library. I use custom vertex and edge properties and a map to store/find the vertices/edges for a given property. I'm satisfied with how it works, so far. However, I have a small problem, where I'm not sure how to solve it "nicely". The class provides a method Vertex getVertex(Vertexprop...

Common and useful Graph functions?

Hi, I'm implementing a simple Graph library for my uni project and since this is the first time I'm dealing with graphs, I would like to know which functions you guys consider to be most common and useful for Graph implementations... So far, I have this: graphInitialize() graphInsertVertex() graphRemoveVertex() graphGetVertex() graph...

Control layout using graphviz twopi

I am trying to draw a graph showing search prefixes using twopi. I have a simple input file and am getting this output: (full image) Here is the input file: digraph search { // ordering=out; // color=blue; // rank=same; // overlap=scale; rankdir=LR; root=root; ranksep=1.25; overlap=true; "root"; a [color=none,fontsize=12]; b [...

Timeline graph - how to handle "time gaps"?

I've been working with Google chart API and annotated timeline. Drawing graphs is fine. I have no problem. However, I need to draw a timeline graph for share prices. And as you may know, share prices are meaningful only between certain times (e.g. from 10AM to 4PM, when the market opens and closes). How do I change the Google timeline ...

How to spread changes in oriented graph?

Hello, I have oriented graph. Graph can be strongly connected. Every vertex can have a set of anything, for example letters. The set is user editable. Every vertex makes intersection of sets in previous vertices (only one step back). But now, there is problem: When I update set of one vertex, the change should expand to all vertices an...

Best and easiest algorithm to search for a vertex on a Graph?

Hi, After implementing most of the common and needed functions for my Graph implementation, I realized that a couple of functions (remove vertex, search vertex and get vertex) don't have the "best" implementation. I'm using adjacency lists with linked lists for my Graph implementation and I was searching one vertex after the other unti...

Social network graph using a javascript library

Hi, I intend to draw a directed graph (node-oriented). The nodes in the graph are dynamically generated. I am wondering if there's any good js library out there that solves my problem. Edges and weights need to be custom configured. Thanks, Deepak. ...

How to implement a graph-structured stack?

Ok, so I would like to make a GLR parser generator. I know there exist such programs better than what I will probably make, but I am doing this for fun/learning so that's not important. I have been reading about GLR parsing and I think I have a decent high level understanding of it now. But now it's time to get down to business. The gr...

construct graph from python set type.

The short question, is there an off the self function to make a graph from a collection of python sets? The longer question: I have several python sets. They each overlap or some are sub sets of others. I would like to make a graph (as in nodes and edges) nodes are the elements in the sets. The edges are intersection of the sets with wei...

I already have the log file. How can I make a graph of it?

Hello, I already have log file. Now what i need is to make the graph of that log file. Is there any command line tool or google API to make graph which will show every transaction time. Thank You ...

How to customize data points on a Flex graph?

I have an area graph and I'm looking to have the data points to be shown. I have a CircleItemRenderer, but this shows all of the datapoints in the default stroke and fill. 1) How do I customize the display of my CircleItemRenderer? (instead of it having an orange fill, how can I change the color? 2) How can I decide to show the node ...

Millions of 3D points: How to find the 10 of them closest to a given point?

A point in 3-d is defined by (x,y,z). Distance d between any two points (X,Y,Z) and (x,y,z) is d= Sqrt[(X-x)^2 + (Y-y)^2 + (Z-z)^2]. Now there are a million entries in a file, each entry is some point in space, in no specific order. Given any point (a,b,c) find the nearest 10 points to it. How would you store the million points and how w...

Does there exist a jQuery plugin or JavaScript library that allows Venn Diagram presentation?

I'm writing a jQuery application to allow analysis of data with the help of visual cues. My data is retrieved via XMLHttpRequest in the form of JSON. The visual cues include histograms, spark lines, and various other graph types. The idea is that the user is able to narrow their data via these various visual views. My question is thu...

Graph limitations - Should I use Decorator?

I have a functional AdjacencyListGraph class that adheres to a defined interface GraphStructure. In order to layer limitations on this (eg. acyclic, non-null, unique vertex data etc.), I can see two possible routes, each making use of the GraphStructure interface: Create a single class ("ControlledGraph") that has a set of bitflags spe...

BlackBerry - SVG (JSR 226) or OpenGL ES (JSR 239) charting library

Does anyone know of a library to display charts and graphs natively on blackberry devices ? There are quite a few javascript (Flot...) charting libraries but I'd rather use something similar to Coreplot on iPhone if it is possible. I didn't find anything on top of SVG (JSR 226) or open GL ES (JSR 239) so any help is appreciated. Ideally...

Is there a way to efficiently update one value in dojo chart2d?

I am looking for a way to update one and only one value in a dojox chart2d. There is a way to update an entire series, which involves mychart.updateSeries("myseriesname",array_of_data) mychart.render() but This is too slow for my application. What I want to do is be able to drag the mouse over a vertical bar chart and have the valu...

Easiest ways to generate graphs from Python?

I'm using Python to process CSV files filled with data that I want to run calculations on, and then graph. I'm looking for a library to use that I can send processed CSV information to, or a dict of some sort, and then choose different graphing styles with. Does anyone have any recommendations? ...

How to detect if a directed graph is cyclic?

How can we detect if a directed graph is cyclic? I thought using breadth first search, but I'm not sure. Any ideas? ...

Longest acyclic path in a directed unweighted graph

Hello, What algorithm can be used to find the longest acyclic path in a directed unweighted graph? Thanks ...

(interactive) graph as in graph theory on a web page ?

Hi, I have to integrate a graph with nodes and edges on a web page. Ideally, i would like to be able to interact with it (like moving the nodes around). Actually, i'm beginning by representing trees, so i would appreciate to be able to collapse subtrees. How can I do that ? I was considering google-visualization api but i wasn't able ...