public static Front getInvertedFront ( Front front ) { if ( front == null ) { throw new NullFrontException ( ) ; } else if ( front . getNumberOfPoints ( ) == 0 ) { throw new EmptyFrontException ( ) ; } int numberOfDimensions = front . getPoint ( 0 ) . getDimension ( ) ; Front invertedFront = new ArrayFront ( front . getNumberOfPoints ( ) , numberOfDimensions ) ; for ( int i = 0 ; i < front . getNumberOfPoints ( ) ; i ++ ) { for ( int j = 0 ; j < numberOfDimensions ; j ++ ) { if ( front . getPoint ( i ) . getValue ( j ) <= 1.0 && front . getPoint ( i ) . getValue ( j ) >= 0.0 ) { invertedFront . getPoint ( i ) . setValue ( j , 1.0 - front . getPoint ( i ) . getValue ( j ) ) ; } else if ( front . getPoint ( i ) . getValue ( j ) > 1.0 ) { invertedFront . getPoint ( i ) . setValue ( j , 0.0 ) ; } else if ( front . getPoint ( i ) . getValue ( j ) < 0.0 ) { invertedFront . getPoint ( i ) . setValue ( j , 1.0 ) ; } } } return invertedFront ; }
This method receives a normalized pareto front and return the inverted one . This method is for minimization problems