Questions tagged [edge-list]

Use [edge-list] for questions about creating, converting, or working in general with a list of edge nodes/vertices from a spatial network or graph. Be sure to include what language you are working with, e.g. [r].

An edge list is a list of edge nodes or vertices formatted in a tabular, graph, or other ordered layout. Sometimes referred to as an adjacency list or node list, an edge list contains all the points of a spacial network, commonly called a graph or map.

Edge lists in programming are used in R, Wolfram, and MATLAB, among others, and more broadly in computer science and mathematics in the specific fields of sorting/searching algorithms or graph traversal.

For further reading, see these links:

78 questions
2
votes
0 answers

Visualize 7 million edges in pygraphistry

I have large dataset with of about 7 million edges and after an extensive search for methods and tool to visualise this data I came across pygraphistry I am trying to visualize the edges and connection without applying any modeling for now. But this…
Sitz Blogz
  • 927
  • 5
  • 23
  • 46
2
votes
2 answers

DFS after remove some edge

I have a graph with one source vertex and a list of the edges, where in each iteration one edge from the list is going to be removed from the graph. For each vertex i have to print the number of iterations after it lost its connection to the source…
2
votes
0 answers

Finding an edge by unique ID or name

It is possible to search a subgraph and node by their unique names; n = agnode(g, "myUniqueNodeName", FALSE); h = agsubg(g, "myUniqueSubgrahName", FALSE); Likewise, is there a way to search edges in a strict directed graph by their unique names? e…
user151410
  • 776
  • 9
  • 21
2
votes
1 answer

Can’t get NetworkX to read my weighted network (+haven’t found a way to import node attibutes from a file)

I don’t have experience with Python/NetworkX. Everything I try is a dead-end. I have Python 2.7 installed on Windows 8. (Took forever to install NetworkX.) A. I cannot get NetworkX to read my weighted network I have a text file with the edges and…
user3656340
  • 23
  • 1
  • 3
2
votes
1 answer

Scan Line Polygon Fill Algorithm

I am implementing a scan line based polygon fill algorithm. I know the general algorithm and I am now trying to implement it in C++. I need to implement the edge table an active edge list. I have made the active edge list a vector for easy inserting…
RXC
  • 1,173
  • 4
  • 31
  • 64
1
vote
1 answer

creating an object from edgelist in igraph

I am new to igraph. I use it with R (which I am new to as well). I want to use the CINNA R package later on, but am struggling to load my network into igraph/create an igraph object out of my file. What I have tried so far: ```read.graph("file",…
Caty
  • 11
  • 1
1
vote
1 answer

Efficient way to compare vertex lookup table with edge list and assign vertex label to any edge that matches

I have two data frames. First, a lookup table comprising a list of vertex names: lookup <- data.frame(Name=c("Bob","Jane")) Then I have an edge list that looks like this: edges <- data.frame(vertex1 =…
Obed
  • 127
  • 9
1
vote
1 answer

Edge-list Network graph R

I am stuck in drawing a graph on R. In particular, I would like to make a network graph as this but with the central node of another color and the size of the other nodes as big as the column weights in the dataset. The dataset is the…
1
vote
2 answers

How to turn a weighted edgelist into an adjacency matrix in r

I have a weighted edge list and I want to convert it into an adjacency matrix. Is there a simple code I can use to do this? The data looks like this: From To Weight 1 a a 0.3274570 2 b a 0.7188648 3 a b 0.1097450 4 b b…
1
vote
2 answers

Adding (non-repeating) Random Numbers to Each Line of .txt File

I'm creating a .txt file that has four soldiers on a team ranking each other in order of merit. Soldiers do not rank themselves. I have the following code: import itertools # create a list of 4 soldiers numSoldiers=4 soldiers = [] for i in…
jfeuerman
  • 177
  • 8
1
vote
1 answer

Create Edge list for (900+) nodes (in R)

I have a problem creating an edge list of 406351 edges (possible combinations of two nodes out of 902 unique nodes). The nodes correspond to doctors, and the edges correspond to the number of patients two nodes share in a period of time (one…
NLV
  • 11
  • 2
1
vote
1 answer

NLTK discourse tree to edge list

I have following string: dt = ' ( NS-elaboration ( EDU 1 ) ( NS-elaboration ( EDU 2 ) ( NS-elaboration ( EDU 3 ) ( EDU 4 ) ) ) ) ' I can convert it to an NLTK tree as follows: from nltk import Tree t = Tree.fromstring(dt) This tree is…
user12380268
1
vote
0 answers

Reading a particular graph from file

I have to read and create a graph with networkx using an existent .txt file. The txt file starts with: % asym posweighted % 28236 1574 1574 1 2 1 1 3 7 4 5 3 6 7 5 6 8 14137 9 10 8 11 2 8 12 5 413 13 14 2 13 15 2 16 17 2 18 5 416 18 19 2 20 21 8 20…
neoblade11
  • 19
  • 7
1
vote
1 answer

Converting data.frame into an edgelist to use in a chord diagram

I would like to create a chord diagram to showcase the relationship between different projects based on their keywords. So I have data that looks like this (where A, B, C represent keywords): A B C Project 1 1 0 1…
cod85
  • 11
  • 1
1
vote
1 answer

How to export a weighted networkx graph to edge list in desired format?

I'm trying to take a weighted networkx graph and convert it to an edgelist .txt file, where each row takes the form of three space-delimited numbers that indicate the starting node, ending node, and corresponding weight. Here's what I've tried for…
fishbacp
  • 523
  • 5
  • 12