jeco.kernel.util
Class Util

java.lang.Object
  extended by jeco.kernel.util.Util

public class Util
extends java.lang.Object

Utility class for doing general operations: read from file, write to file, normalization, etc.

Author:
José L. Risco-Martín

Constructor Summary
Util()
           
 
Method Summary
static void normalize(java.util.ArrayList<Solutions> setOfSolutions, int dim)
          Function that normalize a set of fronts in the interval [1,2]
static void normalize(java.util.ArrayList<Solutions> setOfSolutions, int dim, double lowerBound, double upperBound)
          Function that normalizes a set of fronts in the given interval.
static Solutions readFrontFromFile(java.lang.String filePath)
          Function that reads a set of solutions from a file.
static java.util.ArrayList<Solutions> readFrontsFromFile(java.lang.String filePath)
          Function that reads N sets of solutions from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

readFrontFromFile

public static Solutions readFrontFromFile(java.lang.String filePath)
                                   throws java.lang.Exception
Function that reads a set of solutions from a file.

Parameters:
filePath - File path
Returns:
The set of solutions in the archive.
Throws:
java.lang.Exception

readFrontsFromFile

public static java.util.ArrayList<Solutions> readFrontsFromFile(java.lang.String filePath)
                                                         throws java.lang.Exception
Function that reads N sets of solutions from a file.

Parameters:
filePath - File path
Returns:
The set of solutions in the archive. Each solution set is separated in the file by a blank line.
Throws:
java.lang.Exception

normalize

public static void normalize(java.util.ArrayList<Solutions> setOfSolutions,
                             int dim,
                             double lowerBound,
                             double upperBound)
Function that normalizes a set of fronts in the given interval.

Parameters:
setOfSolutions - Set of fronts
dim - Number of objectives
lowerBound - lower bound
upperBound - upper bound

normalize

public static void normalize(java.util.ArrayList<Solutions> setOfSolutions,
                             int dim)
Function that normalize a set of fronts in the interval [1,2]

Parameters:
setOfSolutions - Set of fronts
dim - Number of objectives