Orbital library

orbital.algorithm.template
Interface AlgorithmicConfiguration

All Known Implementing Classes:
AlgorithmicTemplate.Configuration, GeneticAlgorithm.Configuration, HeuristicAlgorithm.Configuration

public interface AlgorithmicConfiguration

Algorithmic configurations provide the glue between a problem and an algorithm used for solving it. They know some aspects of the problem and translate them into the right choices of parameters for the specific instance of the algorithm. Unlike the algorithmic problems themselves, algorithmic configurations manage non-inherent parameters of the way the problem is really solved with the algorithm. So they define a lot more of how to tackle the problem, instead of just declaring what the problem really is. Since there may be far more than one way of solving one specific problem, you may also instantiate multiple different configurations solving the same problem with different algorithms and varying non-inherent parameters.

Note that the use of this interface is optional. If your problem only admits a single way of solving it, and does not want to encapsulate the passing and management of additional parameters in an algorithmic configuration, you can explicitly invoke the algorithm instance on the problem without loss of functionality. If, however, you want a convenient way of managing (and choosing from) several ways of solving the problem algorithmic configurations may be precisely what you need.

Author:
André Platzer
See Also:
AlgorithmicProblem, AlgorithmicTemplate
Structure:
association class of the relation solving:AlgorithmicTemplate×AlgorithmicProblem, aggregates algorithm:AlgorithmicTemplate (derived), aggregates problem:AlgorithmicProblem (derived)

Method Summary
 AlgorithmicTemplate getAlgorithm()
          Gets the algorithm used for solving the problem.
 AlgorithmicProblem getProblem()
          Gets the specific problem to solve.
 java.lang.Object solve()
          Solves the problem with the algorithm with regard to the additional parameters managed by this algorithmic configuration.
 

Method Detail

getProblem

AlgorithmicProblem getProblem()
Gets the specific problem to solve.


getAlgorithm

AlgorithmicTemplate getAlgorithm()
Gets the algorithm used for solving the problem.

Returns:
the algorithm, with our additional parameters already adjusted.
Postconditions:
RES≠OLD(RES) ∨ RES is stateless

solve

java.lang.Object solve()
Solves the problem with the algorithm with regard to the additional parameters managed by this algorithmic configuration.

Returns:
the solution to the problem getProblem() by using the algorithm getAlgorithm() after adjusting our additional parameters.
See Also:
Convenience method
Postconditions:
usually RES = getAlgorithm().solve(getProblem())

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.