Package com.fa993.utils
Class UnpackConditionArgs
- java.lang.Object
-
- com.fa993.utils.UnpackConditionArgs
-
public class UnpackConditionArgs extends Object
Utility class for unpacking and transforming interval arguments into appropriate formats based on specified conditions. This class processes a given interval and applies it to specific indices of an array, ensuring the resulting structure is compatible with subsequent operations.
-
-
Constructor Summary
Constructors Constructor Description UnpackConditionArgs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PairOfDoubleOrDArr
call(NumOrTwoSeqOrNdArr interval, double[] x, int[] peaks)
Unpacks the interval arguments into a pair of lower and upper boundaries, applying the interval conditions to a subset of data defined by the peaks.
-
-
-
Method Detail
-
call
public static PairOfDoubleOrDArr call(NumOrTwoSeqOrNdArr interval, double[] x, int[] peaks)
Unpacks the interval arguments into a pair of lower and upper boundaries, applying the interval conditions to a subset of data defined by the peaks.- Parameters:
interval
- an object representing the interval, which can be:- A single scalar value.
- A pair of scalar values representing a range.
- A pair of arrays representing element-wise ranges.
x
- the reference array containing the full dataset.peaks
- an array of indices specifying the peaks to which the interval conditions should apply.- Returns:
- a
PairOfDoubleOrDArr
object containing:- A lower boundary (`imin`) represented as a scalar or an array.
- An upper boundary (`imax`) represented as a scalar or an array.
- Throws:
IllegalArgumentException
- if the size of the boundary arrays does not match the size ofx
.RuntimeException
- if theinterval
selector state is unknown.
-
-