Questions tagged [digraphs]

A 'digraph' means 'one symbol written as two characters'. In printing it meant two letters cast as one piece of lead, e.g. ae, fi, ...

In graph theory, 'digraph' is an abbreviation of 'directed graph'. You may want to use the more explicit tag directed-graph.

In computer programming, digraphs and trigraphs are sequences of two and three characters respectively, appearing in source code, which a programming language specification requires an implementation of that language to treat as if they were one other character.

Various reasons exist for using digraphs and trigraphs: keyboards may not have keys to cover the entire character set of the language, input of special characters may be difficult, text editors may reserve some characters for special use and so on. Trigraphs might also be used for some EBCDIC code pages that lack characters such as { and }.

155 questions
1
vote
1 answer

Digraph transition labels far from arrows

Some transition labels from my graph are far from the transition arrow. (see picutre and source code) How can I fix this ? digraph summary { nodesep=1.0 graph [splines=ortho, nodesep=3.0] node [height=2, width=3, fixedsize=true] front_office…
Tyvain
  • 2,640
  • 6
  • 36
  • 70
1
vote
1 answer

Graphviz Separate Nodes

I have a Dataframe that links Employee to Supervisor and I am trying to create a twopi Graphviz to create a radial org chart. I am having issues where some of the nodes overlap. Here is my current code: from networkx.drawing.nx_agraph import…
Bijan
  • 7,737
  • 18
  • 89
  • 149
1
vote
1 answer

`graph-tool` edge bundling circular layout graph from weighted adjacency block matrix

I am trying graph-tool by Tiago Peixoto to build a graph (either directed or undirected) from a given weighted adjacency matrix with a block structure. So far, unsuccessfully. My question partly overlaps with this thread on SO, which, however,…
maurizio
  • 745
  • 1
  • 7
  • 25
1
vote
0 answers

Create a Postgres Schema from a JSON file

I have a pretty simple json file that represents a network (see below). I would like to create a postgres schema from the file so that would allow me to store the network structure in a postgres db. My searches online seem to be related to storing…
MikeB2019x
  • 823
  • 8
  • 23
1
vote
1 answer

Manipulate existing labels on a digraph object

There's this graphviz digraph object generated from a library. I'm trying to change the font for the labels... digraph "something" { graph [rankdir=LR] node [margin=0 shape=plaintext] "something" [label="something" fontsize=30] …
gherkins
  • 14,603
  • 6
  • 44
  • 70
1
vote
1 answer

networkx. digraph. walking from starting to ending nodes

Having networkx DiGraph presenting following structure: I am trying to find a way to walk through the directed graph from far left nodes (without any incoming edges) presenting data sources from intermediate nodes (having incoming and outgoing…
user3583807
  • 766
  • 1
  • 8
  • 26
1
vote
0 answers

What does angle braces initializer "a[] = <%1%>" means in C++? It gives out ouput as 1

Why this is a valid thing? int a[] = <%1%>; cout<;
Naval Kishore
  • 115
  • 1
  • 7
1
vote
1 answer

Python Netgraph Interactive Labels

I am trying to create an interactive plot using netgraph and networkx. I would like the plot to allow movement of the nodes and as the nodes move, the edges and edge_labels will also dynamically update. Moving the nodes was addressed by the author…
1
vote
2 answers

Are digraphs transformed by a compiler and trigraphs transformed by a preprocessor?

I'm trying to understand both trigraphs and digraphs rather than use them. I've read that post and I understood that: Converting trigraphs to corresponding characters shall always be done by the preprocessor, before the actual compilation…
Cătălina Sîrbu
  • 1,253
  • 9
  • 30
1
vote
1 answer

Inconsistency in determining directed graph's back edges via DFS

I have found multiple algorithms that allows determining the back edges of a directed graph using DFS. Unfortunately, I found an inconsistency in one of the graphs I am analyzing. Please find below a minimal example: For this directed graph, I…
1
vote
1 answer

Read digraph from a file

Hi all – I'm new to coding if anybody is wondering. This is my first time posting here and I'm currently stuck on one of my assignments. The code below is my draft code. The expected output for adjacency_list is: [[1,3], [2], [3], [0,2]] # with…
1
vote
1 answer

Extract branches from digraph in MATLAB

I am looking for a way to extract the branches of a digraph in MATLAB. Precisely, if I have a network (my_digraph) similar to the following: When I enter my_digraph.plot I recieve this: I could now manually write down the branches by looking at…
00koeffers
  • 327
  • 2
  • 11
1
vote
1 answer

How to draw a DiGraph in a Org Chart fashion?

issue statement: While I managed to get a chart out of a Networkx DiGraph via Matplotlib, I wish I could get better settings or be advised a more suitable library to draw it in a more 'readable' fashion. As you'll see below, the chart is pretty…
ionah
  • 81
  • 1
  • 8
1
vote
0 answers

find patterns in digraphs

I'm trying to write simple code in java to find patterns (understood as recurrent sequence of elements in a superstructure) in digraphs (DAG) random generated. I know for example the K-recurring substring to identify pattern but are there other…
Meda
  • 31
  • 1
  • 4
1
vote
1 answer

Python NetworkX - get DiGraph from nested dictionaries

I am trying to create a simple DiGraph in python's NetworkX from nested dictionary but it looks like built in initialization doesn't built final leaf nodes. Toy example: class_hierarchy= {-1: ["A", "B"], "A":{"A1":[1], "A2":[3,4]}, "B":…
Maksim Khaitovich
  • 4,742
  • 7
  • 39
  • 70