Commit Graph
76 Commits
Author SHA1 Message Date
warrence 90a2bd9e9e Add GraphTopologyConversion tests related to addition and deletion 2026-10-15 10:01:54 +02:00
warrence 653cd39279 Fix doc links 2026-10-13 21:38:44 +02:00
warrence 3d1e8246a8 Fix clippy findings and related issues 2026-10-13 21:25:50 +02:00
warrence b124e58b38 Change GraphTopologyConversion::convert return value to include the new GraphIsomorphism
This allows to convert maps for the converted graph.
2026-10-12 21:33:49 +02:00
warrence 3d7dda6f7b Refactor ElementMap, removing its copy-on-write feature 2026-10-11 22:24:00 +02:00
warrence c8855daddf Renamed FromGraph to GraphTopologyConversion to align with existing traits and separate from From trait 2026-09-29 23:16:57 +02:00
warrence 8bf196d1ad Fix code format 2026-09-28 23:59:30 +02:00
warrence 3478274959 Add From and FromGraph implementations for Graph and AppendGraph 2026-09-28 23:58:30 +02:00
warrence a9190f88db Add From and FromGraph tests for FrozenGraph and for GraphTopologyAddition
The new tests are analogous to the existing Clone tests. Currently, only FrozenGraph implements From and FromGraph, but not GraphTopologyAddition, so the tests relying on GraphTopologyAddition are currently unused.
2026-09-25 08:41:10 +02:00
warrence 64c48287a7 Fix ElementMap capacity in FrozenGraph::edge_map 2026-09-19 18:07:33 +02:00
warrence 038e984c97 Add FromGraph trait, and add implementation for FrozenGraph 2026-09-19 17:53:44 +02:00
warrence e593298eba Add Clone to graph models, and tests 2026-09-19 17:19:47 +02:00
warrence 4c6a8a43e4 Refactor tests: use MakeTestGraph in model-specific tests, deconstruct vertex arrays where useful, adjust local variable names 2026-09-04 09:28:00 +02:00
warrence 016d127bd1 Update comment for pub, hidden Graph structs 2026-09-04 08:16:09 +02:00
warrence 8c3c6abc78 Updated todos 2026-09-03 20:40:43 +02:00
warrence 3ad448974e Add new assert helper function for GraphTopologyDeletion tests 2026-09-03 20:40:15 +02:00
warrence 1209d75e15 Use non-zero edge indices to reduce size of structs with Option fields 2026-09-03 20:28:41 +02:00
warrence c25a8a4fc1 Add FrozenGraph tests 2026-09-03 19:49:45 +02:00
warrence 95601a7a5a Add todos 2026-08-29 22:39:45 +02:00
warrence 7fbd5eed9d Refactor graph creation in all tests into new internal MakeTestGraph trait
This large refactor allows future re-use of the existing tests for `FrozenGraph`, which does not implement `GraphTopologyAddition`, but instead has to convert from a different graph which does.

- Fix tests for `GraphTopologyDeletion` hard-coding Graph instead of using the trait.
- Fix some tests silently depending on macro call site uses.
- Change `GraphTopologyAddition` tests to use `Default::default` instead of `new`.
- Add new tests for `GraphTopology::vertex_map` and `edge_map` that also depend on `GraphTopologyAddition`, removing these dependencies from the existing tests.
- Add new test macro `graph_topology_addition_deletion_tests` for tests that need deletion and addition.
2026-08-29 22:38:27 +02:00
warrence a89086253a Add FrozenGraph (without tests) 2026-08-17 10:25:52 +02:00
warrence 5085b7795b Remove local vars in AppendGraph::incident_vertices and construct result directly 2026-08-17 10:20:53 +02:00
warrence cd1d2cddee Move related tests into new testing macro for GraphTopologyAddition 2026-08-17 10:19:22 +02:00
warrence b4374174a9 Add reserve_vertices and reserve_edges to GraphTopologyAddition 2026-08-07 19:01:03 +02:00
warrence 59d9c2b8a7 Add ElementMap::reserve to replace ElementMap::expand, update tests
ElementMap tests are now self contained unit tests, without any graph context. The only exception is the repurposed test "reused_slot_returns_old_value", which is not suited for GraphTopologyDeletion, but actually specific for Graph.
2026-08-06 23:06:52 +02:00
warrence a7346bd782 Rename EntityMap to ElementMap (tests not yet updated) 2026-08-06 23:01:10 +02:00
warrence 10d0c382cc Add GraphTopologyAddition trait from GraphTopology
Move capacity and add methods from GraphTopology trait to new GraphTopologyAddition trait
2026-08-06 14:17:21 +02:00
warrence 2851cf60fd Add Incidence struct for GraphTopology to use 2026-08-06 09:57:51 +02:00
warrence 110e6310aa Use PriorityQueue for Dijkstra's, requires Hash for Vertex 2026-08-06 09:44:28 +02:00
warrence 0169343ac8 Merge branch 'main' into release-0.3.0 2026-07-31 10:16:03 +02:00
warrence dd4e959554 Merge branch 'docs' into release-0.2.4 2026-07-31 08:44:10 +02:00
warrence b5cc3b1c3f Add documentation for Graph 2026-07-24 20:55:41 +02:00
warrence 21e79c660f Update documentation for AppendGraph 2026-07-24 20:55:01 +02:00
warrence 399b36bb16 Add documentation for Graph and AppendGraph EntityMap types 2026-07-24 10:13:15 +02:00
warrence 9f76ce4ce3 Fix vertex_capacity and edge_capacity in AppendGraph
Fix AppendGraph::vertex_capacity and AppendGraph::edge_capacity to use the actual capacity of the underlying Vecs.
2026-07-24 10:09:37 +02:00
warrence d9dc102993 Add documentation for models::append_graph module 2026-07-24 10:06:43 +02:00
warrence d711e68577 Replace VertexMap and EdgeMap with now public EntityMap 2026-07-22 13:30:09 +02:00
warrence 3fa4b66981 Fix IncidenceCursor for AppendGraph and Graph, and add tests 2026-07-17 22:06:28 +02:00
warrence 913a9e0baa Fix AppendGraph::capacity to actually use the underlying vec's capacity 2026-07-17 09:54:16 +02:00
warrence 1446103d34 Add concrete type aliases of VertexMap and EdgeMap for Graph and AppendGraph 2026-07-06 18:49:02 +02:00
warrence 266dee783b Rename append_graph::Incidence to Edge to unify public naming 2026-07-06 17:52:42 +02:00
warrence e3a24894f6 Changed graph::Vertex and graph::Edge to be public to simplify Graph usage 2026-07-06 17:51:15 +02:00
warrence f009a86f1e Add GraphTopology.incidence_cursor() for certain use-cases where the iterator is problematic
Also add raw_incidences() and step_incidence() to AppendGraph analogously to
Graph, which allows to remove RawIncidenceIterator and simplify its call sites.
2026-06-26 23:36:41 +02:00
warrence e479074151 Remove todo, proposed change would not affect callers 2026-05-13 12:18:27 +02:00
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 340fde2133 Add Graph::raw_incidences() iterator as a wrapper for step_incidence() 2026-05-13 10:32:37 +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