Cream version 1.06 Core API Specification

jp.ac.kobe_u.cs.cream
Class Serialized.Swap

java.lang.Object
  extended by jp.ac.kobe_u.cs.cream.Operation
      extended by jp.ac.kobe_u.cs.cream.Serialized.Swap
Enclosing class:
Serialized

public class Serialized.Swap
extends Operation

This class represents an operation of swapping an order of two variables.

Since:
1.0
See Also:
LocalSearch

Constructor Summary
Serialized.Swap(int index, int i, int j)
          Constructs the swap operation exchanging the order of two variables v[i] and v[j].
 
Method Summary
 void applyTo(Network network)
          Applies the operation to the network to change the condition for finding a neighbor solution.
 boolean isTaboo(Operation op)
          Returns true when op is a taboo operation relative to this operation (for example, op is the same operation with this operation).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serialized.Swap

public Serialized.Swap(int index,
                       int i,
                       int j)
Constructs the swap operation exchanging the order of two variables v[i] and v[j].

Parameters:
index - index of the serialized constraint
i - index of the first variable (v[i])
j - index of the second variable (v[j])
Method Detail

applyTo

public void applyTo(Network network)
Description copied from class: Operation
Applies the operation to the network to change the condition for finding a neighbor solution.

Specified by:
applyTo in class Operation
Parameters:
network - the network

isTaboo

public boolean isTaboo(Operation op)
Description copied from class: Operation
Returns true when op is a taboo operation relative to this operation (for example, op is the same operation with this operation).

Specified by:
isTaboo in class Operation
Parameters:
op - the operation to be checked
Returns:
true when op is a taboo
See Also:
TabooSearch

Cream version 1.06 Core API Specification

Cream: Constraint Programming Class Library for Java