Skip to content

Commit

Permalink
Fixed the conversion of a numerical value to Boolean semiring
Browse files Browse the repository at this point in the history
  • Loading branch information
MasWag committed Aug 5, 2023
1 parent 35884e7 commit 2448b03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/weighted_graph.hh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ std::size_t hash_value(MaxMinSemiring<Base> const& v) {
class BooleanSemiring {
public:
bool data;
BooleanSemiring (double value): data(value > 0) {}
BooleanSemiring (bool data = false): data(data) {}
BooleanSemiring operator+(const BooleanSemiring& x) const {
return BooleanSemiring{ data || x.data };
Expand Down

0 comments on commit 2448b03

Please sign in to comment.