|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.util.RoundOMatic
This class is not thread safe. For a description, see the reproportion(float[]) method
Constructor Summary | |
RoundOMatic(int sum)
Creates a new RoundOMatic for rounding arrays of values such that the arrays' elements total to the specified sum |
Method Summary | |
int[] |
reproportion(float[] values)
Returns an array whose elements add up to the value passed into the constructor, and where each element is roughly proportional (by some constant) to the corresponding element in the array which was passed in. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RoundOMatic(int sum)
Method Detail |
public int[] reproportion(float[] values)
values
- An array which does not contain any negative values
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |