Commit Graph

86 Commits

Author SHA1 Message Date
warrence aaa1b34db3 Add todo that was accidentally removed 2026-05-13 12:16:10 +02:00
warrence f862ac55ec Add GraphTopology::incident_edges() and tests 2026-05-13 10:59:38 +02:00
warrence 384dca2d20 Fix inconsistent local var name in test function 2026-05-13 10:58:47 +02:00
warrence 340fde2133 Add Graph::raw_incidences() iterator as a wrapper for step_incidence() 2026-05-13 10:32:37 +02:00
warrence 6191def324 Fix format 2026-05-13 10:30:36 +02:00
warrence ff148532ab Move maps tests to integration tests 2026-05-12 18:32:45 +02:00
warrence f1d5ccafd2 Add len() for VertexMap and EdgeMap 2026-05-12 18:26:52 +02:00
warrence be63527478 Add incident vertices to edges return value in make_test_graph() fixture 2026-05-12 13:55:04 +02:00
warrence ac688b4fc0 Extracted some assert code for GraphTopology::incidences into new fn 2026-05-12 13:39:13 +02:00
warrence f45fc98afc Add GraphTopology::incident_vertices and tests 2026-05-12 13:37:27 +02:00
warrence 85e25ef0ca Refactor Graph iterator structs into private method used with std::iter::from_fn() 2026-05-08 20:48:43 +02:00
warrence 2eb054eb0c Refactor AppendGraph iterators into one RawIncidenceIterator 2026-05-08 20:40:20 +02:00
warrence 0f5f0d67d2 Update Dijkstra's to use incidences instead of neighbors, and with it custom edge weights 2026-05-08 13:16:23 +02:00
warrence 0bcd270d12 Add GraphTopology::incidences(), update and add related tests 2026-05-08 13:12:23 +02:00
warrence d3fcd690a5 Remove deprecated From<Vertex> for usize implementation 2026-05-08 12:57:16 +02:00
warrence 4e47573290 Renamed the private graph iterators to attune for upcoming changes 2026-05-07 18:01:16 +02:00
warrence a7be995e34 Change "neighbor" terminology to "adjacent vertex" throughout the code 2026-05-07 17:34:20 +02:00
warrence 726e7691ea Add weight parameter for Dijkstra's algorithm, add unweighted variants (unused) 2026-05-07 17:15:34 +02:00
warrence 6fe3acb306 Add EdgeMap and private generic EntityMap, update tests 2026-05-07 16:03:17 +02:00
warrence e074fdf944 Move edge_count() in method order 2026-05-07 11:38:15 +02:00
warrence 016cece626 Update VertexMap tests to validate both graph models 2026-05-07 00:12:06 +02:00
warrence 7f91743b02 Add VertexMap tests for Graph (vertex deletion) 2026-05-06 23:37:48 +02:00
warrence 166b91cdd2 Update Dijkstra's algorithm to use VertexMap 2026-05-06 20:28:53 +02:00
warrence f40c03b113 Add VertexMap to attach data to vertices 2026-05-06 20:28:00 +02:00
warrence 6e9867a65e Add GraphTopology::edges() and tests 2026-05-05 22:54:33 +02:00
warrence c589095737 Add test for GraphTopology::vertices() after delete 2026-05-05 22:52:07 +02:00
warrence 18245b9955 Add Copy and Eq traits to GraphTopology::Edge 2026-05-05 22:37:32 +02:00
warrence feaca335b1 Add loops and multi-edges to the test graph, fix neighbors() test 2026-05-05 19:21:48 +02:00
warrence 8324f93ebd Add graph topology test helper macros to deduplicate test code 2026-04-30 17:41:53 +02:00
warrence 09c5850ff3 Add Graph::delete_vertex() implementation 2026-04-29 20:50:19 +02:00
warrence b3dc0ea666 Add test for Graph vertex deletion with loop 2026-04-29 20:49:34 +02:00
warrence 5b0d6ca1ad Fix Graph::delete_edge() for paired index with loops
- Add new tests for this case
- Fix double list traversal for loop deletions
- Rename Graph::delete_incidence() to update_incidence_list(), and its arguments and local vars
2026-04-29 18:24:10 +02:00
warrence 2793f8af8a Add Graph::delete_edge() implementation 2026-04-28 17:39:32 +02:00
warrence ceedea6a0f Fix formatting 2026-04-28 17:38:41 +02:00
warrence 8e0b3325f5 Update and adds tests for Graph edge deletion 2026-04-28 17:36:38 +02:00
warrence f075501828 Add comments for AppendGraph and Graph add_incidence() 2026-04-28 17:35:00 +02:00
warrence 0ae4d486cb Add and update todos 2026-04-28 17:29:54 +02:00
warrence a8168b35e4 Add unit tests for GraphTopologyDeletion for Graph 2026-04-23 22:50:11 +02:00
warrence 0a30307a0d Update todos 2026-04-23 22:49:12 +02:00
warrence 37a911dce0 Change GraphTopology implementation for Graph with generational arena 2026-04-23 18:25:23 +02:00
warrence 67e16f50cd Fix same issues in Graph draft as well 2026-04-23 18:23:54 +02:00
warrence 02cd1a0dea Fix several minor issues in AppendGraph::are_adjacent(), unit tests, and formatting 2026-04-23 18:18:36 +02:00
warrence 6180786e33 Fix AppendGraph unit tests 2026-04-23 18:13:10 +02:00
warrence eabde7d635 Add Default implementation for AppendGraph 2026-04-23 18:10:43 +02:00
warrence b54800c1be Add new GraphTopologyDeletion trait for Graph to implement 2026-04-22 16:33:33 +02:00
warrence 8126352c9b Add Graph as a straight copy of AppendGraph 2026-04-22 16:33:05 +02:00
warrence d0cbebcae0 Fix formatting 2026-04-22 16:32:17 +02:00
warrence ee26b7a3e0 Move AppendGraph to its own module 2026-04-22 16:31:17 +02:00
warrence a939f9b889 Add Dijkstra variant without returning predecessors 2026-04-22 15:50:45 +02:00
warrence a250bde626 Add DijkstraResult return type instead of unnamed tuple 2026-04-22 14:49:07 +02:00