Class ParameterSpace

java.lang.Object
org.uma.evolver.parameter.ParameterSpace
Direct Known Subclasses:
MOEADCommonParameterSpace, MOPSOParameterSpace, NSGAIICommonParameterSpace, RDEMOEACommonParameterSpace, YAMLParameterSpace

public abstract class ParameterSpace extends Object
Abstract class that defines a configurable parameter space for metaheuristics.

This class provides a framework for managing algorithm parameters in a hierarchical structure. It maintains two main collections:

  • A map of all parameters for direct access by name (parameterSpace)
  • An ordered list of top-level parameters that serve as entry points for configuration (topLevelParameters)
Note that all top-level parameters are also included in the main parameter space map.

Key features:

  • Hierarchical Parameter Management: Supports complex parameter hierarchies with conditional and global parameters
  • Type Safety: Uses generics to ensure type safety for all parameter values
  • Immutable Views: Provides unmodifiable views of parameters and top-level parameter lists
  • Flexible Configuration: Allows dynamic addition and retrieval of parameters

Usage example:

 // Create a custom parameter space
 public class MyParameterSpace extends ParameterSpace {
     public MyParameterSpace() {
         // Add parameters
         put(new IntegerParameter("populationSize", 50, 200, 100));
         put(new DoubleParameter("mutationRate", 0.0, 1.0, 0.1));
         
         // Mark as top-level parameters
         addTopLevelParameter(get("populationSize"));
         addTopLevelParameter(get("mutationRate"));
     }
     
     @Override
     public ParameterSpace createInstance() {
         return new MyParameterSpace();
     }
 }
 
 // Usage
 ParameterSpace space = new MyParameterSpace();
 Parameterinvalid input: '<'?> popSize = space.get("populationSize");
 Listinvalid input: '<'Parameterinvalid input: '<'?>> topParams = space.topLevelParameters();
 

See Also: