Skip to content

Commit

Permalink
Fixed bug in method addEdge, class WeightedDirectedGraph.
Browse files Browse the repository at this point in the history
  • Loading branch information
simphotonics committed Oct 31, 2024
1 parent 8a10d33 commit 547c381
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.4.5
- Fixed bug where cache was updated after calling the method `addEdge` on an instance of type
`WeightedDirectedGraph`.
- Updated dependencies.

## 0.4.4
- Updated benchmark_runner version and benchmark report.

Expand Down
1 change: 1 addition & 0 deletions lib/src/graphs/weighted_directed_graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class WeightedDirectedGraph<T extends Object, W extends Comparable>
}
// Add any new vertices to the graph:
_edges[connectedVertex] ??= <T, W>{};
updateCache();
}

/// Removes edges pointing from `vertex` to `connectedVertices`.
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: directed_graph
description: Generic directed graph and weighted directed graph with algorithms
enabling sorting and topological ordering of vertices.

version: 0.4.4
version: 0.4.5

homepage: https://github.com/simphotonics/directed_graph

Expand All @@ -17,12 +17,12 @@ environment:
sdk: '^3.0.0'

dependencies:
collection: ^1.18.0
collection: ^1.19.1
exception_templates: ^0.3.1
lazy_memo: ^0.2.3
quote_buffer: ^0.2.6

dev_dependencies:
benchmark_runner: ^0.1.4
lints: ^3.0.0
test: ^1.25.3
benchmark_runner: ^1.0.0
lints: ^5.0.0
test: ^1.25.8
2 changes: 1 addition & 1 deletion tool/actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ echo
echo -e "${GREEN}=== Running Benchmark $PWD...${RESET}"
echo

dart run benchmark_runner
dart run benchmark_runner report

0 comments on commit 547c381

Please sign in to comment.