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

## org.encog.util.normalize.output
Class OutputFieldRangeMapped

    java.lang.Object
      org.encog.util.normalize.output.BasicOutputField
          org.encog.util.normalize.output.OutputFieldRangeMapped

All Implemented Interfaces:
  Serializable, OutputField, RequireTwoPass

    public class OutputFieldRangeMapped

extends BasicOutputField
implements RequireTwoPass

A ranged mapped output field. This will scale the input so that it is between the high and low value.

See Also:
  Serialized Form

Constructor Summary
`OutputFieldRangeMapped()` Default constructor, used mainly for reflection.
`OutputFieldRangeMapped(InputField f)` Create a range field with -1 and 1 as low/high.
`OutputFieldRangeMapped(InputField field, double low, double high)` Construct a range mapped output field.

Method Summary
`static double` | `calculate(double value, double min, double max, double hi, double lo)` Calculate a ranged mapped value.
`double` | `calculate(int subfield)` Calculate this output field.
`double` | `convertBack(double data)` Convert a number back after its been normalized.
`InputField` | `getField()`
`double` | `getHigh()`
`double` | `getLow()`
`int` | `getSubfieldCount()`
`void` | `rowInit()` Not needed for this sort of output field.

Methods inherited from class org.encog.util.normalize.output.BasicOutputField
`isIdeal, setIdeal`

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

Constructor Detail

### OutputFieldRangeMapped

    public OutputFieldRangeMapped()

  Default constructor, used mainly for reflection.

### OutputFieldRangeMapped

    public OutputFieldRangeMapped(InputField field,
                                  double low,
                                  double high)

  Construct a range mapped output field.

  Parameters:
    `field` - The input field to base this on.
    `low` - The low value.
    `high` - The high value.

### OutputFieldRangeMapped

    public OutputFieldRangeMapped(InputField f)

  Create a range field with -1 and 1 as low/high.

  Parameters:
    `f` - The input field to use.

Method Detail

### calculate

    public static double calculate(double value,
                                   double min,
                                   double max,
                                   double hi,
                                   double lo)

  Calculate a ranged mapped value.

  Parameters:
    `value` - The to map.
    `min` - The minimum that the value param can be.
    `max` - The maximum that the value param can be.
    `hi` - The high value to map into.
    `lo` - The low value to map into.
  Returns:
    The mapped value.

### calculate

    public double calculate(int subfield)

  Calculate this output field.

  Specified by:
    `calculate` in interface `OutputField`
  Parameters:
    `subfield` - Not used.
  Returns:
    The calculated value.

### getField

    public InputField getField()

  Returns:
    The field that this output is based on.

### getHigh

    public double getHigh()

  Returns:
    The high value of the range to map into.

### getLow

    public double getLow()

  Returns:
    The low value of the range to map into.

### getSubfieldCount

    public int getSubfieldCount()

  Specified by:
    `getSubfieldCount` in interface `OutputField`
  Returns:
    This field only produces one value, so this will return 1.

### rowInit

    public void rowInit()

  Not needed for this sort of output field.

  Specified by:
    `rowInit` in interface `OutputField`

### convertBack

    public double convertBack(double data)

  Convert a number back after its been normalized.

  Parameters:
    `data` - The number to convert back.
  Returns:
    The result.

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

Copyright © 2011. All Rights Reserved.