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 intcompareTo(PwlBreakpoint other)static PwlBreakpoint[]convert(double[] xval, double[] yval)Convert arrays of coordinates into breakpoints.static double[][]convert(PwlBreakpoint[] breakpoints)Convert an array of breakpoints into two double arrays.static double[][]convert(java.lang.Iterable<PwlBreakpoint> breakpoints)Deprecated.since 45.00, Use the overload that takes anIterableorStreamargument.static double[][]convert(java.util.stream.Stream<PwlBreakpoint> breakpoints)Convert a collection of breakpoints into two double arrays.booleanequals(PwlBreakpoint other)booleanequals(java.lang.Object other)doublegetX()doublegetY()inthashCode()voidsetX(double newX)voidsetY(double newY)
-
-
-
Constructor Detail
-
PwlBreakpoint
public PwlBreakpoint()
Create a breakpoint (0,0).Examples using
PwlBreakpoint:- Since:
- 43.00
-
PwlBreakpoint
public PwlBreakpoint(double x, double y)Create a breakpoint with the specified coordinates.Examples using
PwlBreakpoint:- 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:
-
compareToin interfacejava.lang.Comparable<PwlBreakpoint> - Since:
- 43.00
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
-
equalsin classjava.lang.Object - Since:
- 43.00
-
hashCode
public int hashCode()
- Overrides:
-
hashCodein classjava.lang.Object - Since:
- 43.00
-
convert
public static double[][] convert(PwlBreakpoint[] breakpoints)
Convert an array of breakpoints into two double arrays.- Parameters:
-
breakpoints- Array of 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
@Deprecated public static double[][] convert(java.lang.Iterable<PwlBreakpoint> breakpoints)
Deprecated.since 45.00, Use the overload that takes anIterableorStreamargument.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
xvalandyval. - 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.
