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

## FitnessEvaluation.util
Class Range

    java.lang.Object
      FitnessEvaluation.util.Range

    public class Range

extends java.lang.Object

Parses an input string to a range of doubles, either random or fixed FIXME allow samples from each dimension to be of different sizes

Author:
  erikhemberg

Constructor Summary
`Range(java.lang.String s)`
`Range(java.lang.String s, RandomNumberGenerator rng)`

Method Summary
`int` | `getDimensions()`
`double[][]` | `getSamples()` Get samples from the range.
`double` | `getStart()`
`double` | `getStart(int dim)`
`double` | `getStep()`
`double` | `getStep(int dim)`
`double` | `getStop()`
`double` | `getStop(int dim)`
`int` | `getTotalSamples(int i)` Total samples for the dimension.
`boolean` | `isRandom()`
`boolean` | `isRandom(int i)`
`void` | `setRandom(boolean random)`
`void` | `setRandom(boolean random, int i)`
`void` | `stringToRange(java.lang.String s)` For a fixed range input string as x eq [start:step:stop]; e.g inputs 0,0.1,0.2,...,1 for x0 and x1 is x0 eq [0:0.1:1]; x1 eq [0:0.1:1] For random numbers from a range or x eq rnd(start, cases ,stop); e.g random inputs rom range 0 to 1 for x0 and x1 is x0 eq rnd(0,10,1); x1 eq rnd(0,10,1)
`java.lang.String` | `toString()`

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

Constructor Detail

### Range

    public Range(java.lang.String s)

### Range

    public Range(java.lang.String s,
                 RandomNumberGenerator rng)

Method Detail

### stringToRange

    public void stringToRange(java.lang.String s)

  For a fixed range input string as x eq [start:step:stop]; e.g inputs 0,0.1,0.2,...,1 for x0 and x1 is x0 eq [0:0.1:1]; x1 eq [0:0.1:1] For random numbers from a range or x eq rnd(start, cases ,stop); e.g random inputs rom range 0 to 1 for x0 and x1 is x0 eq rnd(0,10,1); x1 eq rnd(0,10,1)

  Parameters:
    `s` - string to parse for number ranges

### getTotalSamples

    public int getTotalSamples(int i)

  Total samples for the dimension. For fixed values the calcualtion is totalSamples = (stop-start)/step

  Parameters:
    `i` - dimension
  Returns:
    total number of samples from the dimension

### getSamples

    public double[][] getSamples()

  Get samples from the range. If random new samples are generated.

  Returns:
    double containg samples for each dimension

### isRandom

    public boolean isRandom()

### setRandom

    public void setRandom(boolean random)

### isRandom

    public boolean isRandom(int i)

### setRandom

    public void setRandom(boolean random,
                          int i)

### getStart

    public double getStart(int dim)

### getStep

    public double getStep(int dim)

### getStop

    public double getStop(int dim)

### getDimensions

    public int getDimensions()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getStep

    public double getStep()

### getStop

    public double getStop()

### getStart

    public double getStart()

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