public void computeIndicatorValuesHD ( List < S > solutionSet , double [ ] maximumValues , double [ ] minimumValues ) { List < S > A , B ; // Initialize the structures indicatorValues = new ArrayList < List < Double > > ( ) ; maxIndicatorValue = - Double . MAX_VALUE ; for ( int j = 0 ; j < solutionSet . size ( ) ; j ++ ) { A = new ArrayList <> ( 1 ) ; A . add ( solutionSet . get ( j ) ) ; List < Double > aux = new ArrayList < Double > ( ) ; for ( S solution : solutionSet ) { B = new ArrayList <> ( 1 ) ; B . add ( solution ) ; int flag = ( new DominanceComparator < S > ( ) ) . compare ( A . get ( 0 ) , B . get ( 0 ) ) ; double value ; if ( flag == - 1 ) { value = - calculateHypervolumeIndicator ( A . get ( 0 ) , B . get ( 0 ) , problem . getNumberOfObjectives ( ) , maximumValues , minimumValues ) ; } else { value = calculateHypervolumeIndicator ( B . get ( 0 ) , A . get ( 0 ) , problem . getNumberOfObjectives ( ) , maximumValues , minimumValues ) ; } //Update the max value of the indicator if ( Math . abs ( value ) > maxIndicatorValue ) { maxIndicatorValue = Math . abs ( value ) ; } aux . add ( value ) ; } indicatorValues . add ( aux ) ; } }
This structure stores the indicator values of each pair of elements