|
RobotCore 1.0
WPILib port to raspberry Pi
|
Public Member Functions | |
| double | apply (double input) |
| default UnaryFunction | pipeTo (UnaryFunction next) |
| default UnaryFunction | mult (UnaryFunction multiplier) |
| default UnaryFunction | mult (double multiplier) |
| default UnaryFunction | div (UnaryFunction divisor) |
| default UnaryFunction | div (double divisor) |
| default UnaryFunction | exp (UnaryFunction exponent) |
| default UnaryFunction | exp (double exponent) |
Public Attributes | |
| UnaryFunction | IDENTITY = x -> x |
A function that accepts a single double and returns a double result. This is used to represent arbitrary mapping functions for converting units to and from a base unit representation. Temperature units, in particular, typically have an offset from a value in Kelvin and may have a multiplication factor added in, which means that units cannot always be represented as simple ratios of their base units.
Definition at line 17 of file UnaryFunction.java.
| double org.wpilib.units.UnaryFunction.apply | ( | double | input | ) |
Applies this function to the input value and returns the result.
| input | the input value to the function |
| default UnaryFunction org.wpilib.units.UnaryFunction.div | ( | double | divisor | ) |
Creates a composite function h(x) such that h(x) = 1/k * f(x).
| divisor | the constant value to divide this function's results by |
Definition at line 100 of file UnaryFunction.java.
| default UnaryFunction org.wpilib.units.UnaryFunction.div | ( | UnaryFunction | divisor | ) |
Creates a composite function h(x) such that h(x) = f(x) / g(x).
| divisor | the function to divide this one by |
Definition at line 77 of file UnaryFunction.java.
| default UnaryFunction org.wpilib.units.UnaryFunction.exp | ( | double | exponent | ) |
Creates a composite function h(x) such that h(x) = f(x) ^ k.
| exponent | the constant value to exponentiate this function's results by |
Definition at line 122 of file UnaryFunction.java.
| default UnaryFunction org.wpilib.units.UnaryFunction.exp | ( | UnaryFunction | exponent | ) |
Creates a composite function h(x) such that h(x) = f(x) ^ g(x).
| exponent | the function to exponentiate this function's results by |
Definition at line 110 of file UnaryFunction.java.
| default UnaryFunction org.wpilib.units.UnaryFunction.mult | ( | double | multiplier | ) |
Creates a composite function h(x) such that h(x) = k * f(x).
| multiplier | the constant value to multiply this function's results by |
Definition at line 67 of file UnaryFunction.java.
| default UnaryFunction org.wpilib.units.UnaryFunction.mult | ( | UnaryFunction | multiplier | ) |
Creates a composite function h(x) such that h(x) = f(x) * g(x).
| multiplier | the function to multiply this one by |
Definition at line 55 of file UnaryFunction.java.
| default UnaryFunction org.wpilib.units.UnaryFunction.pipeTo | ( | UnaryFunction | next | ) |
Constructs a new function that first calls this function, then passes the result to another as input.
f = x -> x + 1 // f(x) = x + 1 g = x -> 2 * x // g(x) = 2x h = f.pipeTo(g) // h(x) = g(f(x))
| next | the next operation to pipe to |
Definition at line 43 of file UnaryFunction.java.
| UnaryFunction org.wpilib.units.UnaryFunction.IDENTITY = x -> x |
The identity function that simply returns the input value.
Definition at line 19 of file UnaryFunction.java.