@@ -189,7 +189,7 @@ private TestStats testTrendVs(TestStats H0, double[] values, double[] weights) {
189189 private TestStats testStepChangeVs (TestStats H0 , double [] values , double [] weights , int [] candidateChangePoints ) {
190190
191191 double vStep = Double .MAX_VALUE ;
192- int changePoint = - 1 ;
192+ int changePoint = ChangeType . NO_CHANGE_POINT ;
193193
194194 // Initialize running stats so that they are only missing the individual changepoint values
195195 RunningStats lowerRange = new RunningStats ();
@@ -226,7 +226,7 @@ private TestStats testStepChangeVs(TestStats H0, double[] values, double[] weigh
226226 private TestStats testTrendChangeVs (TestStats H0 , double [] values , double [] weights , int [] candidateChangePoints ) {
227227
228228 double vChange = Double .MAX_VALUE ;
229- int changePoint = - 1 ;
229+ int changePoint = ChangeType . NO_CHANGE_POINT ;
230230
231231 // Initialize running stats so that they are only missing the individual changepoint values
232232 RunningStats lowerRange = new RunningStats ();
@@ -349,7 +349,7 @@ private TestStats testDistributionChange(
349349 ) {
350350
351351 double maxDiff = 0.0 ;
352- int changePoint = - 1 ;
352+ int changePoint = ChangeType . NO_CHANGE_POINT ;
353353
354354 // Initialize running stats so that they are only missing the individual changepoint values
355355 RunningStats lowerRange = new RunningStats ();
@@ -381,7 +381,7 @@ private TestStats testDistributionChange(
381381
382382 double pValue = 1 ;
383383 for (int cp : sampleData .changePoints ()) {
384- if (cp == - 1 ) {
384+ if (cp == ChangeType . NO_CHANGE_POINT ) {
385385 continue ;
386386 }
387387 double [] x = Arrays .copyOfRange (sampleValues , 0 , cp );
@@ -453,7 +453,7 @@ private record TestStats(Type type, double pValue, double var, double nParams, i
453453 }
454454
455455 TestStats (Type type , double pValue , double var , double nParams , DataStats dataStats ) {
456- this (type , pValue , var , nParams , - 1 , dataStats );
456+ this (type , pValue , var , nParams , ChangeType . NO_CHANGE_POINT , dataStats );
457457 }
458458
459459 boolean accept (double pValueThreshold ) {
0 commit comments