Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.utils.random
Class EqualParts

    java.lang.Object
      de.jstacs.utils.random.MultivariateRandomGenerator
          de.jstacs.utils.random.EqualParts

    public class EqualParts

extends MultivariateRandomGenerator

This class is no real random generator it just returns 1/n for all values. The content of container `MRGParams` is never used in this class.

Author:
  Jens Keilwagen

Constructor Summary
`EqualParts()`

Method Summary
`void` | `generate(double[] d, int start, int number)` Modifies a given `number` of array entries to `1/number`.
`void` | `generate(double[] d, int start, int number, MRGParams p)` Generates a `n`-dimensional random array as part of the array `d` beginning at `start`.
`double[]` | `generate(int n)` Returns an array of length `n` with entries `1/n`.

Methods inherited from class de.jstacs.utils.random.MultivariateRandomGenerator
`generate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EqualParts

    public EqualParts()

Method Detail

### generate

    public void generate(double[] d,
                         int start,
                         int number,
                         MRGParams p)

  Description copied from class: `MultivariateRandomGenerator`
  Generates a `n`-dimensional random array as part of the array `d` beginning at `start`.

  Specified by:
    `generate` in class `MultivariateRandomGenerator`
  Parameters:
    `d` - the array
    `start` - the start index for generated values
    `number` - the dimension of the random array
    `p` - the parameter of the underlying distribution

### generate

    public double[] generate(int n)

  Returns an array of length `n` with entries `1/n`.

  Parameters:
    `n` - the length of the array and the divisor for the calculation of the equal parts as its entries
  Returns:
    an array of length `n` with entries 1/n
  See Also:
    `generate(double[], int, int)`

### generate

    public void generate(double[] d,
                         int start,
                         int number)

  Modifies a given `number` of array entries to `1/number`.

  Parameters:
    `d` - the array which will be modified
    `start` - the start index of the modification of the array
    `number` - the number of entries `1/number`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD