Skip to content

fix: correct argument order in fuzzy set union - #15273

Open
Ant19801108 wants to merge 1 commit into
TheAlgorithms:masterfrom
Ant19801108:fix/fuzzy-union-arg-order
Open

fix: correct argument order in fuzzy set union#15273
Ant19801108 wants to merge 1 commit into
TheAlgorithms:masterfrom
Ant19801108:fix/fuzzy-union-arg-order

Conversation

@Ant19801108

Copy link
Copy Markdown

Description

Fixes #11871 — the fuzzy union method passed constructor arguments in the wrong order.

FuzzySet is declared as (name, left_boundary, peak, right_boundary), but union called FuzzySet(name, min_left, max_right, avg_peak), so peak and right_boundary were swapped. This swaps the last two arguments and corrects both doctests.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • python -m doctest fuzzy_logic/fuzzy_operations.py passes (22 doctests, 0 failures).

FuzzySet is declared as (name, left_boundary, peak, right_boundary), but union passed (name, min_left, max_right, avg_peak), so peak and right_boundary were swapped. Swap the last two arguments and update both doctests.

Fixes TheAlgorithms#11871

Signed-off-by: Ant19801108 <Ant19801108@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect union method implementation in fuzzy operations

1 participant