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
2 answers

Error "illegalArgumentException: no such vertex in graph" but vertexSet() returns the vertex

I use a Flood Fill Algorithm to look if the 1s and 2s of a matrix are making a loop. For example: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 0 2 2 1 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0…
Graham Slick
  • 6,692
  • 9
  • 51
  • 87
1
vote
3 answers

NetworkX - How to create MultiDiGraph from Shapefile?

I'm just picking up NetworkX and trying to learn how to use it with Shapefiles. Right now I have a .shp with a road network that I want to represent in a Graph with NetworkX, so that I can find the shortest path between 2 GPS points. I tried using…
friveraa
  • 6,265
  • 2
  • 12
  • 7
1
vote
1 answer

how to find k components in a directed graph using Girvan-Newman algorithm?

I am aware of Girvan - Newman algorithm - here is the algorithm : The betweenness of all existing edges in the network is calculated first. The edge with the highest betweenness is removed. The betweenness of all edges affected by the removal is…
blank94
  • 374
  • 3
  • 20
1
vote
1 answer

Colormap not working in NetworkX

I am trying to make colored graphs. I keep running into odd behavior. I cannot get the colormap to assign colors automatically to the nodes. All nodes I try to do this with wind up the same color! The floats are the colors that are supposed to be…
Wapiti
  • 1,851
  • 2
  • 20
  • 40
1
vote
2 answers

D3.js Enter exit update pattern implementation

Background: I am working on a test project to explore a directed graph within THREE.js, I have a data structure that is not a DOM, but shares many properties with it. Namely, the structure is hierarchical and I can perform (subgraph) selection. I…
Joe
  • 1,455
  • 2
  • 19
  • 36
1
vote
1 answer

ISO standard for languages with double characters

In my language (albanian) "sh", "xh", "th", "dh", "ll" are one sound (letter) so I want to know is there any ISO standard that supports double character letters or if anyone has got any suggestion what should I do so that my app knows that when user…
Adnan Pirota
  • 299
  • 5
  • 25
0
votes
0 answers

How to remove cycles in a graph by *unfolding* them using `graph-tool`?

Using graph-tool, I want to remove cycles in a graph by unfolding them. That is, if there is a cycle, pick a node as root and make a copy of it such that the last edge in the path from root to root now has the copy as target. Something like the…
0
votes
0 answers

How to generate a Digraph Tree from a big XML

I have a big AML/XML file with many layers and child of child elements. I need to display the ElementTree tags as a Digraph. I only want to use lxml, networkx and matplotlib! I've run into multiple questions / issues: How do I automatically iterate…
0
votes
0 answers

Define layout for igraph layout_with_sugiyama from vertice attribute

It's my first time working with igraph - so please excuse my basic questions. I'm doing a stakeholder analysis and have different actors on different administrative scales. I'm trying to plot my network in a hierarchical way, because I want to show…
nomimi
  • 1
0
votes
0 answers

List of digraphs in MATLAB

I am a beginner in MATLAB. I have a function that takes an integer as input and returns a directed graph (digraph); I therefore have a list of integers L, and would like to create a list of digraphs derived from such integers. I have a function…
vevvostar
  • 135
  • 8
0
votes
1 answer

Is there a way to modify the isdag matlab function in order for it to ignore cycles of length zero?

recently I've been tasked with programming an algorithm that optimizes job-shop scheduling problems and I'm following an approach which uses directed graphs for this. In these directed graphs nodes represent events and edges represent time…
0
votes
0 answers

Python NetworkX simple_cycles Alternative Solution?

I’m very new to Python and NetworkX but I recently have learned how to do a few things to achieve what I’m after. My problem involves a 75-node, 144-edge graph (from adjacency list) that I need to find all simple cycles within. I was able to…
0
votes
1 answer

Graphviz question - vertical then horizontal alignment

Looking for help on below with Graphviz I've managed to alight subgraphs vertically (cluster0->cluster1->cluster2->etc) by using rankdir=TB and then invisible connection. But how to order numbers within a cluster from left to right? so it would look…
0
votes
0 answers

Create a Weighted NetworkX graph from Dict

I am trying to create a network graph from a dict. I don't know if it's because some edges containing more than 2 nodes. So the networkX graph doesn't work. dict = {('Declaration SUBMITTED by EMPLOYEE#Declaration FOR_APPROVAL by ADMINISTRATION',…
Maggie
  • 11
  • 2
0
votes
1 answer

Python - How to display directed multigraph with different node shapes using networkx.draw()

I have seen a similar question here and its accepted answer for a digraph. The idea for a digraph is to add nodes to as many different subgraphs as there are node shapes ('o', 'd', 's', etc.), then add edges between nodes and finally plot each using…
Cbhihe
  • 511
  • 9
  • 24