Package org.moeaframework.core.attribute
Class NicheDistance
java.lang.Object
org.moeaframework.core.attribute.NicheDistance
- All Implemented Interfaces:
- Attribute
Related to the 
Niche attribute, this attribute records the distance from the solution to the niche.- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic final doublegetAttribute(Solution solution) Returns the value of the attribute stored in the solution.static final booleanhasAttribute(Solution solution) Returnstrueif the solution defines this attribute;falseotherwise.static final voidsetAttribute(Solution solution, double value) Sets the value of the attribute on the solution.
- 
Field Details- 
ATTRIBUTE_NAMEThe name / key used for this attribute.- See Also:
 
 
- 
- 
Method Details- 
hasAttributeReturnstrueif the solution defines this attribute;falseotherwise.- Parameters:
- solution- the solution
- Returns:
- trueif the solution defines this attribute;- falseotherwise
 
- 
setAttributeSets the value of the attribute on the solution.- Parameters:
- solution- the solution
- value- the value to set
 
- 
getAttributeReturns the value of the attribute stored in the solution.- Parameters:
- solution- the solution
- Returns:
- the stored value
 
 
-