Commit Graph

57 Commits

Author SHA1 Message Date
Robert Machmer
1ad54dd376 Improve function to create a new graph based on data
The random function is now seeded properly and uses the x, y, w, and h
parameters passed to the function to determine in what range to randomly
place the nodes.
2015-12-22 02:52:16 +01:00
Robert Machmer
fd957a3881 Use a constant mass for nodes
This eventually should be made customizable.
2015-12-21 13:27:27 +01:00
Robert Machmer
54a7a295ec Throw error when node ID is already taken 2015-12-21 13:01:35 +01:00
Robert Machmer
e4d34d4281 Add functions to remove a node from the graph
When a node is removed, all edges to and from it will be deleted as
well.
2015-12-21 12:42:52 +01:00
Robert Machmer
89b6c16974 Throw error if added edges are invalid
This is the case if both the origin and the target of the edge point to
the same node or if an edge already exists between two nodes.
2015-12-21 12:36:46 +01:00
Robert Machmer
805278d67a Add first working draft of the force directed graph 2015-12-21 12:13:36 +01:00
Robert Machmer
ff55890510 Initial commit 2015-12-20 11:34:43 +01:00