Skip to content

bugfixes BigDecimalGene.setValueWithDecimal() and MapGene.randomize() / enhancing GeneSamplerForTest#1478

Merged
arcuri82 merged 13 commits intomasterfrom
fix-GeneRandomizedTest
Mar 20, 2026
Merged

bugfixes BigDecimalGene.setValueWithDecimal() and MapGene.randomize() / enhancing GeneSamplerForTest#1478
arcuri82 merged 13 commits intomasterfrom
fix-GeneRandomizedTest

Conversation

@jgaleotti
Copy link
Copy Markdown
Collaborator

No description provided.

@jgaleotti jgaleotti requested a review from arcuri82 March 19, 2026 13:07
if (nextValue < getMinimum()) {
nextValue = getMinimum()
}
value = nextValue
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

i don't think we should go this, as we don't for the other genes. if one sets a value directly, we shouldn't silently modify it if it does not satisfy local constraints. usually, values are modified by the gene itself (eg mutation and randomization), which knows its own constraints.
why was this change made?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I discuss this issue in another branch

@jgaleotti jgaleotti requested a review from arcuri82 March 20, 2026 11:18
@arcuri82 arcuri82 merged commit 7cdd834 into master Mar 20, 2026
13 checks passed
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