module Bottle::Binary

Extended Modules

Direct including types

Defined in:

arrayops/binary.cr

Instance Method Summary

Macro Summary

Instance Method Detail

def bitwise_and(x1 : BaseArray, x2 : BaseArray) #

bitwise_ands two tensors with each other elementwise

t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]

B.bitwise_and(t1, t2)

[View source]
def bitwise_and(x1 : BaseArray, x2 : Number) #

bitwise_ands a tensor with a scalar elementwise.

t1 = Tensor.new [1, 2, 3]
t2 = 5

B.bitwise_and(t1, t2)

[View source]
def bitwise_and(x1 : Number, x2 : BaseArray) #

bitwise_ands a scalar with a tensor elementwise.

x = 5
t = Tensor.new [1, 2, 3]

B.bitwise_and(x, t)

[View source]
def bitwise_or(x1 : BaseArray, x2 : BaseArray) #

bitwise_ors two tensors with each other elementwise

t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]

B.bitwise_or(t1, t2)

[View source]
def bitwise_or(x1 : BaseArray, x2 : Number) #

bitwise_ors a tensor with a scalar elementwise.

t1 = Tensor.new [1, 2, 3]
t2 = 5

B.bitwise_or(t1, t2)

[View source]
def bitwise_or(x1 : Number, x2 : BaseArray) #

bitwise_ors a scalar with a tensor elementwise.

x = 5
t = Tensor.new [1, 2, 3]

B.bitwise_or(x, t)

[View source]
def bitwise_xor(x1 : BaseArray, x2 : BaseArray) #

bitwise_xors two tensors with each other elementwise

t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]

B.bitwise_xor(t1, t2)

[View source]
def bitwise_xor(x1 : BaseArray, x2 : Number) #

bitwise_xors a tensor with a scalar elementwise.

t1 = Tensor.new [1, 2, 3]
t2 = 5

B.bitwise_xor(t1, t2)

[View source]
def bitwise_xor(x1 : Number, x2 : BaseArray) #

bitwise_xors a scalar with a tensor elementwise.

x = 5
t = Tensor.new [1, 2, 3]

B.bitwise_xor(x, t)

[View source]
def left_shift(x1 : BaseArray, x2 : BaseArray) #

left_shifts two tensors with each other elementwise

t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]

B.left_shift(t1, t2)

[View source]
def left_shift(x1 : BaseArray, x2 : Number) #

left_shifts a tensor with a scalar elementwise.

t1 = Tensor.new [1, 2, 3]
t2 = 5

B.left_shift(t1, t2)

[View source]
def left_shift(x1 : Number, x2 : BaseArray) #

left_shifts a scalar with a tensor elementwise.

x = 5
t = Tensor.new [1, 2, 3]

B.left_shift(x, t)

[View source]
def right_shift(x1 : BaseArray, x2 : BaseArray) #

right_shifts two tensors with each other elementwise

t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]

B.right_shift(t1, t2)

[View source]
def right_shift(x1 : BaseArray, x2 : Number) #

right_shifts a tensor with a scalar elementwise.

t1 = Tensor.new [1, 2, 3]
t2 = 5

B.right_shift(t1, t2)

[View source]
def right_shift(x1 : Number, x2 : BaseArray) #

right_shifts a scalar with a tensor elementwise.

x = 5
t = Tensor.new [1, 2, 3]

B.right_shift(x, t)

[View source]

Macro Detail

macro binary_op(operator, name) #

[View source]