Class WeightProfiles
java.lang.Object
com.eqixiac.equinix.design.solve.WeightProfiles
Named starting points for objective weights. A profile is data, not code: it is only a map from
objective id to relative weight, and a spec can override any entry or weight a plug-in objective
that no profile mentions.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionnames()resolve(DesignObjectives objectives) Turns a spec's objectives into weights that sum to 1: the named profile (or "balanced" when the spec names none and lists no weights), overlaid with the spec's explicit weights.
-
Field Details
-
DEFAULT
The profile used when a spec names none and gives no weights.- See Also:
-
-
Method Details
-
names
-
of
- Parameters:
name- a profile name, case-insensitive- Returns:
- its weights by objective id
- Throws:
IllegalArgumentException- when no profile has that name; the message lists the names
-
resolve
Turns a spec's objectives into weights that sum to 1: the named profile (or "balanced" when the spec names none and lists no weights), overlaid with the spec's explicit weights. When the spec lists weights but names no profile, only the listed objectives are weighted.- Parameters:
objectives- the spec's objectives;nullmeans the default profile- Returns:
- weight per objective id, summing to 1, in a stable order; entries may be 0
- Throws:
IllegalArgumentException- for an unknown profile, a negative or non-finite weight, or weights that are all zero
-