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
0
votes
1 answer

Matrix multiplication MATLAB

So maybe I am overthinking this and making a mess of it.... I have a digraph in MATLAB. I need to change it to a undirected graph to evaluate it with minimum spanning tree (right? It won't work on digraph). I have a nx1 matrix of binaries (1 is…
jdbul33
  • 165
  • 1
  • 8
0
votes
1 answer

How to remove digraph highlighting in vim

Using vim or nvim, when I open a new vim terminal digraphs display correctly. See below: However, whenever I change colorscheme (any, it is not specific to a particular colorscheme) - then the digraphs appear highlighted. The highlighting remains…
arcseldon
  • 35,523
  • 17
  • 121
  • 125
0
votes
1 answer

NetworkX MultiDiGraph -- `id` and `key` appearing in edge data attributes?

I'm iterating over edges in a NetworkX MultiDiGraph like so: for u, v, k, d in g.edges(keys=True, data=True): ... In some instances, I find id and key keys in the dictionary d, but I can't figure out when or why these are created, except that…
Matthew
  • 1,366
  • 2
  • 15
  • 28
0
votes
1 answer

Very Slow network graph animation in Python's matplotlib with networkx

I am tyring to animate a networkx graph growing over time. I have it working with curved edges and all. Quite pleased, BUT as the graph grows it slows down Considerably !? Can anyone explain or alter the code given to run faster. I don't think it's…
Ram
  • 158
  • 1
  • 16
0
votes
0 answers

Networkx - outdegree calculation

I'm calculating the outdegree over a series of different graphs. However, the last 'levels' in the graphs always produce a 0 outdegree when they shouldn't. For example, in the picture below the uppermost level nodes (labeled as 4) all have an…
jj8989
  • 1
  • 1
0
votes
2 answers

Why does a newline digraph in a macro get interpreted as a `j` in Vim?

Let's say I create a macro that goes down one line. qajq Register a contains exactly qajq, and so @a moves me down one line. Now let's say I type j into my buffer and yank it into register a using "ayy. Now, register a looks like j^J (notice the…
pushkin
  • 9,575
  • 15
  • 51
  • 95
0
votes
1 answer

graphviz change orientation of a specific shape in a digraph

How can i place all "parallelogram" [see my code] on the top of the S boxes with graphviz dot langage? So basically the output should look like a straight line with all M1 M2 and Mn on the top of the graph. Actual output: Desired output: digraph…
S12000
  • 3,345
  • 12
  • 35
  • 51
0
votes
1 answer

How can I access to adjacency lists inside the Vertex object?

I built a graph in Python, based on Vertex and graph classes, but in isCycleUtil() method, when I try to access Vertex object by doing for i in self.vert_dict[v], I get a TypeError: Vertex object not iterable. Can you help me to fix It and have a…
IdelHamza
  • 15
  • 5
0
votes
2 answers

How do I constrain connected vertices to share a single edge?

Because of the way that information is being generated, I results that look like this: digraph "A" { "a1" -> "a2"; "a2" -> "a1"; "a1" -> "a2"; "a2" -> "a1"; } What I would prefer to see, is: digraph "A" { "a1" -> "a2"[dir=both]; } Is…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
0
votes
1 answer

How to use non-positive integer as numeric node ID in digraph function?

For digraph, I want to use non-positive integer as numeric node ID. e.g; A = [-1 1 3]; B = [ 3 2 0]; plot(addedge(digraph, A , B)) If I run this, I receive this: Error using digraph/addedge>validateNodeIDs (line 155) Numeric node IDs must be…
Sardar Usama
  • 19,536
  • 9
  • 36
  • 58
0
votes
1 answer

Building a Directed Graph from a file

I need to read in a file and build a directed graph from it. I am working in C++. The file looks like this: SFA SLC 700 59 SFO LV 420 39 LAX LV 231 23 LV SLC 362 29 LAX SFO 344 39 LAX SLC 581 57 SFA SFO 679 67 SFO SLC 605 19 PHX…
M. Meacham
  • 121
  • 4
0
votes
1 answer

Time-labelled digraph implementation

I have a series of digraphs containing the same nodes, but differing edges - a dynamic/temporal graph - and am stuck for ideas about how best to implement this (Matlab or Python preferably). I would like to construct a digraph'esque structure…
user5751859
0
votes
1 answer

^J digraph not found

I ran :registers and noticed a ^J at the end of each line. "" def^J "0 abc^J "1 def^J Having never seen it before, I did some research and found this page describing digraphs. Where I expect to find ^J however, I find ^@, and I find the same…
pushkin
  • 9,575
  • 15
  • 51
  • 95
0
votes
1 answer

Algorithm for finding shortest cycles in directed graph

A shortest cycle is one with the minimum number of edges. For example, given a graph: The shortest cycles are: ACDA, DABD If I only needed to find one shortest cycle, I would just run BFS on every vertex and keep track of the smallest cycle. But I…
vladimirm
  • 261
  • 1
  • 2
  • 8
0
votes
1 answer

why digraph not defined in matlab2011?

I have this error when wrote digraph in matlab 2011a: help digraph. digraph not found. Use the Help browser search field to search the documentation, or type "help help" for help command options, such as help for methods. I want to use…
H.Ghassami
  • 1,012
  • 2
  • 21
  • 42