Skip to content

Conversation

@torfjelde
Copy link
Contributor

Currenty we have

julia> LogDensityProblems.LogDensityOrder{0}() < LogDensityProblems.LogDensityOrder{0}()
true

which seems incorrect, no?

With this PR:

julia> LogDensityProblems.LogDensityOrder{0}() < LogDensityProblems.LogDensityOrder{0}()
false

@devmotion
Copy link
Collaborator

Yes, this is a bug. From the docs of isless:

if it is defined, it is expected to satisfy the following:

- If isless(x, y) is defined, then so is isless(y, x) and isequal(x, y), and exactly one of those three yields true.
- The relation defined by isless is transitive, i.e., isless(x, y) && isless(y, z) implies isless(x, z).

Copy link
Collaborator

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@devmotion devmotion merged commit 6d3d679 into tpapp:master Dec 28, 2022
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.

2 participants