Edges represent the logical connection between two regions in an entity. In the case of graphs, edges refer to the logical connection between two vertices, or nodes. Use this tag whenever you have a question about working with or traversing edges in a graph or a graph-based database. See also [edge-list].
Questions tagged [edges]
582 questions
6
votes
2 answers
Python networkx : edge contraction
I have a NetworkX graph. I would like to know how to do edge contraction between multiple nodes.
For example, if I wanted to contract X, Y and Z:
_ node A _
_/ | \_
node X --- node Y --- node Z
Would become
node A…

qdelettre
- 1,873
- 5
- 25
- 36
6
votes
1 answer
Android issue: View with endless scrolling
I have a custom View with scroll implemented, but it seems like an ENDLESS scrolling over the image.
Even when I find the edge of the image, it keeps scrolling to a blank background.
I can't use a WebView because I also have some Canvas sutff.
Does…

Rayssa Küllian
- 71
- 4
5
votes
2 answers
Simple conversion to edgelist with R?
I need to do a simple data conversion in R for usage with igraph. My dataframe is in this format, grouped by GROUP:
A GROUP
1 1 a
2 2 a
3 3 a
4 4 a
5 1 b
6 3 b
7 5 b
1. How do I expand…

R-obert
- 999
- 3
- 10
- 17
5
votes
3 answers
Java Graphics.fillPolygon: How to also render right and bottom edges?
When drawing polygons, Java2D leaves off the right and bottom edges. I understand why this is done. However, I would like to draw something that includes those edges. One thing that occurred to me was to follow fillPolygon with drawPolygon with…

Timothy Miller
- 1,527
- 4
- 28
- 48
5
votes
1 answer
In OpenGL ES 2.0, how can I draw a wireframe of triangles except for the lines on adjacent coplanar faces?
I vaguely remember seeing something in OpenGL (not ES, which was still at v1.0 on the iPhone when I came across this, which is why I never used it) that let me specify which edges of my polygons were considered outlines vs those that made up the…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
5
votes
2 answers
Spring Graph Algorithm w Node size
I need to do some graph layout drawing and have been looking at using something like the Spring layout algorithm as implemented here and discussed here
However my nodes all have a width and height (is an entity diagram). Can anyone explain how I…

Mark
- 1,509
- 1
- 15
- 28
5
votes
4 answers
Is there an R function to get the unique edges in an undirected (not directed) network?
I want to count the number of the unique edges in an undirected network, e.g, net
x y
1 A B
2 B A
3 A B
There should be only one unique edge for this matrix, because edges A-B and B-A are same for the undirected network.
For the directed…

Z Qu
- 53
- 4
5
votes
4 answers
Is O(V+E) equivalent to O(V^2)?
My question is about whether O(V+E) = O(V^2).
Basically, if O(V+E) is linear time such that V+E = n, wouldn't O(V^2) also be linear time?
I assume the worst-case/upper bound for O(V+E) is an edge between each vertex, which would result in (V-1)^2…

Young Scooter
- 474
- 5
- 14
5
votes
3 answers
Best Algorithm to find the edges (polygon) of vertices
I have a large array of vertices, some of them are edges, some are redundant (inside the shape) and I want to remove those.
The simplest algorithm I could think of is checking one by one if they hit the shape formed by the others. But it should be a…

fabiopedrosa
- 2,521
- 7
- 29
- 42
5
votes
2 answers
Creating a graph with edges of different colours in Mathematica
I want to create a graph (Graph Theory) where certain edges have a different colour to other edges, which would be used to highlight a path in the graph from one vertex to another.
Here are some examples which have different coloured edges…

dbjohn
- 975
- 3
- 15
- 24
5
votes
3 answers
Which layout should I use to get non-overlapping edges in igraph in python?
I want to make a graph without overlapping edges. I am using python with the igraph libray. This is my code
import sys
import igraph
from igraph import *
import re
g =…
5
votes
3 answers
Python: Combination in lists of lists (?)
First of all I wanted to say that my title is probably not describing my question correctly. I don't know how the process I am trying to accomplish is called, which made searching for a solution on stackoverflow or google very difficult. A hint…

user4911943
- 137
- 1
- 1
- 5
5
votes
2 answers
Draw a graph from a list of connected nodes
In a system I Have a list of nodes which are connected like in a normal graph. We know the whole system and all of their connections and we also have a startpoint. All my edges has a direction.
Now I want to draw all of these nodes and edges…

Lars Holdgaard
- 9,496
- 26
- 102
- 182
5
votes
1 answer
Controlling which edges are visible in a network diagram in igraph in r
I have a the following diagram created in igraph
set.seed(1410)
df<-data.frame(
"site.x"=c(rep("a",4),rep("b",4),rep("c",4),rep("d",4)),
"site.y"=c(rep(c("e","f","g","h"),4)),
"bond.strength"=sample(1:100,16,…

Elizabeth
- 6,391
- 17
- 62
- 90
5
votes
2 answers
Find border (boundary) edges of planar graph (geometric shape)
I have vertices and an edge list that describe a planar geometric shape (faces are triangles). For example:
a_______b
/|\ /
/ | \ /
e/__|__\/c
d
Verts: a, b, c, d, e
Edges: (a,b), (a,c), (a,d), (a,e), (b,c), (c,d), (d,e)
So that is…

Matthew Alpert
- 5,993
- 1
- 16
- 13