org.thc.shagg
Class PartitionSet

java.lang.Object
  |
  +--org.thc.shagg.PartitionSet

public class PartitionSet
extends java.lang.Object

This class holds a set of partitions for a specified length, the length of the serial numbers. A partition is defined as an offset, the subnumber and a trailing end. The algorithms will only be applied to the subnumber.

The set contains all possible partitions for the given length and minimum.

e.g. partition 5, minimum 3

Version:
$Id: PartitionSet.java,v 1.5 2003/07/18 10:08:05 plasmoid Exp $
Author:
Plasmoid (plasmoid@thc.org), THC

Field Summary
private  java.util.Vector set
           
 
Constructor Summary
PartitionSet(int len, int min)
          Construct a partition set.
 
Method Summary
 int[] get(int i)
          Get the i-th element of the set.
 int size()
          Get the size of the set.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

set

private java.util.Vector set
Constructor Detail

PartitionSet

public PartitionSet(int len,
                    int min)
Construct a partition set.
Parameters:
len - Length of the field to partition.
min - Minimum of offset of element size.
Method Detail

size

public int size()
Get the size of the set.
Returns:
size Size of the partition set.

get

public int[] get(int i)
Get the i-th element of the set.
Parameters:
i - Index of the element
Returns:
Partition as an array of integers.