|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opt4j.core.Objectives
public class Objectives
The Objectives contains the Objective-Values pairs of
an Individual.
Value,
Objective| Field Summary | |
|---|---|
protected double[] |
array
|
protected java.util.SortedMap<Objective,Value<?>> |
map
|
| Constructor Summary | |
|---|---|
Objectives()
|
|
| Method Summary | |
|---|---|
void |
add(Objective objective,
double value)
Adds the objective with the specified double value. |
void |
add(Objective objective,
int value)
Adds the objective with the specified integer value. |
void |
add(Objective objective,
Value<?> value)
Adds the objective with the specified value. |
void |
add(java.lang.String name,
Objective.Sign sign,
double value)
Adds the objective with the specified value. |
void |
add(java.lang.String name,
Objective.Sign sign,
int value)
Adds the objective with the specified value. |
void |
add(java.lang.String name,
Objective.Sign sign,
Value<?> value)
Adds the objective with the specified value. |
void |
addAll(Objectives objectives)
Adds all objective with the specified value specified in Objectives. |
double[] |
array()
Returns an array of all values which all have to be minimized. |
double |
distance(Objectives other)
Calculates the euclidean distance of two Objectives. |
boolean |
dominates(Objectives opponent)
Returns true if this objectives dominate the specified
objectives. |
Value<?> |
get(Objective objective)
Returns the value that is assigned to the given objective. |
Objective |
get(Value<?> value)
Returns the objective that is assigned to the given value. |
java.util.Collection<Objective> |
getKeys()
Returns all objectives. |
java.util.Collection<Value<?>> |
getValues()
Returns all values. |
boolean |
isEqual(Objectives opponent)
Returns true if this objectives are equal to the specified
objectives. |
java.util.Iterator<java.util.Map.Entry<Objective,Value<?>>> |
iterator()
|
int |
size()
Returns the number of set Objectives. |
protected void |
submit()
Calculates the array. |
java.lang.String |
toString()
|
boolean |
weaklyDominates(Objectives opponent)
Returns true if this objectives weakly dominates the specified
objectives. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.SortedMap<Objective,Value<?>> map
protected double[] array
| Constructor Detail |
|---|
public Objectives()
| Method Detail |
|---|
public java.util.Iterator<java.util.Map.Entry<Objective,Value<?>>> iterator()
iterator in interface java.lang.Iterable<java.util.Map.Entry<Objective,Value<?>>>public double[] array()
Value.getDouble()protected void submit()
public int size()
Objectives.
public java.util.Collection<Objective> getKeys()
public java.util.Collection<Value<?>> getValues()
public Value<?> get(Objective objective)
null if the objective does not exist.
objective - the given objective
public Objective get(Value<?> value)
null if the value does not exist.
value - the given value
public void add(Objective objective,
Value<?> value)
objective - the objectivevalue - the value
public void add(java.lang.String name,
Objective.Sign sign,
Value<?> value)
name - the name of the objectivesign - the optimization directionvalue - the value
public void add(Objective objective,
double value)
objective - the objectivevalue - the value
public void add(java.lang.String name,
Objective.Sign sign,
double value)
name - the name of the objectivesign - the optimization directionvalue - the value
public void add(Objective objective,
int value)
objective - the objectivevalue - the value
public void add(java.lang.String name,
Objective.Sign sign,
int value)
name - the name of the objectivesign - the optimization directionvalue - the valuepublic void addAll(Objectives objectives)
Objectives.
objectives - the objectivespublic boolean weaklyDominates(Objectives opponent)
true if this objectives weakly dominates the specified
objectives. This comparison is based on the array() values.
opponent - other objectives
true if this objectives weakly dominate the
opponentpublic boolean dominates(Objectives opponent)
true if this objectives dominate the specified
objectives. This comparison is based on the array() values.
opponent - other objectives
true if these objectives dominate the opponentpublic boolean isEqual(Objectives opponent)
true if this objectives are equal to the specified
objectives. This comparison is based on the array() values.
opponent - other objectives
true if these objectives dominate the opponentpublic double distance(Objectives other)
Objectives. This
calculation is based on the array() values.
other - the second objectives
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||