Questions tagged [directed-graph]

A directed graph is a set of objects (called vertices or nodes) that are connected together, where all the edges are directed from one vertex to another. A directed graph is sometimes called a digraph or a directed network.

A directed graph (or digraph) is a , or set of nodes connected by edges, where the edges have a direction associated with them

686 questions
-1
votes
1 answer

Can I make a JavaFx ArcTo's radii independent of the parent's x and y coordinates?

I have a JavaFx ArcTo which connects two Vertices. The intent is to draw the directed edges on a graph, where two Vertices could share opposite-facing directed edges. The arc is to avoid overlap and make sure both edges are visible. Setting the…
paullc
  • 27
  • 6
-1
votes
1 answer

D3.js - How to keep force directed layout in bounds when radius has been scaled

Currently, I have a force directed layout where nodes and links go out of my svg boundaries if data is too large. My tick function includes: node .attr('cx', function(d) {return d.x}) .attr('cy', function(d) {return d.y}) I do see…
T D
  • 427
  • 1
  • 4
  • 11
-1
votes
1 answer

How do I make some calculations in R?

I'm new to R and this is issue is bothering me a lot. I have a weighted and directed network and I want to do the following: I have an igraph network. I want to calculate the edge_betweenness of all edges and create a matrix with the following…
-1
votes
1 answer

Directed igraph over a point

Got a question for you about the package igraph. When the igraph is directed, is it possible to give an input like from A to C over B? A directed edge from A to C over B? Like a train from Spain(A) to Russia(C). The Train drives through…
meilirog
  • 15
  • 1
  • 4
-1
votes
2 answers

Detecting a cycle in a given array

I have an array of strings like the following: ["a => ", "b => c", "c = > f", "d => a", "e => b", "f =>"] This represents a partial order such that "c" is before "b", "f" is before "c", "a" is before "d", and "b" is before "e". The order can be…
Reiss Johnson
  • 1,419
  • 1
  • 13
  • 19
-1
votes
1 answer

directed graphs and moving against the flow of the arrow

Is it possible to move against the direction indicated in a directed graph, e.g. a -> b Does this imply that if one were at b it would be impossible to get to a?
slmyers
  • 767
  • 1
  • 8
  • 21
-2
votes
1 answer

Check if graph is cyclic

The following code works fine except for when it runs through an acyclic graph. It marks the acyclic graph as cyclic and I can't understand why. @Override public boolean isCyclic(DirectedGraph graph) { List> visitedNodes =…
Lithicas
  • 3,793
  • 7
  • 23
  • 32
-2
votes
1 answer

C++ Program that finds the greatest character

I need to make a program that takes in: The total number of characters to be compared The character to evaluate A comparisons between the character to evaluate and other characters The output of the program should be "YES" if the selected…
Hayk
  • 17
  • 3
-3
votes
2 answers

How to store Degrees of directed graph into dictionary?

While storing degrees against each node in directed graph. I'm facing below error. degree = G.degree(G) degree_values = dict(G.degree) degree_values TypeError: 'dict' object is not callable
-3
votes
2 answers

Which algorithm should match this specific Graph

specific question here. Suppose you have a graph where each vertice specifies how many connections they must have to another vertices and the following rules/properties apply: 1- The graph can be incomplete (no need to every vertice to have a…
-3
votes
3 answers

Read adjacency list of digraph from a text file in C++

I have a text file which has some number of integers in each line. Example: 1 2 4 3 0 4 2 3 Here 1st line means that the 1st node is connected to nodes numbered 1, 2 and 5. Blank line means 4th node isn't connected to any node. This gives me a…
kamalbanga
  • 1,881
  • 5
  • 27
  • 46
1 2 3
45
46