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:
- java.io.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
Constructors Constructor and Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static doublecalculate(double value, double min, double max, double hi, double lo)Calculate a ranged mapped value.doublecalculate(int subfield)Calculate this output field.doubleconvertBack(double data)Convert a number back after its been normalized.InputFieldgetField()doublegetHigh()doublegetLow()intgetSubfieldCount()voidrowInit()Not needed for this sort of output field.-
Methods inherited from class org.encog.util.normalize.output.BasicOutputField
isIdeal, setIdeal
-
-
-
-
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:
calculatein interfaceOutputField- 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:
getSubfieldCountin interfaceOutputField- 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:
rowInitin interfaceOutputField
-
convertBack
public double convertBack(double data)
Convert a number back after its been normalized.- Parameters:
data- The number to convert back.- Returns:
- The result.
-
-
DMelt 3.0 © DataMelt by jWork.ORG