import java.awt.*;
import java.awt.event.*;
import Supporting.*;

public class PrimaryCluster extends Cluster
{
    public PrimaryCluster( )
    {
        setTitle( "Linear Probing " + LOAD_FACTOR );
    }

    public void fillIt( )
    {
        for( int i = 0; i < (int) ( NUM_SLOTS * LOAD_FACTOR ); i++ )
        {
            int pos;
            for( pos = r.randomInt( 0, NUM_SLOTS - 1 ); slots[ pos ] != 0; pos++ )
                if( pos == NUM_SLOTS - 1 )
                    pos = -1;

            slots[ pos ]++;
        }
    }
}
