|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgenerator.engin.utils.Partition
public class Partition
Partition
This class is used to split a real number into several real numbers for which the sum equals the original number. This class cannot be instancied as the only method it contains is static.Copyright(c) 2005 Université Laval, LSFM research group.
Constructor Summary | |
---|---|
Partition()
|
Method Summary | |
---|---|
static java.util.ArrayList |
divide(double number,
int numberOfParts)
Split a real 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 Partition()
Method Detail |
---|
public static java.util.ArrayList divide(double number, int numberOfParts) throws PartitionException
number
- the real number to dividenumberOfParts
- the number of parts to create
PartitionException
- should the algorithm fail
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |