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

Variable Index

 o r
This contains the Random object that is used to reorder the vector.

Constructor Index

 o VectorRandomiser()
Creates a new randomiser, creating a new Random object to use.

Method Index

 o randomise(Vector)
reorders the vector v so that it is in random order.

Variables

 o 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.

Constructors

 o VectorRandomiser
 public VectorRandomiser()
Creates a new randomiser, creating a new Random object to use.

Methods

 o 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