tweaks
This commit is contained in:
parent
64d2ef25c7
commit
685186cc4d
|
@ -49,9 +49,9 @@ func (lrs LinearRegressionSeries) GetLimit() int {
|
||||||
|
|
||||||
// GetEndIndex returns the effective limit end.
|
// GetEndIndex returns the effective limit end.
|
||||||
func (lrs LinearRegressionSeries) GetEndIndex() int {
|
func (lrs LinearRegressionSeries) GetEndIndex() int {
|
||||||
offset := lrs.GetOffset() + lrs.Len()
|
windowEnd := lrs.GetOffset() + lrs.GetLimit()
|
||||||
innerSeriesLastIndex := lrs.InnerSeries.Len() - 1
|
innerSeriesLastIndex := lrs.InnerSeries.Len() - 1
|
||||||
return Math.MinInt(offset, innerSeriesLastIndex)
|
return Math.MinInt(windowEnd, innerSeriesLastIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetOffset returns the data offset.
|
// GetOffset returns the data offset.
|
||||||
|
|
|
@ -52,9 +52,9 @@ func (prs PolynomialRegressionSeries) GetLimit() int {
|
||||||
|
|
||||||
// GetEndIndex returns the effective limit end.
|
// GetEndIndex returns the effective limit end.
|
||||||
func (prs PolynomialRegressionSeries) GetEndIndex() int {
|
func (prs PolynomialRegressionSeries) GetEndIndex() int {
|
||||||
offset := prs.GetOffset() + prs.Len()
|
windowEnd := prs.GetOffset() + prs.GetLimit()
|
||||||
innerSeriesLastIndex := prs.InnerSeries.Len() - 1
|
innerSeriesLastIndex := prs.InnerSeries.Len() - 1
|
||||||
return Math.MinInt(offset, innerSeriesLastIndex)
|
return Math.MinInt(windowEnd, innerSeriesLastIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetOffset returns the data offset.
|
// GetOffset returns the data offset.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user