Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 53229

Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.

3 votes
2 answers
172 views

Can I direct an edge to the midpoint of another edge in a graph?

I've been trying to make graphs in which I can direct an edge to the midpoint of another edge, as in the following figure: So far, what I've tried, (far from ideal, especially with bigger networks) …
TumbiSapichu's user avatar
  • 1,643
7 votes
Accepted

Problem with making torus graph in Graph3D by identifying edge of a square graph

I'd recommend using IGraphM, you can find a thorough documentation here. Within it, there are graphs with periodic boundary conditions for the square/hexagonal cases, and it is fully compatible with …
TumbiSapichu's user avatar
  • 1,643
3 votes
0 answers
285 views

How to select/filter vertices in a graph given some Annotation value?

I recently found out that making custom annotations to a vertex in a graph is quite useful. But, how can we filter the vertex list/set, given the properties in the annotations? Suppose I have some gr …
TumbiSapichu's user avatar
  • 1,643
2 votes
1 answer
299 views

Periodic boundaries for a 3D walk in a Bravais lattice?

I'm using a Bravais lattice, 'face-centered', which is implemented in Mathematica in LatticeData[]. I want to simulate a random walk over neighboring points using periodic boundary conditions, but it …
TumbiSapichu's user avatar
  • 1,643
3 votes
0 answers
184 views

Is it possible to define substitution rules on edges instead of nodes [Wolfram Physics]?

I have a small question about the way substitutions work in the Wolfram Physics project, which might be a general question about how to add edges between nodes and edges. Running a Wolfram Physics mod …
TumbiSapichu's user avatar
  • 1,643
10 votes
4 answers
2k views

How to remove "extra" edges from a multigraph?

I programmatically generate many large undirected graphs. Sometimes these graphs are multigraphs, that is, they contain more than one edge between a pair of nodes. I've tried to delete the "extra" edg …
TumbiSapichu's user avatar
  • 1,643
1 vote

How to implement the directed Barabasi-Albert algorithm in Mathematica?

I'm not sure if I understood the question properly, but I was trying to generate a random graph from the Albert-Barabasi distribution, with directed edges that would differ in the IN and OUT degrees f …
TumbiSapichu's user avatar
  • 1,643
2 votes
1 answer
110 views

How to get a NearestNeighborGraph[] for a given radius with periodic boundaries?

I'm wondering if there's a way to use NearestNeighborGraph with periodic boundaries, using all nearest neighbors within some radius. I am aware of similar custom functions, like this one, but I want t …
TumbiSapichu's user avatar
  • 1,643
6 votes
0 answers
194 views

How to obtain the adjacency matrix of morphological components?

I am wondering if there's a simple way to obtain the adjacency matrix of the morphological components of a segmented image. Consider the following example (originally, from this question): (*Import bi …
TumbiSapichu's user avatar
  • 1,643
4 votes
1 answer
143 views

IGraphM - Correct use of IGPersonalizedPageRank?

I'm using Szabolcs' IGraphM to calculate the personalized Page rank for each node in a graph. I was wondering about the 'reset' parameter, what exactly is it? As I understand, the personalized Page r …
TumbiSapichu's user avatar
  • 1,643
4 votes
2 answers
280 views

How to find the MeshConnectivityGraph[] from a list of independent cell mesh regions?

I'm generating a bunch of points inside a BoundaryMeshRegion. Then I generate the Voronoi mesh of the points, and take the intersection of the Voronoi cells into the region. How could I recover the ad …
TumbiSapichu's user avatar
  • 1,643
3 votes
2 answers
163 views

How to filter-out edges in a HighlightGraph[] visualization based on VertexCoordinates[]?

I need to visualize a graph spatially, and I'm simply using: HighlightGraph[ConnectedGraphComponents[]] and the known coordinates of the graph's nodes. I really like how it looks, but for large gra …
TumbiSapichu's user avatar
  • 1,643
8 votes
2 answers
850 views

How to visualize a spherical mesh on a squared plane?

I need to visualize the points of a spherical mesh on a squared plane (this question is different than this one, I believe). For instance, let us first generate points pts on a unit sphere. (Original …
TumbiSapichu's user avatar
  • 1,643
2 votes
1 answer
106 views

How to get neighbor lists in the same order/orientation from a periodic IGTriangularLattice[...

Using IGraphM, I want to get the VertexComponent[] neighbors around all nodes, in a periodic IGTriangularLattice[] graph. To do that, I do: (*Dimensions of the graph*) i = 5; j = 5; (*Graph and neighb …
TumbiSapichu's user avatar
  • 1,643