Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

Changes:
* Restrict unordered bound hyperrectangle conditions within min/max during covering ([#215](https://github.com/xcsf-dev/xcsf/pull/215))

## Version 1.4.9 (Sep 11, 2025)

Changes:
Expand Down
4 changes: 3 additions & 1 deletion xcsf/cond_rectangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @file cond_rectangle.c
* @author Richard Preen <rpreen@gmail.com>
* @copyright The Authors.
* @date 2019--2023.
* @date 2019--2025.
* @brief Hyperrectangle condition functions.
*/

Expand Down Expand Up @@ -120,6 +120,8 @@ cond_rectangle_cover(const struct XCSF *xcsf, const struct Cl *c,
const double r2 = rand_uniform(xcsf->cond->spread_min, spread_max);
cond->b1[i] = x[i] - (r1 * 0.5);
cond->b2[i] = x[i] + (r2 * 0.5);
cond->b1[i] = clamp(cond->b1[i], xcsf->cond->min, xcsf->cond->max);
cond->b2[i] = clamp(cond->b2[i], xcsf->cond->min, xcsf->cond->max);
}
}
}
Expand Down
Loading