javamath.util.mathgui
Class Permutation

java.lang.Object
  |
  +--javamath.util.mathgui.Permutation
All Implemented Interfaces:
java.io.Serializable

public class Permutation
extends java.lang.Object
implements java.io.Serializable

A private implementation of Permutation with various useful constructor and accessor methods.

See Also:
Serialized Form

Constructor Summary
Permutation()
          Construct the identity permutation.
Permutation(java.util.Vector vec)
          takes a permutation in cycle notation.
 
Method Summary
 int[] toArray()
          returns an array a such that the permutation maps i to a[i-1]
 java.lang.String toString()
          a string representing the permutation in cycle notation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Permutation

public Permutation()
Construct the identity permutation.

Permutation

public Permutation(java.util.Vector vec)
takes a permutation in cycle notation.
Method Detail

toArray

public int[] toArray()
returns an array a such that the permutation maps i to a[i-1]

toString

public java.lang.String toString()
a string representing the permutation in cycle notation.
Overrides:
toString in class java.lang.Object