https://github.com/pmiddend/star-highways
https://github.com/pmiddend/star-highways
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/pmiddend/star-highways
- Owner: pmiddend
- Created: 2020-03-18T09:55:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-18T09:56:13.000Z (about 6 years ago)
- Last Synced: 2025-03-15T00:51:36.784Z (about 1 year ago)
- Language: Java
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.org
Awesome Lists containing this project
README
* Star Highways
** Implementation notes
- The exercises are all implemented in =UniverseTest=, so that’s a good starting point to look at the code.
- I’m using the the [[https://jgrapht.org/][JGraphT]] library because it provides me with all the “usual” graph algorithms like shortest paths. Although I’m not using many of them, should the need arise in the future, we’ve got them at our disposal.
- The available star systems are “fixed” as an enum, but the “universe” isn’t hard-coded. There’s a factory function for the universe from the task description, see =Universe.createUniverse=.
- There is a function to enumerate paths in a graph in a “dumb” way (=Universe.allRoutes=). A production-quality implementation should be a little more optimized and work for bigger graphs (pruning earlier, for example). This is a tradeoff I made for this exercise.
** The Graph
[[./graph.png]]