All Packages Class Hierarchy This Package Previous Next Index
Class benno.sort.VectorRandomiser
java.lang.Object
|
+----benno.sort.VectorRandomiser
- public class VectorRandomiser
- extends Object
An instance of this class take a Vector and reorders its elements so
that they are in random order. It works at the moment by making
10*Vector.size()
swaps between randomly picked elements of
the Vector.
There should be some theoretical basis to this class - I need to find it
and use it.
- Version:
- $Revision: 1.3 $
- Author:
- Ben Clifford
-
r
- This contains the Random object that is used to reorder the vector.
-
VectorRandomiser()
- Creates a new randomiser, creating a new Random object to use.
-
randomise(Vector)
- reorders the vector v so that it is in random order.
r
public final Random r
- This contains the Random object that is used to reorder the vector. It is
exposed so that other code may make use of the same random object.
VectorRandomiser
public VectorRandomiser()
- Creates a new randomiser, creating a new Random object to use.
randomise
public void randomise(Vector v)
- reorders the vector v so that it is in random order.
All Packages Class Hierarchy This Package Previous Next Index