digraphs

Why are there digraphs in C and C++?

I learned today that there are digraphs in C99 and C++. The following is a valid program: %:include <stdio.h> %:ifndef BUFSIZE %:define BUFSIZE 512 %:endif void copy(char d<::>, const char s<::>, int len) <% while (len-- >= 0) <% d<:len:> = s<:len:>; %> %> My question is: why do they exist? ...

C++ alternative tokens?

I've just read this nice piece from reddit. They mention "and" and "or" being "Alternative Tokens" to && and || I was really unaware of these just till now. Of course, everybody knows about the di-graphs and tri-graphs but "and" and "or"? Seriously? Since when? Is this a recent addition to the standard? I've just checked it with Visua...

copyright character in vim

I used to get this copyright symbol in vim earlier through some keys' combination. Can someone help me with it now? I simply fail to recollect it. Also, if possible, share some more of such characters... someone might need it sometime. ...

Finding the path with the maximum minimal weight

Hi I'm trying to work out an algorithm for finding a path across a directed graph. It's not a conventional path and I can't find any references to anything like this being done already. I want to find the path which has the maximum minimum weight. I.e. If there are two paths with weights 10->1->10 and 2->2->2 then the second path is c...

Sparse Multidimensional Array or Matrix Libraries in .NET

Hi, I have a need for a sparse matrix in up to 4 dimensions in a .NET application. The size of the matrix (if represented as a .NET Array) would potentially top 400MB. The array is likely to be very sparse, and I need to be able to instantiate and dispose it very quickly (although that's not a no go). I'm therefore after a sparse array...

State in Erlang Digraphs

The Erlang digraphs module surprised me by mutating state. When dealing with other data structure modules in Erlang, for instance the sets module, the instance of the data structure passed in, is unmodified. The function returns a new, altered version e.g. >S = sets:new(). >sets:size(S). 0 >T = sets:add_element(S, "element"). >sets:siz...

GraphViz - How to connect subgraphs?

In the DOT language for GraphViz, I'm trying to represent a dependency diagram. I need to be able to have nodes inside a container and to be able to make nodes and/or containers dependent on other nodes and/or containers. I'm using subgraph to represent my containers. Node linking works just fine, but I can't figure out how to connect s...

Is there a good digraph layout library callable from C++?

The digraphs represent finite automata. Up until now my test program has been writing out dot files for testing. This is pretty good both for regression testing (keep the verified output files in subversion, ask it if there has been a change) and for visualisation. However, there are some problems... Basically, I want something callable...

GraphSharp .Net Graph Layout Engine

I want to use the apparently fantastic GraphSharp library but the project has NO documentation. Specifically I'm interested in using the layout engine and not interested in the WPF control. I simply want to calculate a layout (positions of the nodes) for a given graph and layout algorithm. Does anyone have any advice, tips, links on h...

Calculating total number of spanning trees containing a particular set of edges

I have tried the following approach: First I do edge contraction for all the edges in the given set of edges to form a modified graph. Then I calculate the total number of spanning trees, using the matrix tree theorem, from the modified graph. I want to know if this method is correct and if there are some other better methods. ...

Detecting mulitple cycles in a cyclic directed graph (python)

Hello, I have a directed cyclic graph with more than one cycle in it and I need a way to detect (and list) each cycle present in the digraph. The graph can be seen here: http://img412.imageshack.us/img412/3327/schematic.gif This is a dummy graph put together for the sake of debugging my python script. It contains the cycles: [n13, n14...

Can the Jung2 graph library traverse a digraph

Does anyone know if the Java Jung2 graph library provides the in-built capability to traverse a Digraph given a start Vector? I did see that there's a BFSDistanceLabeler class that returns a map of distances, which could do, but I then need to sort the values (highest distance first) and iterate through the sorted set. I'm creating a de...

Graph incidence list implementation

I'm considering graph data structure implementations and am looking at the "incidence list" representation. There is a brief description of it here: Incidence list So each vertex in the graph stores a list of those edges upon which it is incident. Given that my graph is a digraph, I'm not very clear from this description on a couple o...

All possible paths from one node to another in a directed tree (igraph)

I use python binding to igraph to represent a directed tree. I would like to find all possible paths from one node in that graph to another one. Unfortunately, I couldn't find a ready to use function in igraph that performs this task? EDIT The concerns on infinite number of paths the graph I'm talking about is actually a directed ac...