Changelog
Source:NEWS.md
MaxMin 0.0.0.9003 (development)
-
KCentre()/ExactKCentre()solve the k-centre problem.
MaxMin 0.0.0.9002 (development)
Improvements
The solver results now print legibly.
FarFirst(),DropAdd()andGrasp()return a"MaxMinSelection"object andExactMaxMin()a"MaxMinExact"object, each with aprint()/format()method giving a one-line summary (size, selected indices, algorithm and – for aFarFirst()ensemble – the winning strategy, plus the achievedT_k). Asummary()method adds a multi-line report: the per-strategyT_ktable for aFarFirst()ensemble, the secondary objective and search effort forDropAdd()/Grasp(), and the instance, objective and proof status forExactMaxMin(). The objects are otherwise unchanged: aMaxMinSelectionis still the integer index vector (it indexes a matrix or coordinate set directly), and aMaxMinExactis still the list with$indices,$objective, ….FarFirst()gains annSeedsargument: a distinct-seed random restart that draws random pivots, collects each one’s furthest-point seed de-duplicated untilnSeedsdistinct seeds are found (or the reachable pool is exhausted), runs Gonzalez from each and returns the bestT_k. It is the “give a count, not a list” counterpart topivots– never wasting a Gonzalez pass on a duplicate seed – and overridesmethod/pivotswhen supplied. Reproducible underset.seed(); unsupported on the distance-column oracle path.ExactMaxMin()is substantially faster and scales to larger instances.DropAdd()now documents thatmaxSecondsis checked every 256 iterations and may overshoot by up to one iteration’s worth of computation on large instances.FarFirst()documents that asymmetric distance matrices are accepted.Ensemble functions now attach a
score = NA_real_attribute on the trivial all-points early return (whenm >= N).Integer iteration counters in the C++ kernels changed from
inttolong longto avoid signed-integer overflow upper bound at extrememaxItervalues.Test suite: improved coverage of path relinking (strict improvement), DropAdd
secondaryattribute formula,ExactMaxMinbudget-expiry branch, and various weak / vacuous assertions tightened.
MaxMin 0.0.0.9001 (development)
Bug fixes
-
Grasp()no longer crashes at the documentedalpha = 1(pure greedy). -
Grasp()now validatesalpha, rejecting values outside[0, 1]. -
FarFirst(),DropAdd(),Grasp()andMinDist()now reject a distance matrix containingNA/NaN/Infinstead of silently returning a selection with a repeated index; the distance-column oracle path ofFarFirst()likewise rejects a non-selfNA/NaN. -
MinDist()now errors onNAor duplicate indices inidx(previously a matrix-pathNAreturnedNAsilently and duplicates scored 0). - Added defensive guards to the exported C++ kernels reachable via
:::(MaximinFrom_cpp,MaximinFromPoints_cpp,DropAdd_points_cpp).
Breaking API changes
-
FarFirst(): the subset-size argument is renamedn->m, matching the other solvers; and theseedargument is renamedmethod(matchingPickPoint(method =)), since it selects a seeding strategy, not an RNG seed. -
DropAdd()andGrasp(): theseedargument is removed.DropAdd()’s was a documented no-op (the search is RNG-free); for a reproducibleGrasp()run, callset.seed()beforeGrasp(). -
FarFirst()now attaches the achieved objective (T_k) as ascoreattribute on both bare and ensemble returns, matchingDropAdd()andGrasp()(previously this value was discarded on a bare pass). - Index-order conventions are now documented:
FarFirst()returns farthest-first (greedy) order;DropAdd(),Grasp()andExactMaxMin()$indicesreturn ascending indices.ExactMaxMin()continues to return a list (the deliberate exception), now documented as such.
MaxMin 0.0.0.9000 (development)
- Initial release: a tiered toolbox for the Max-Min Diversity Problem (MMDP / discrete p-dispersion), extracted from the
FurthestPointstudy package so that it can be depended on by CRAN packages (e.g.TreeSearch). -
FarFirst(): deterministic farthest-first selection from a distance matrix, Euclidean coordinates (points =), or an on-demand distance-column oracle (pass a column function asd, withN =) for spaces with no coordinate embedding; the oracle may report the self-distance (lengthN) or omit it (lengthN - 1), whichever is simpler to compute. The defaultseedruns a best-of-three ensemble of"random_furthest"starts (whose pivots are drawn with the session RNG; set a seed for a reproducible selection, or supply them via thepivotsargument) and keeps the best byMinDist(). The deterministic O(N) anchors ("anti_centroid","peripheral") and the costlier O(N²) anchors ("diameter","anti_medoid","medoid","rowsum","rownorm") are available as opt-in strategies. -
DropAdd(): DropAdd tabu search (Porumbel et al. 2011); accepts adistobject, distance matrix, or coordinate matrix (points =). -
ExactMaxMin(): exact node-packing optimum (Sayyady & Fathi 2016) via thehighsMILP backend. -
Grasp(): GRASP with path relinking (Resende et al. 2010), a dense-matrix-only refinement metaheuristic that attains the highestT_kof the package’s methods on small to medium instances. -
MinDist(): the k-centre objective (minimum pairwise distance). -
PickPoint(): exposes the peripheral seed indices directly.