module Bottle::BMath
Extended Modules
Direct including types
Defined in:
arrayops/math.crInstance Method Summary
-
#add(x1 : BaseArray, x2 : BaseArray) forall U
adds two tensors with each other elementwise
-
#add(x1 : BaseArray, x2 : Number)
adds a tensor with a scalar elementwise.
-
#add(x1 : Number, x2 : BaseArray)
adds a scalar with a tensor elementwise.
-
#add
Returns the universal add function.
-
#divide(x1 : BaseArray, x2 : BaseArray) forall U
divides two tensors with each other elementwise
-
#divide(x1 : BaseArray, x2 : Number)
divides a tensor with a scalar elementwise.
-
#divide(x1 : Number, x2 : BaseArray)
divides a scalar with a tensor elementwise.
-
#divide
Returns the universal divide function.
-
#equal(x1 : BaseArray, x2 : BaseArray) forall U
equals two tensors with each other elementwise
-
#equal(x1 : BaseArray, x2 : Number)
equals a tensor with a scalar elementwise.
-
#equal(x1 : Number, x2 : BaseArray)
equals a scalar with a tensor elementwise.
-
#equal
Returns the universal equal function.
-
#floordiv(x1 : BaseArray, x2 : BaseArray) forall U
floordivs two tensors with each other elementwise
-
#floordiv(x1 : BaseArray, x2 : Number)
floordivs a tensor with a scalar elementwise.
-
#floordiv(x1 : Number, x2 : BaseArray)
floordivs a scalar with a tensor elementwise.
-
#floordiv
Returns the universal floordiv function.
-
#greater(x1 : BaseArray, x2 : BaseArray) forall U
greaters two tensors with each other elementwise
-
#greater(x1 : BaseArray, x2 : Number)
greaters a tensor with a scalar elementwise.
-
#greater(x1 : Number, x2 : BaseArray)
greaters a scalar with a tensor elementwise.
-
#greater
Returns the universal greater function.
-
#greater_equal(x1 : BaseArray, x2 : BaseArray) forall U
greater_equals two tensors with each other elementwise
-
#greater_equal(x1 : BaseArray, x2 : Number)
greater_equals a tensor with a scalar elementwise.
-
#greater_equal(x1 : Number, x2 : BaseArray)
greater_equals a scalar with a tensor elementwise.
-
#greater_equal
Returns the universal greater_equal function.
-
#less(x1 : BaseArray, x2 : BaseArray) forall U
lesss two tensors with each other elementwise
-
#less(x1 : BaseArray, x2 : Number)
lesss a tensor with a scalar elementwise.
-
#less(x1 : Number, x2 : BaseArray)
lesss a scalar with a tensor elementwise.
-
#less
Returns the universal less function.
-
#less_equal(x1 : BaseArray, x2 : BaseArray) forall U
less_equals two tensors with each other elementwise
-
#less_equal(x1 : BaseArray, x2 : Number)
less_equals a tensor with a scalar elementwise.
-
#less_equal(x1 : Number, x2 : BaseArray)
less_equals a scalar with a tensor elementwise.
-
#less_equal
Returns the universal less_equal function.
-
#modulo(x1 : BaseArray, x2 : BaseArray) forall U
modulos two tensors with each other elementwise
-
#modulo(x1 : BaseArray, x2 : Number)
modulos a tensor with a scalar elementwise.
-
#modulo(x1 : Number, x2 : BaseArray)
modulos a scalar with a tensor elementwise.
-
#modulo
Returns the universal modulo function.
-
#multiply(x1 : BaseArray, x2 : BaseArray) forall U
multiplys two tensors with each other elementwise
-
#multiply(x1 : BaseArray, x2 : Number)
multiplys a tensor with a scalar elementwise.
-
#multiply(x1 : Number, x2 : BaseArray)
multiplys a scalar with a tensor elementwise.
-
#multiply
Returns the universal multiply function.
-
#power(x1 : BaseArray, x2 : BaseArray) forall U
powers two tensors with each other elementwise
-
#power(x1 : BaseArray, x2 : Number)
powers a tensor with a scalar elementwise.
-
#power(x1 : Number, x2 : BaseArray)
powers a scalar with a tensor elementwise.
-
#power
Returns the universal power function.
-
#subtract(x1 : BaseArray, x2 : BaseArray) forall U
subtracts two tensors with each other elementwise
-
#subtract(x1 : BaseArray, x2 : Number)
subtracts a tensor with a scalar elementwise.
-
#subtract(x1 : Number, x2 : BaseArray)
subtracts a scalar with a tensor elementwise.
-
#subtract
Returns the universal subtract function.
Macro Summary
Instance Method Detail
adds two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.add(t1, t2)
adds a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.add(t1, t2)
adds a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.add(x, t)
Returns the universal add function. Used to apply outer operations, reductions, and accumulations to tensors
B.add # =>
divides two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.divide(t1, t2)
divides a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.divide(t1, t2)
divides a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.divide(x, t)
Returns the universal divide function. Used to apply outer operations, reductions, and accumulations to tensors
B.divide # =>
equals two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.equal(t1, t2)
equals a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.equal(t1, t2)
equals a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.equal(x, t)
Returns the universal equal function. Used to apply outer operations, reductions, and accumulations to tensors
B.equal # =>
floordivs two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.floordiv(t1, t2)
floordivs a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.floordiv(t1, t2)
floordivs a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.floordiv(x, t)
Returns the universal floordiv function. Used to apply outer operations, reductions, and accumulations to tensors
B.floordiv # =>
greaters two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.greater(t1, t2)
greaters a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.greater(t1, t2)
greaters a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.greater(x, t)
Returns the universal greater function. Used to apply outer operations, reductions, and accumulations to tensors
B.greater # =>
greater_equals two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.greater_equal(t1, t2)
greater_equals a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.greater_equal(t1, t2)
greater_equals a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.greater_equal(x, t)
Returns the universal greater_equal function. Used to apply outer operations, reductions, and accumulations to tensors
B.greater_equal # =>
lesss two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.less(t1, t2)
lesss a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.less(t1, t2)
lesss a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.less(x, t)
Returns the universal less function. Used to apply outer operations, reductions, and accumulations to tensors
B.less # =>
less_equals two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.less_equal(t1, t2)
less_equals a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.less_equal(t1, t2)
less_equals a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.less_equal(x, t)
Returns the universal less_equal function. Used to apply outer operations, reductions, and accumulations to tensors
B.less_equal # =>
modulos two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.modulo(t1, t2)
modulos a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.modulo(t1, t2)
modulos a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.modulo(x, t)
Returns the universal modulo function. Used to apply outer operations, reductions, and accumulations to tensors
B.modulo # =>
multiplys two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.multiply(t1, t2)
multiplys a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.multiply(t1, t2)
multiplys a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.multiply(x, t)
Returns the universal multiply function. Used to apply outer operations, reductions, and accumulations to tensors
B.multiply # =>
powers two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.power(t1, t2)
powers a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.power(t1, t2)
powers a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.power(x, t)
Returns the universal power function. Used to apply outer operations, reductions, and accumulations to tensors
B.power # =>
subtracts two tensors with each other elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.subtract(t1, t2)
subtracts a tensor with a scalar elementwise.
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.subtract(t1, t2)
subtracts a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.subtract(x, t)
Returns the universal subtract function. Used to apply outer operations, reductions, and accumulations to tensors
B.subtract # =>