Hello, I'm back with another similar question. I am currently working on a Java program that will check if a graph is 2-colorable, i.e. if it contains no odd cycles (cycles of odd number length). The entire algorithm is supposed to run in O(V+E) time (V being all vertices and E being all edges in the graph). My current algorithm does a D...
I would like to know if there is an efficient algorithm S = F(v,G) to construct a subgraph S out of a DAG G = (V,E) such that all the paths in S contain the vertex v of V. If so, it is possible to efficiently extend F to F'(N,G) for a set of vertices N. I am open to any data structures for storing the DAG G initially.
Actually a condit...
I'm writing a 2D plotter, and along the X- and Y-axis I have markers with printed values. Now my question is: how do I find suitable distances?
My method (for a numeric axis) is so far:
I know the height of the axis on screen in pixels
Decide an optimal distance between markers in pixels (what looks good on screen ...), for example 32...
For jollies I'm trying to implement a graph data structure as an interface, so that I can implement graph classes either as adjacency lists (lists of lists of edges) or as adjacency matrices ( a 2 dimensional array of edges) with a minimum of additional code.
My question is, is there a way I can implement the IGraph interface so that ei...
I'm writing code for a graph.
Which is better for implementing a digraph with weighted edges?
set 1
class Node ;
class Edge
{
Node *src, *dst ;
int cost ;
} ;
class Node
{
list<Edge> edges ; // slightly redundant.
// because an edge connects two nodes,
// the information in each Edge's src
// is redundant to this
} ;
s...
I'm learning about the Planar Graph and coloring in c++. But i don't know install the algorithm to do this work. Someone please help me?
Here i have some information for you! This is my code! And it still has a function does not finish. If someone know what is a "Planar Graph", please fix the Planar_Graph function below! :D thanks so mu...
I need to get a 2d picture of a network graph. I know the topology. Is there any tool which will help me do so?
...
I'm implementing Kruskal's algorithm and I'd like to utilize threads. However I am not sure I know enough about the algorithm to do this.
What I imagine is that I'd different parts of the graph would be solved for and connected at the end. Can anyone point me in the right direction? Thanks.
...
Hi,
How do I create a C++ weighted Graph where each vertex in the graph has a weight (some integer value)?
You can download my graph project here (RapidShare):
Here is the function to create a graph from graph data stored in a text file:
void GraphType::createGraph()
{
ifstream infile;
char fileName[50];
int index;
in...
I've been writing a Java program that aides in cutting and working with sprites, such as CSS sprites. The main idea is that the image is segmented into subregions, so the software understands the "spritesheet" is composed of multiple sprites.
The algorithm I developed works by scanning horizontal (x) and vertical (y) axes for breaks, ba...
I was working on this graph problem from the UVa problem set. It's a single-source-shortest-paths problem with no negative edge weights. From what I've gathered, the algorithm with the best big-O running time for such problems is Dijkstra with a Fibonacci heap as the priority queue, although practically speaking a binary heap is easier t...
I'm implementing a Graph which holds "Book" objects as its nodes. The nodes are connected if the books share a keyword. The keywords for each book are held in a Vector within the Book class. To do this, I've created 3 classes.
1) Books 2) Vertex 3) Graph
The Vertex class holds the Book object and also has a Vector containing all the ot...
Pagerank works on the nodegraph of a series of pages and the directed edges formed by their respective inward and outward links. Thus the rank of a particular page is broadly a locally-induced effect in the nodegraph.
SVD, on the other hand, works on a whole matrix of values, and has no directionality - a link between site A and site B ...
Is there some sort of application/API with which I can graph sets of numbers(line graph)?
I will be interfacing with an external device which will provide me with some readings(via a custom format through a /dev/cua file) at a rate of about 1000 readings per second. I want to be able to graph this as a line graph.
So I will need to be...
Is there any software or library able to plot cartesian plots "high school style" with the axis as a cross inside the figure?
Most plotting software I tried just puts the axis as a box around the plot, maybe useful for real world data but for studying simple functions it has less visual information.
In addition if it's able to put anno...
Is there a javascript library that allows for drawing histograms/graphs over timelines, allow zooming, as well as selecting regions.
Something similar to Google's Financial Data Graphs (allows for scrolling, zooming in, as well as selecting ranges)
Google Financial Data
Thanks.
...
I'm trying to understand the algorithm described here, but the explanation really isn't very clear:
'tour' is a stack
find_tour(u):
for each edge e=(u,v) in E:
remove e from E
find_tour(v)
prepend u to tour
to find the tour, clear stack 'tour' and call find_tour(u),
where u is any vertex with a non-zero degree.
Wha...
I have a bar graph that displays a maximum value of 4, an integer. But the Y-axis values displayed are from 0.0 to 4.0.
I want the y-axis to display integer values, not in decimal form.
Can I explicitly do this in the JPGraph library?
Thanks in advance. :D
...
I need a functions thats find a cycle in an undirected graph (boost) and returns its vertices and edges. It needs only return the vertices/edges of one cycle in the graph.
My question is - what is the best way to do this using with boost? I am not experienced using it.
...
I have downloaded the Flot library and have been having a play around.
I understand how the Flot library works and how to draw simple graphs. The bit I am struggling with is pulling data from a DB and passing that into a Flot Graph so that the graph then becomes dynamic depending on the data retrieved.
I believe you can pass data from...