jmetal.encodings.variable
Class Permutation

java.lang.Object
  extended by jmetal.core.Variable
      extended by jmetal.encodings.variable.Permutation
All Implemented Interfaces:
java.io.Serializable

public class Permutation
extends Variable

Class implementing a permutation of integer decision encodings.variable

See Also:
Serialized Form

Field Summary
 int size_
          Stores the length of the permutation
 int[] vector_
          Stores a permutation of int values
 
Constructor Summary
Permutation()
          Constructor
Permutation(int size)
          Constructor
Permutation(Permutation permutation)
          Copy Constructor
 
Method Summary
 Variable deepCopy()
          Create an exact copy of the Permutation object.
 int getLength()
          Returns the length of the permutation.
 java.lang.String toString()
          Returns a string representing the object
 
Methods inherited from class jmetal.core.Variable
getLowerBound, getUpperBound, getValue, getVariableType, setLowerBound, setUpperBound, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vector_

public int[] vector_
Stores a permutation of int values


size_

public int size_
Stores the length of the permutation

Constructor Detail

Permutation

public Permutation()
Constructor


Permutation

public Permutation(int size)
Constructor

Parameters:
size - Length of the permutation This constructor has been contributed by Madan Sathe

Permutation

public Permutation(Permutation permutation)
Copy Constructor

Parameters:
permutation - The permutation to copy
Method Detail

deepCopy

public Variable deepCopy()
Create an exact copy of the Permutation object.

Specified by:
deepCopy in class Variable
Returns:
An exact copy of the object.

getLength

public int getLength()
Returns the length of the permutation.

Returns:
The length

toString

public java.lang.String toString()
Returns a string representing the object

Overrides:
toString in class java.lang.Object
Returns:
The string