Package ai.rapids.cudf
Interface BinaryOperable
- All Known Implementing Classes:
ColumnVector,ColumnView,Scalar
public interface BinaryOperable
-
Method Summary
Modifier and TypeMethodDescriptiondefault ColumnVectoradd(BinaryOperable rhs) Add + operator.default ColumnVectoradd(BinaryOperable rhs, DType outType) Add one vector to another with the given output type.default ColumnVectorand(BinaryOperable rhs) Logical and (&&).default ColumnVectorand(BinaryOperable rhs, DType outType) Logical and (&&) with the given output type.default ColumnVectorarctan2(BinaryOperable xCoordinate) The function arctan2(y,x) or atan2(y,x) is defined as the angle in the Euclidean plane, given in radians, between the positive x axis and the ray to the point (x, y) ≠ (0, 0).default ColumnVectorarctan2(BinaryOperable xCoordinate, DType outType) The function arctan2(y,x) or atan2(y,x) is defined as the angle in the Euclidean plane, given in radians, between the positive x axis and the ray to the point (x, y) ≠ (0, 0).binaryOp(BinaryOp op, BinaryOperable rhs, DType outType) Multiple different binary operations.default ColumnVectorbitAnd(BinaryOperable rhs) Bit wise and (&).default ColumnVectorbitAnd(BinaryOperable rhs, DType outType) Bit wise and (&) with the given output type.default ColumnVectorbitOr(BinaryOperable rhs) Bit wise or (|).default ColumnVectorbitOr(BinaryOperable rhs, DType outType) Bit wise or (|) with the given output type.default ColumnVectorbitXor(BinaryOperable rhs) Bit wise xor (^).default ColumnVectorbitXor(BinaryOperable rhs, DType outType) Bit wise xor (^) with the given output type.default ColumnVectordiv(BinaryOperable rhs) Divide one vector by another.default ColumnVectordiv(BinaryOperable rhs, DType outType) Divide one vector by another with the given output type.default ColumnVectorequalTo(BinaryOperable rhs) this == rhs 1 is true 0 is false.default ColumnVectorequalTo(BinaryOperable rhs, DType outType) this == rhs 1 is true 0 is false with the output cast to the given type.default ColumnVectorlike equalTo but NULL == NULL is TRUE and NULL == not NULL is FALSEdefault ColumnVectorequalToNullAware(BinaryOperable rhs, DType outType) like equalTo but NULL == NULL is TRUE and NULL == not NULL is FALSEdefault ColumnVectorfloorDiv(BinaryOperable rhs) Divide one vector by another and calculate the floor of the result.default ColumnVectorfloorDiv(BinaryOperable rhs, DType outType) Divide one vector by another and calculate the floor of the result with the given output type.getType()Get the type of this data.default ColumnVectorthis >= rhs 1 is true 0 is false.default ColumnVectorgreaterOrEqualTo(BinaryOperable rhs, DType outType) this >= rhs 1 is true 0 is false with the output cast to the given type.default ColumnVectorthis > rhs 1 is true 0 is false.default ColumnVectorgreaterThan(BinaryOperable rhs, DType outType) this > rhs 1 is true 0 is false with the output cast to the given type.static DTypeimplicitConversion(BinaryOp op, BinaryOperable lhs, BinaryOperable rhs) Finds the proper DType for an implicit output.default ColumnVectorthis <= rhs 1 is true 0 is false.default ColumnVectorlessOrEqualTo(BinaryOperable rhs, DType outType) this <= rhs 1 is true 0 is false with the output cast to the given type.default ColumnVectorlessThan(BinaryOperable rhs) this < rhs 1 is true 0 is false.default ColumnVectorlessThan(BinaryOperable rhs, DType outType) this < rhs 1 is true 0 is false with the output cast to the given type.default ColumnVectorlog(BinaryOperable rhs) Calculate the log with the specified base, output is the same as this.default ColumnVectorlog(BinaryOperable rhs, DType outType) Calculate the log with the specified basedefault ColumnVectorReturns the max non null value.default ColumnVectormaxNullAware(BinaryOperable rhs, DType outType) Returns the max non null value.default ColumnVectorReturns the min non null value.default ColumnVectorminNullAware(BinaryOperable rhs, DType outType) Returns the min non null value.default ColumnVectormod(BinaryOperable rhs) Compute the modulus.default ColumnVectormod(BinaryOperable rhs, DType outType) Compute the modulus with the given output type.default ColumnVectormul(BinaryOperable rhs) Multiply two vectors together.default ColumnVectormul(BinaryOperable rhs, DType outType) Multiply two vectors together with the given output type.default ColumnVectornotEqualTo(BinaryOperable rhs) this != rhs 1 is true 0 is false.default ColumnVectornotEqualTo(BinaryOperable rhs, DType outType) this != rhs 1 is true 0 is false with the output cast to the given type.default ColumnVectorlike notEqualTo but NULL != NULL is TRUE and NULL != not NULL is FALSEdefault ColumnVectornotEqualToNullAware(BinaryOperable rhs, DType outType) like notEqualTo but NULL != NULL is TRUE and NULL != not NULL is FALSEdefault ColumnVectoror(BinaryOperable rhs) Logical or (||).default ColumnVectoror(BinaryOperable rhs, DType outType) Logical or (||) with the given output type.default ColumnVectorpmod(BinaryOperable rhs) Returns the positive value of lhs mod rhs.default ColumnVectorpmod(BinaryOperable rhs, DType outputType) Returns the positive value of lhs mod rhs.default ColumnVectorpow(BinaryOperable rhs) Compute the power.default ColumnVectorpow(BinaryOperable rhs, DType outType) Compute the power with the given output type.default ColumnVectorshiftLeft(BinaryOperable shiftBy) Bitwise left shift the values of this vector by the shiftBy.default ColumnVectorshiftLeft(BinaryOperable shiftBy, DType outType) Bitwise left shifts the values of this vector by shiftBy.default ColumnVectorshiftRight(BinaryOperable shiftBy) Bitwise right shift this vector by the shiftBy.default ColumnVectorshiftRight(BinaryOperable shiftBy, DType outType) Bitwise right shift this vector by the shiftBy.default ColumnVectorshiftRightUnsigned(BinaryOperable shiftBy) This method bitwise right shifts the values of this vector by the shiftBy.default ColumnVectorshiftRightUnsigned(BinaryOperable shiftBy, DType outType) This method bitwise right shifts the values of this vector by the shiftBy.default ColumnVectorsub(BinaryOperable rhs) Subtract one vector from another.default ColumnVectorsub(BinaryOperable rhs, DType outType) Subtract one vector from another with the given output type.default ColumnVectortrueDiv(BinaryOperable rhs) Divide one vector by another converting to FLOAT64 in between.default ColumnVectortrueDiv(BinaryOperable rhs, DType outType) Divide one vector by another converting to FLOAT64 in between with the given output type.
-
Method Details
-
implicitConversion
Finds the proper DType for an implicit output. This follows the typical rules of C++, Java, and most SQL implementations. FLOAT64/double > FLOAT32/float > INT64/long > INT32/int > INT16/short > INT8/byte/charCurrently most TIMESTAMPs are treated the same as INT64. TIMESTAMP_DAYS is treated the same as INT32. All time information is stripped from them. This may change in the future.
BOOL8 is treated like an INT8. Math on boolean operations makes little sense. If you want to stay as a BOOL8 you will need to explicitly specify the output type. For decimal types, DECIMAL32 and DECIMAL64 takes in another parameter `scale`. DType is created with scale=0 as scale is required. Dtype is discarded for binary operations for decimal types in cudf as a new DType is created for output type with the new scale.
-
getType
DType getType()Get the type of this data. -
binaryOp
Multiple different binary operations.- Parameters:
op- the operation to performrhs- the rhs of the operationoutType- the type of output you want.- Returns:
- the result
-
add
Add one vector to another with the given output type. this + rhs Output type is ignored for the operations between decimal types and it is always decimal type. -
add
Add + operator. this + rhs -
sub
Subtract one vector from another with the given output type. this - rhs Output type is ignored for the operations between decimal types and it is always decimal type. -
sub
Subtract one vector from another. this - rhs -
mul
Multiply two vectors together with the given output type. this * rhs Output type is ignored for the operations between decimal types and it is always decimal type. -
mul
Multiply two vectors together. this * rhs -
div
Divide one vector by another with the given output type. this / rhs Output type is ignored for the operations between decimal types and it is always decimal type. -
div
Divide one vector by another. this / rhs -
trueDiv
Divide one vector by another converting to FLOAT64 in between with the given output type. (double)this / (double)rhs -
trueDiv
Divide one vector by another converting to FLOAT64 in between. (double)this / (double)rhs -
floorDiv
Divide one vector by another and calculate the floor of the result with the given output type. Math.floor(this/rhs) -
floorDiv
Divide one vector by another and calculate the floor of the result. Math.floor(this/rhs) -
mod
Compute the modulus with the given output type. this % rhs -
mod
Compute the modulus. this % rhs -
pow
Compute the power with the given output type. Math.pow(this, rhs) -
pow
Compute the power. Math.pow(this, rhs) -
equalTo
this == rhs 1 is true 0 is false with the output cast to the given type. -
equalTo
this == rhs 1 is true 0 is false. The output type is BOOL8. -
notEqualTo
this != rhs 1 is true 0 is false with the output cast to the given type. -
notEqualTo
this != rhs 1 is true 0 is false. The output type is BOOL8. -
lessThan
this < rhs 1 is true 0 is false with the output cast to the given type. -
lessThan
this < rhs 1 is true 0 is false. The output type is BOOL8. -
greaterThan
this > rhs 1 is true 0 is false with the output cast to the given type. -
greaterThan
this > rhs 1 is true 0 is false. The output type is BOOL8. -
lessOrEqualTo
this <= rhs 1 is true 0 is false with the output cast to the given type. -
lessOrEqualTo
this <= rhs 1 is true 0 is false. The output type is BOOL8. -
greaterOrEqualTo
this >= rhs 1 is true 0 is false with the output cast to the given type. -
greaterOrEqualTo
this >= rhs 1 is true 0 is false. The output type is BOOL8. -
bitAnd
Bit wise and (&) with the given output type. this & rhs -
bitAnd
Bit wise and (&). this & rhs -
bitOr
Bit wise or (|) with the given output type. this | rhs -
bitOr
Bit wise or (|). this | rhs -
bitXor
Bit wise xor (^) with the given output type. this ^ rhs -
bitXor
Bit wise xor (^). this ^ rhs -
and
Logical and (&&) with the given output type. this && rhs -
and
Logical and (&&). this && rhs -
or
Logical or (||) with the given output type. this || rhs -
or
Logical or (||). this || rhs -
shiftLeft
Bitwise left shifts the values of this vector by shiftBy. If "this" and shiftBy are both vectors then, this[i] << shiftBy[i] If "this" is a scalar and shiftBy is a vector then returns a vector of size shiftBy.rows with the scalar << shiftBy[i] If "this" is a vector and shiftBy is a scalar then returns a vector of size this.rows with this[i] << shiftBy -
shiftLeft
Bitwise left shift the values of this vector by the shiftBy. If "this" and shiftBy are both vectors then, this[i] << shiftBy[i] If "this" is a scalar and shiftBy is a vector then returns a vector of size shiftBy.rows with the scalar << shiftBy[i] If "this" is a vector and shiftBy is a scalar then returns a vector of size this.rows with this[i] << shiftBy -
shiftRight
Bitwise right shift this vector by the shiftBy. If "this" and shiftBy are both vectors then, this[i] >> shiftBy[i] If "this" is a scalar and shiftBy is a vector then returns a vector of size shiftBy.rows with the scalar >> shiftBy[i] If "this" is a vector and shiftBy is a scalar then returns a vector of size this.rows with this[i] >> shiftBy -
shiftRight
Bitwise right shift this vector by the shiftBy. If "this" and shiftBy are both vectors then, this[i] >> shiftBy[i] If "this" is a scalar and shiftBy is a vector then returns a vector of size shiftBy.rows with the scalar >> shiftBy[i] If "this" is a vector and shiftBy is a scalar then returns a vector of size this.rows with this[i] >> shiftBy -
shiftRightUnsigned
This method bitwise right shifts the values of this vector by the shiftBy. This method always fills 0 irrespective of the sign of the number. If "this" and shiftBy are both vectors then, this[i] >>> shiftBy[i] If "this" is a scalar and shiftBy is a vector then returns a vector of size shiftBy.rows with the scalar >>> shiftBy[i] If "this" is a vector and shiftBy is a scalar then returns a vector of size this.rows with this[i] >>> shiftBy -
shiftRightUnsigned
This method bitwise right shifts the values of this vector by the shiftBy. This method always fills 0 irrespective of the sign of the number. If "this" and shiftBy are both vectors then, this[i] >>> shiftBy[i] If "this" is a scalar and shiftBy is a vector then returns a vector of size shiftBy.rows with the scalar >>> shiftBy[i] If "this" is a vector and shiftBy is a scalar then returns a vector of size this.rows with this[i] >>> shiftBy -
log
Calculate the log with the specified base -
log
Calculate the log with the specified base, output is the same as this. -
arctan2
The function arctan2(y,x) or atan2(y,x) is defined as the angle in the Euclidean plane, given in radians, between the positive x axis and the ray to the point (x, y) ≠ (0, 0). -
arctan2
The function arctan2(y,x) or atan2(y,x) is defined as the angle in the Euclidean plane, given in radians, between the positive x axis and the ray to the point (x, y) ≠ (0, 0). -
pmod
Returns the positive value of lhs mod rhs. r = lhs % rhs if r < 0 then (r + rhs) % rhs else r -
pmod
Returns the positive value of lhs mod rhs. r = lhs % rhs if r < 0 then (r + rhs) % rhs else r -
equalToNullAware
like equalTo but NULL == NULL is TRUE and NULL == not NULL is FALSE -
equalToNullAware
like equalTo but NULL == NULL is TRUE and NULL == not NULL is FALSE -
notEqualToNullAware
like notEqualTo but NULL != NULL is TRUE and NULL != not NULL is FALSE -
notEqualToNullAware
like notEqualTo but NULL != NULL is TRUE and NULL != not NULL is FALSE -
maxNullAware
Returns the max non null value. -
maxNullAware
Returns the max non null value. -
minNullAware
Returns the min non null value. -
minNullAware
Returns the min non null value.
-