We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue migrated from trac ticket # 3148
component: Encodings.IntegerVectorEncoding | priority: medium
If the bounds for an UniformOnePositionManipulator limits the value range to a single, admissible value, an Exception is thrown. This is caused in lines 94-95 in UniformOnePositionManipulator.cs, that were introduced in r8790: max = FloorFeasible(min, max, step, max - 1); vector[index] = RoundFeasible(min, max, step, random.Next(min, max)); For instance, the bounds [0, 1[ allowing only allow 0 as value, causes min and max to be 0, causing an exception when calling random.Next(min, max). I guess, the min == max check in line 88 could be used after adapting the upper bound.
If the bounds for an UniformOnePositionManipulator limits the value range to a single, admissible value, an Exception is thrown.
UniformOnePositionManipulator
This is caused in lines 94-95 in UniformOnePositionManipulator.cs, that were introduced in r8790:
UniformOnePositionManipulator.cs
max = FloorFeasible(min, max, step, max - 1); vector[index] = RoundFeasible(min, max, step, random.Next(min, max));
For instance, the bounds [0, 1[ allowing only allow 0 as value, causes min and max to be 0, causing an exception when calling random.Next(min, max).
[0, 1[
min
max
random.Next(min, max)
I guess, the min == max check in line 88 could be used after adapting the upper bound.
min == max
The text was updated successfully, but these errors were encountered:
abeham
No branches or pull requests
Issue migrated from trac ticket # 3148
component: Encodings.IntegerVectorEncoding | priority: medium
2022-03-10 13:45:20: @NimZwei created the issue
The text was updated successfully, but these errors were encountered: