Questions tagged [graph]
a mathematical structure that contains a collection of vertices or 'nodes' and a collection of edges that connect pairs of vertices
198 questions
2votes
1answer
221views
Is there a multidimensional topological sort of a directed acyclic graph?
In my application, I perform a topological sort of nodes where an integer represents a node's ID using DFS and white/gray/black coloring. See https://yuminlee2.medium.com/topological-sort-cf9f8e43af6a ...
1vote
3answers
259views
Get call graph / path of C with function pointer
I have a C codebase with function calls made through function pointers. I tried using LLVM AST and IR with Python to generate a function call graph, but handling the function pointer calls requires ...
1vote
1answer
144views
Tree impurity of a call graph
In his "Software Engineering. Principles and Practice," H. van Vliet mentions "tree impurity of a call graph." However, the term tree impurity is not used in this meaning anywhere ...
1vote
2answers
213views
How do I solve this graphing dependency cycle in an AST?
I'm playing around with AST generation and exploring how it relates to a directed acyclic graph. I hit a logical snag that I don't understand. var literal = 3; // expression 1 literal = literal+1; // ...
1vote
2answers
145views
Culling edges from a triangulation while maintaining a connected graph?
I'm working on a small project and I'm randomly generating "world maps", with nodes you can fast travel to along given routes. The basics of this aren't complicated; throw random points on a ...
0votes
2answers
297views
Build an API for a graph app with + 30 millions data points
I am quite new to design software and especially graphs. So I am working on a full-stack app with a back-end built on FastAPI (python) et front-end on React. I need to create 4 graphs on a single page ...
1vote
3answers
216views
Graph layout positioning
Given a graph layout like the following image, where the layers/rows (y coordinate) and ordering of nodes within each layer have already been computed, what algorithm can I use to make it look "...
1vote
1answer
256views
Database design for graph where nodes can be other graphs
How should I design a relational schema to store graph documents that can contain plain nodes (shapes, in the example below) as well as nodes that can reference other graph documents? To visually ...
1vote
1answer
115views
Some questions about shortest-path algorithms
I'm trying to understand why anyone would prefer Floyd-Warshal over Dijkstra: Dijkstra gives a correct result, using an understandable system, combined with backtracking. Floyd-Warshal makes an ...
1vote
2answers
182views
Dependency resolution of tasks which have crontab information
I want to illustrate my problem statement with a use case. I am building a trading system that acts as a container for deploying trading strategies. The trading strategy comprises dependent tasks. Let'...
1vote
1answer
430views
What is the best way to program a lattice graph?
What is the best way to program a graph like this: I know I could use Adjacency list or Adjacency matrix: //https://stackoverflow.com/questions/5493474/graph-implementation-c //Clearer's answer ...
0votes
2answers
478views
Data structure for graphs and vectors in C
I'd like to design an implementation for graphs in C. I'm wondering what the most efficient approach in terms of both computational power and memory consumption would be. I've looked at various open-...
10votes
5answers
3kviews
Pros and cons of representing routes as legs or stops?
What are some pros and cons of representing routes as legs or as stops? A leg is a departure and arrival location, a departure time and a duration (or an arrival time and a duration). A stop is an ...
1vote
3answers
401views
Possible trajectories with time travel
I'm trying to calculate a trajectory in the presence of time travel. In the following picture, there is a character traveling toward the right in a straight line (like a billiard ball). If the ...
0votes
1answer
525views
How can I represent a graph for a visual programming language in JSON?
I am in the process of implementing a visual programming language similar to Blender's node editor or Unreal Engine Blueprints. It will be implemented as a SPA that will communicate with a JSON based ...