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, ...
154
questions
2
votes
1
answer
58
views
How to enter digraph mode permanently in vim/neovim
I want to enter digraph mode Ctrl+k permanently, so that i can type multiple digraphs at once, forexample typing a sentence in greek letters. or typing multiple languages, like japanese, chinese, ...
0
votes
0
answers
25
views
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 ...
1
vote
1
answer
166
views
Graph edge overlay when visualizing a networkx DAG using multipartite_layout
Consider the following snippet defining a DAG and drawing it:
import matplotlib.pyplot as plt
import networkx as nx
g = nx.DiGraph()
g.add_edge(1,2)
g.add_edge(2,3)
g.add_edge(3,4)
g.add_edge(1,4)
...
1
vote
3
answers
132
views
Use networkx to calculate the longest path to a given node
I have a networkx digraph. I would like to compute the longest path to a given node (from any possible node where there exists a directed path between the two). There are functions like nx....
0
votes
0
answers
30
views
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 ...
0
votes
0
answers
33
views
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 ...
0
votes
0
answers
38
views
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 ...
0
votes
1
answer
49
views
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 ...
0
votes
0
answers
129
views
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 ...
0
votes
1
answer
72
views
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 ...
1
vote
1
answer
548
views
Can you specify a bidirectional edge in a NetworkX digraph?
I'd like to be able to draw a NetworkX graph connecting characters from the movie "Love, Actually" (because it's that time of the year in this country), and specifying how each character &...
0
votes
0
answers
62
views
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 ...
2
votes
0
answers
72
views
new C++ standard syntax? -> const std::vector<int> a<% 1,2,3 %>; [duplicate]
I stumbled upon this code without any explanation. Googling it is a nightmare, please explain what's this:
const std::vector<int> a<% 1,2,3 %>;
0
votes
1
answer
152
views
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 ...
1
vote
1
answer
21
views
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=...
0
votes
1
answer
499
views
Bipartite graph in NetworkX for LARGE amount of nodes
I am trying to create bipartite of certain nodes, for small numbers it looks perfectly fine:
Image for around 30 nodes
Unfortunately, this isn't the case for more nodes like this one:
Image for more ...
1
vote
1
answer
124
views
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 ...
0
votes
0
answers
76
views
I am unable to view attributes of a graph read from a GML file in python
I am trying to use the networkx package to work on a directed graph. The file was read successfully but a lot of the functions do not give any output for it.
import networkx as nx
MyGraph=nx.DiGraph()
...
1
vote
1
answer
124
views
`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 ...
0
votes
1
answer
101
views
Is there an admissable heuristic for performing A* (A-star) search on a Directed Graph with cycles?
I am working on a school project which requires us to generate a random digraph with weighted edges and perform a number of graph traversal techniques to find one of the target nodes (marked in green) ...
0
votes
1
answer
58
views
Can someone tell me which language this is and how i should compile this into a graph?
Can someone tell me which language this is and how i should compile this into a graph? I downloaded a python code and after execute it gave me this back. There was nothing in the documentation except ...
0
votes
1
answer
65
views
igraph, Python - directed girth seems to not work
I'm working with randomly generated digraphs. I need to verify that the graphs I have have a girth of at least, say 3.
The solution I used is the following:
I generate a random adjacency matrix
I ...
-1
votes
1
answer
102
views
Trouble with digraphs: cannot borrow as mutable
I created a library to deal with digraphs: nodes that link (reference counted) to zero or one other nodes (as in linked lists, but in a digraph a node can be linked to by more than one node).
I am ...
0
votes
0
answers
134
views
List with references to its elements
I need to hold a list of nodes (strings) and have a "current" node (or more generally current nodes).
I would use a vector and current nodes specified by indexes, but sometimes a node is ...
1
vote
0
answers
717
views
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. ...
0
votes
1
answer
142
views
how to add float typed weights to an retworkx digraph
In my pursuit after a fast graph library for python, I stumbled upon retworkx,
and I'm trying to achieve the same (desired) result I've achieved using networkx.
In my networkx code, I instantiate a ...
0
votes
1
answer
73
views
Is this total sink algorithm only for dags?
I found this algorithm for digraphs that checks whether a total sink exists in a graph.
https://www.geeksforgeeks.org/determine-whether-universal-sink-exists-directed-graph/
My question is : Is this ...
1
vote
1
answer
85
views
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]...
0
votes
2
answers
501
views
Import graph from file to Networkx or NNGT
I need to build a large weighted digraph from data that's being exported from MatLab. The ultimate goal is to analyse it using NNGT, but it looks like building it using Networkx and then converting to ...
0
votes
1
answer
87
views
Forcing a node to stay on top when creating a cycle
I have the following graph:
digraph G {
u1, u2, u3, u5 [ shape = oval, style=filled, fillcolor="palegreen"];
u3 -> v3 -> v5_0 -> v5_1 -> v1;
u5 -> v8 -> v5_1;
v1 ...
0
votes
1
answer
514
views
How to determine the in-degree and out-degree of a node from a graph?
Whenever I apply H.neighbors(), to any node from my graph it shows none.
import networkx as nx
graph={'A': ['B', 'C'],
'B': ['C', 'D'],
'C': ['D','A'],
'D': ['C'],
'E': ['F'...
5
votes
1
answer
120
views
Single colons in arbitrary expressions?
I need to figure out what this obfuscated C++ code (written by someone else) does. I've figured pretty much everything, except one tricky part:
bool part1(char *flag)
{
int *t = (int *) memfrob(...
0
votes
0
answers
46
views
How to get different paths with same start and same end in a digraph(directed graph)?
giving a digraph like this:
1 --> 2
1 --> 3
2 --> 4
2 --> 5
3 --> 6
4 --> 7
5 --> 7
5 --> 8
7 --> 9
8 --> 9
6 --> 9
It`s easy to see there are 3 circle-like in graph.
...
0
votes
1
answer
101
views
Ideavim - how can I add digraphs
In Vim, i add digraphs by putting a line such as the following into my ~/.vimrc file to create a digraph for "ſ" (a long-s character):
:digr ls 383
However, adding such a line to my ~/....
1
vote
1
answer
689
views
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 ...
0
votes
0
answers
156
views
Python DiGraph - Dynamic Source Data
This is probably a moon shot, but I'm looking to get started with my first Python project and I'm looking for advice.
The goal is to write some code that would be able to create the following graph. ...
1
vote
0
answers
51
views
What does angle braces initializer "a[] = <%1%>" means in C++? It gives out ouput as 1 [duplicate]
Why this is a valid thing?
int a[] = <%1%>;
cout<<a<:0:>;
0
votes
1
answer
25
views
How to make boxes appear where I want them?
I want the Openshift and letsencrypt to appear below the Stage and Prod segment. Now its aligned with the Prod and Stage segment. Is rank the way to solve it?
Also, is there a way to obtain results ...
2
votes
0
answers
146
views
Is there any module available in Erlang to find all the cycles of an undirected graph?
For a directed graph, we have the following module:
digraph_utils:cyclic_strong_components(G)
Is there anything like this available for undirected graphs in Erlang? I want to find all the cycles in an ...
1
vote
1
answer
1k
views
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 ...
1
vote
2
answers
170
views
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 ...
10
votes
3
answers
2k
views
Breaking cycles in a digraph with the condition of preserving connectivity for certain nodes
I have a digraph consisting of a strongly connected component (blue) and a set of nodes (orange) that are the inputs to it. The challenge is to break as many cycles as possible with a minimum of ...
0
votes
1
answer
699
views
Simple Path and Simple Cycle in Graph DataStructure
I am unable to understand that does simple path in graph always contains first and last vertices as same?Can simple path be simple cycle ? Can simple cycle be simple path in graph data structure?...
0
votes
1
answer
337
views
Having a directed graph in pyhton (networkx), is it possible to create a subgraph according to a specific condition on the node attributes?
I have a twitter data set that i want to analyze,after creating a directed graph(the nodes are twitter users, and edge from a to b means a follows b)
how i created the graph :
I want to make a sub ...
1
vote
1
answer
368
views
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 ...
0
votes
0
answers
219
views
Floyd-Warshall to Graph networkx
I created a graph using networkx (Python). I am trying to convert it to DiGraph but I can't get it right. I need to create (and work on) a Graph first, so I can't start using DiGraph() to build it at ...
0
votes
1
answer
915
views
how to set a top-down position in a graph networkx
This is my extended work from here.
I would like to set the last element 'm' in the unique_liss appears at the top position of the rest nodes like this.
However, most of the image generated would be ...
0
votes
1
answer
163
views
No digraphs available in vim
I can't get digraphs to work in vim.
When I type:
:digraphs
it gives me an error message: E196: No digraphs in this version.
Do I need to install any plugins or packages? If I type:
:scriptnames
...
0
votes
1
answer
482
views
Adjacency Matrix with Letters as Index
Hi I'm looking for a way to implement an adjaceny matrix, where I can use letters as the index... something like a hashmap?
I currently use a simple 2D array and I have converted the letters A-Z into ...
2
votes
1
answer
1k
views
List of Successors of successors in a DiGraph in Networkx
I'm working on a function that creates a family tree using a directed graph in networkx, where the nodes are family members with the date of birth as a node attribute.
Now what i want to do is to make ...