Comparison
All functions · nseries package
EQ
func (s Series) EQ(y any) Series
EQ is an alias for Equal
Equal
func (s Series) Equal(y any) Series
Equal tests whether each entry in the receiver series is equal to a provided value or series, giving 1.0 where it is and 0.0 where it is not (NaN is never equal to anything). Numeric operands may have built-in or defined real numeric types, including uintptr. A Series operand is right-aligned with the receiver at the most recent bar: the last values of the two series are compared, then the second-last, and so on over the bars they share. Positions before that overlap are 0.0, and an empty Series operand yields receiver-length zeros. A plain []float64 is not a Series and, like any other unsupported type, yields receiver-length zeros. The result always has the receiver’s length. Series are paired by position only; see “Time alignment” in the manual.
GreaterThan
func (s Series) GreaterThan(y any) Series
GreaterThan tests whether each entry in the receiver series is greater than a provided value or series, giving 1.0 where it is and 0.0 where it is not (a comparison involving NaN is false). Numeric operands may have built-in or defined real numeric types, including uintptr. A Series operand is right-aligned with the receiver at the most recent bar, as for Equal: positions before the overlap are 0.0, and an empty Series operand yields receiver-length zeros. A plain []float64 is not a Series and, like any other unsupported type, yields receiver-length zeros. Series are paired by position only; see “Time alignment” in the manual.
GreaterThanOrEqual
func (s Series) GreaterThanOrEqual(y any) Series
GreaterThanOrEqual tests whether each entry in the receiver series is greater than or equal to a provided value or series, giving 1.0 where it is and 0.0 where it is not (a comparison involving NaN is false). Numeric operands may have built-in or defined real numeric types, including uintptr. A Series operand is right-aligned with the receiver at the most recent bar, as for Equal: positions before the overlap are 0.0, and an empty Series operand yields receiver-length zeros. A plain []float64 is not a Series and, like any other unsupported type, yields receiver-length zeros. Series are paired by position only; see “Time alignment” in the manual.
GT
func (s Series) GT(y any) Series
GT is an alias for GreaterThan
GTE
func (s Series) GTE(y any) Series
GTE is an alias for GreaterThanOrEqual
LessThan
func (s Series) LessThan(y any) Series
LessThan tests whether each entry in the receiver series is less than a provided value or series, giving 1.0 where it is and 0.0 where it is not (a comparison involving NaN is false). Numeric operands may have built-in or defined real numeric types, including uintptr. A Series operand is right-aligned with the receiver at the most recent bar, as for Equal: positions before the overlap are 0.0, and an empty Series operand yields receiver-length zeros. A plain []float64 is not a Series and, like any other unsupported type, yields receiver-length zeros. Series are paired by position only; see “Time alignment” in the manual.
LessThanOrEqual
func (s Series) LessThanOrEqual(y any) Series
LessThanOrEqual tests whether each entry in the receiver series is less than or equal to a provided value or series, giving 1.0 where it is and 0.0 where it is not (a comparison involving NaN is false). Numeric operands may have built-in or defined real numeric types, including uintptr. A Series operand is right-aligned with the receiver at the most recent bar, as for Equal: positions before the overlap are 0.0, and an empty Series operand yields receiver-length zeros. A plain []float64 is not a Series and, like any other unsupported type, yields receiver-length zeros. Series are paired by position only; see “Time alignment” in the manual.
LT
func (s Series) LT(y any) Series
LT is an alias for LessThan
LTE
func (s Series) LTE(y any) Series
LTE is an alias for LessThanOrEqual