|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgenerator.engin.utils.PartitionInteger
public class PartitionInteger
PartitionInteger
This class is used to split an integer number into several smaller numbers for which the sum equals the original number. Some numbers can be null. This class cannot be instancied as the only method it contains is static.Copyright(c) 2005 Université Laval, LSFM research group.
Partition
Constructor Summary | |
---|---|
PartitionInteger()
|
Method Summary | |
---|---|
static java.util.ArrayList |
divide(int number,
int numberOfParts)
This method will split an integer number into several smaller numbers for which the sum equals the original number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PartitionInteger()
Method Detail |
---|
public static java.util.ArrayList divide(int number, int numberOfParts) throws PartitionException
number
- the integer number to splitnumberOfParts
- the number of parts the number shall be split
PartitionException
- should the algorithm fail
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |