public class VectorAngleDistanceScalingComparator extends java.lang.Object implements AggregateObjectiveComparator
References:
Constructor and Description |
---|
VectorAngleDistanceScalingComparator(double[] weights)
Constructs a new instance of the vector angle distance scaling aggregate
function with the given weights.
|
VectorAngleDistanceScalingComparator(double[] weights,
double q)
Constructs a new instance of the vector angle distance scaling aggregate
function with the given weights.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateFitness(Solution solution)
Calculates the aggregate (fitness) value of the solution using this aggregate function.
|
static double |
calculateFitness(Solution solution,
double[] weights,
double q)
Computes the vector angle distance scaling aggregate fitness of the
solution.
|
int |
compare(Solution solution1,
Solution solution2)
Compares the two solutions using a dominance relation, returning
-1 if solution1 dominates solution2 , 1 if
solution2 dominates solution1 , and 0 if the
solutions are non-dominated. |
double |
getAngleScalingFactor()
Returns the factor for scaling the effects of the angle.
|
double[] |
getWeights()
Returns the weights used by this aggregate function.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromConfiguration, toConfiguration
public VectorAngleDistanceScalingComparator(double[] weights)
weights
- the weight vector; must have a magnitude of 1.0public VectorAngleDistanceScalingComparator(double[] weights, double q)
weights
- the weight vector; must have a magnitude of 1.0q
- factor for scaling the effects of the anglepublic double getAngleScalingFactor()
public double[] getWeights()
AggregateObjectiveComparator
getWeights
in interface AggregateObjectiveComparator
public int compare(Solution solution1, Solution solution2)
DominanceComparator
-1
if solution1
dominates solution2
, 1
if
solution2
dominates solution1
, and 0
if the
solutions are non-dominated.compare
in interface java.util.Comparator<Solution>
compare
in interface DominanceComparator
solution1
- the first solutionsolution2
- the second solution-1
if solution1
dominates solution2
,
1
if solution2
dominates solution1
, and
0
if the solutions are non-dominatedpublic double calculateFitness(Solution solution)
AggregateObjectiveComparator
calculateFitness
in interface AggregateObjectiveComparator
solution
- the solutionpublic static double calculateFitness(Solution solution, double[] weights, double q)
solution
- the solutionweights
- the weight vectorq
- factor for scaling the effects of the angleCopyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.