PwlBreakpoint
- java.lang.Object
-
- com.dashoptimization.PwlBreakpoint
-
- All Implemented Interfaces:
-
java.lang.Comparable<PwlBreakpoint>
public final class PwlBreakpoint extends java.lang.Object implements java.lang.Comparable<PwlBreakpoint>
A breakpoint in a piecewise linear function.- Since:
- 43.00
-
-
Constructor Summary
Constructor Description PwlBreakpoint()
Create a breakpoint (0,0).PwlBreakpoint(double x, double y)
Create a breakpoint with the specified coordinates.
-
Method Summary
Modifier and Type Method Description int
compareTo(PwlBreakpoint other)
static PwlBreakpoint[]
convert(double[] xval, double[] yval)
Convert arrays of coordinates into breakpoints.static double[][]
convert(PwlBreakpoint[] breakpoints)
static double[][]
convert(java.util.Collection<PwlBreakpoint> breakpoints)
Convert a collection of breakpoints into two double arrays.static double[][]
convert(java.util.stream.Stream<PwlBreakpoint> breakpoints)
Convert a collection of breakpoints into two double arrays.boolean
equals(PwlBreakpoint other)
boolean
equals(java.lang.Object other)
double
getX()
double
getY()
int
hashCode()
void
setX(double newX)
void
setY(double newY)
-
-
-
Constructor Detail
-
PwlBreakpoint
public PwlBreakpoint()
Create a breakpoint (0,0).- Since:
- 43.00
-
PwlBreakpoint
public PwlBreakpoint(double x, double y)
Create a breakpoint with the specified coordinates.- Parameters:
-
x
- X coordinate for new breakpoint. -
y
- Y coordinate for new breakpoint. - Since:
- 43.00
-
-
Method Detail
-
getX
public double getX()
-
setX
public void setX(double newX)
-
getY
public double getY()
-
setY
public void setY(double newY)
-
equals
public boolean equals(PwlBreakpoint other)
- Since:
- 43.00
-
compareTo
public int compareTo(PwlBreakpoint other)
- Specified by:
-
compareTo
in interfacejava.lang.Comparable<PwlBreakpoint>
- Since:
- 43.00
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
-
equals
in classjava.lang.Object
- Since:
- 43.00
-
hashCode
public int hashCode()
- Overrides:
-
hashCode
in classjava.lang.Object
- Since:
- 43.00
-
convert
public static double[][] convert(PwlBreakpoint[] breakpoints)
- Since:
- 43.00
-
convert
public static double[][] convert(java.util.Collection<PwlBreakpoint> breakpoints)
Convert a collection of breakpoints into two double arrays.- Parameters:
-
breakpoints
- Breakpoints to convert. - Returns:
- Two element array, in which the first element contains the x coordinates of the breakpoints and the second element contains the y coordinates of the breakpoints.
- Since:
- 43.00
-
convert
public static double[][] convert(java.util.stream.Stream<PwlBreakpoint> breakpoints)
Convert a collection of breakpoints into two double arrays.- Parameters:
-
breakpoints
- Breakpoints to convert. - Returns:
- Two element array, in which the first element contains the x coordinates of the breakpoints and the second element contains the y coordinates of the breakpoints.
- Since:
- 43.00
-
convert
public static PwlBreakpoint[] convert(double[] xval, double[] yval)
Convert arrays of coordinates into breakpoints.- Parameters:
-
xval
- x coordinates of breakpoints. Must have the same length asyval
. -
yval
- y coordinates of breakpoints. Must have the same length asxval
. - Returns:
-
The breakpoints represented by
xval
andyval
. - Since:
- 43.00
-
-
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.