gitee.com/quant1x/num@v0.3.2/internal/functions/comparison.go (about) 1 package functions 2 3 import ( 4 "gitee.com/quant1x/num/internal/constraints" 5 ) 6 7 func Lt_Go[T constraints.Float](dst []bool, x, y []T) { 8 for i := 0; i < len(x); i++ { 9 dst[i] = x[i] < y[i] 10 } 11 } 12 13 func Lte_Go[T constraints.Float](dst []bool, x, y []T) { 14 for i := 0; i < len(x); i++ { 15 dst[i] = x[i] <= y[i] 16 } 17 } 18 19 func Gt_Go[T constraints.Float](dst []bool, x, y []T) { 20 for i := 0; i < len(x); i++ { 21 dst[i] = x[i] > y[i] 22 } 23 } 24 25 func Gte_Go[T constraints.Float](dst []bool, x, y []T) { 26 for i := 0; i < len(x); i++ { 27 dst[i] = x[i] >= y[i] 28 } 29 } 30 func Eq_Go[T constraints.Float](dst []bool, x, y []T) { 31 for i := 0; i < len(x); i++ { 32 dst[i] = x[i] == y[i] 33 } 34 } 35 36 func Neq_Go[T constraints.Float](dst []bool, x, y []T) { 37 for i := 0; i < len(x); i++ { 38 dst[i] = x[i] != y[i] 39 } 40 } 41 42 func LtNumber_Go[T constraints.Float](dst []bool, x []T, a T) { 43 for i := 0; i < len(x); i++ { 44 dst[i] = x[i] < a 45 } 46 } 47 48 func LteNumber_Go[T constraints.Float](dst []bool, x []T, a T) { 49 for i := 0; i < len(x); i++ { 50 dst[i] = x[i] <= a 51 } 52 } 53 54 func GtNumber_Go[T constraints.Float](dst []bool, x []T, a T) { 55 for i := 0; i < len(x); i++ { 56 dst[i] = x[i] > a 57 } 58 } 59 60 func GteNumber_Go[T constraints.Float](dst []bool, x []T, a T) { 61 for i := 0; i < len(x); i++ { 62 dst[i] = x[i] >= a 63 } 64 } 65 66 func EqNumber_Go[T constraints.Float](dst []bool, x []T, a T) { 67 for i := 0; i < len(x); i++ { 68 dst[i] = x[i] == a 69 } 70 } 71 72 func NeqNumber_Go[T constraints.Float](dst []bool, x []T, a T) { 73 for i := 0; i < len(x); i++ { 74 dst[i] = x[i] != a 75 } 76 }