Repository navigation
Documentation (roxygen2):
- Added @title, @description, @PARAM, @return to undocumented exported functions: rmoo_lrSelection, rmoo_uxCrossover, rmoo_huxCrossover, rmoo_uxMutation, rmoo_spCrossover
- Replaced standalone @title on rmoo_spCrossover with umbrella @name/@Rdname rmoo_Crossover page, migrating hand-written rmoo_Crossover.Rd to roxygen
- Added @Rdname rmoo_Crossover to rmooreal_sbxCrossover and rmooperm_oxCrossover
- Added @Rdname to all typed aliases: rmoobin/real/int_spCrossover, rmoobin/int_uxCrossover, rmoobin/int_huxCrossover, rmoobin/int_uxMutation, rmoobin/perm/real_lrSelection, rmooint_spCrossover
- Fixed @Rdname rmoo_population (lowercase) to rmoo_Population (capital P) across all four population functions to match existing cross-references
- Replaced broken @examples (obj not found) with \dontrun{} using nsga2()
- Fixed lost-braces LaTeX warning: {0,1} → {0, 1} in description
- Removed never-called normalize_range() helper (dead code)
Bug fixes (crossover fitness matrix dimensions):
- Fixed 6 crossover functions creating 1×nObj fitness matrix instead of 2×nObj: rmooreal_sbxCrossover, rmoo_uxCrossover, rmoo_huxCrossover, rmoo_tpCrossover, pointCrossover, rmoo_spCrossover (else branch)
- Fixed rmooperm_oxCrossover returning rep(NA, 2) vector instead of matrix
Code optimizations:
- Replaced do.call(cbind, replicate(...)) with matrix() in associate_to_niches
- Replaced vapply + which.min loops with vectorised max.col()
- Added pmax(..., 0) guard before sqrt to prevent NaN from floating-point error
- Removed dead apply(dist_matrix, 1, min) call overwritten two lines below
- Replaced (n*m)×p intermediate matrix in calc_norm_pref_distance with Reduce(+, lapply(..., outer)) to reduce peak memory from O(n·m·p) to O(n·m)
- Replaced which(!(x %in% y)) with setdiff() in crowding distance loop
- Fixed nadir_point computed from updated ideal_point instead of original fitness in "ever" normalization branch
Tests:
- Added 3 missing regression tests: rmoo_tpCrossover, pointCrossover, rmooperm_oxCrossover fitness matrix dimensions