Skip to contents

Terse summary of the object returned by ExactMaxSum() ("MaxSumSelection"), reporting the achieved total pairwise distance (the max-sum objective) rather than the minimum distance of ExactMaxMin().

Usage

# S3 method for class 'MaxSumSelection'
format(x, ...)

# S3 method for class 'MaxSumSelection'
print(x, ...)

Arguments

x

A "MaxSumSelection" object.

...

Ignored; present for S3 compatibility.

Value

format.MaxSumSelection() returns a one-line character summary; print.MaxSumSelection() returns x invisibly, called for its side-effect.

Examples

set.seed(1)
# Package 'highs' is required for ExactMaxSum()
if (requireNamespace("highs", quietly = TRUE)) {
  ExactMaxSum(3L, dist(matrix(rnorm(20), ncol = 2)))
}
#> 3 elements (1 3 4) by exact MILP, proven optimal, total distance = 9.388