hu.birot.OTKit.performance
Interface RulesOfMoving


public interface RulesOfMoving

This interface gives the structure for any object of type RulesOfMoving, which are used during random walks (such as hill climbing and simulated annealing).

A RulesOfMoving always receives four parameters:

  1. the present candidate (the present position of the random walker),
  2. the neighbor candidate (where to move to is being considered), chosen by some algorithm (a random neighbor or the best of the neighbors),
  3. the harmony function or hierarchy that defines the comparison of the two candidates,
  4. "temperature", that is, a variable of describing the state of the random walk (ignored in simple hill climbing).

The interface must return a boolean value whose interpretation is whether to move or not, true meaning to move and false meaning not to move.


Method Summary
 boolean move(Candidate c1, Candidate c2, Hierarchy h, Temperature t)
          This static method determines whether the random walker should move from position c1 to position c2, if the state of the random walk is given by temperature t.
 

Method Detail

move

boolean move(Candidate c1,
             Candidate c2,
             Hierarchy h,
             Temperature t)
This static method determines whether the random walker should move from position c1 to position c2, if the state of the random walk is given by temperature t.

Parameters:
c1 - : Present position of the random walker.
c2 - : Considered next position of the random walker.
h - : the hierarchy defining the Harmony function, according to which c1 and c2 are being compared.
t - : Temperature, i.e., state of the random walk.
Returns:
: A boolean value describing whether to move (true) or not (false).