module Bottle::Trigonometry
Overview
A module primarily responsible for Tensor
and Matrix
trigonometric routines.
This module should be namespaced as part of the external API to provide user facing methods for creation.
Extended Modules
Direct including types
Defined in:
arrayops/trig.crInstance Method Summary
-
#acos(x1 : BaseArray)
Calculates the acos of a
Tensor
-
#acosh(x1 : BaseArray)
Calculates the acosh of a
Tensor
-
#asin(x1 : BaseArray)
Calculates the asin of a
Tensor
-
#asinh(x1 : BaseArray)
Calculates the asinh of a
Tensor
-
#atan(x1 : BaseArray)
Calculates the atan of a
Tensor
-
#atan2(x1 : BaseArray, x2 : BaseArray)
Computes the atan2 of two Tensors elementwise
-
#atan2(x1 : BaseArray, x2 : Number)
Computes the atan2 of a
Tensor
with a scalar elementwise -
#atan2(x1 : Number, x2 : BaseArray)
atan2s a scalar with a tensor elementwise.
-
#atan2
Returns the universal atan2 function.
-
#atanh(x1 : BaseArray)
Calculates the atanh of a
Tensor
-
#besselj(x1 : BaseArray, x2 : BaseArray)
Computes the besselj of two Tensors elementwise
-
#besselj(x1 : BaseArray, x2 : Number)
Computes the besselj of a
Tensor
with a scalar elementwise -
#besselj(x1 : Number, x2 : BaseArray)
besseljs a scalar with a tensor elementwise.
-
#besselj
Returns the universal besselj function.
-
#besselj0(x1 : BaseArray)
Calculates the besselj0 of a
Tensor
-
#besselj1(x1 : BaseArray)
Calculates the besselj1 of a
Tensor
-
#bessely(x1 : BaseArray, x2 : BaseArray)
Computes the bessely of two Tensors elementwise
-
#bessely(x1 : BaseArray, x2 : Number)
Computes the bessely of a
Tensor
with a scalar elementwise -
#bessely(x1 : Number, x2 : BaseArray)
besselys a scalar with a tensor elementwise.
-
#bessely
Returns the universal bessely function.
-
#bessely0(x1 : BaseArray)
Calculates the bessely0 of a
Tensor
-
#bessely1(x1 : BaseArray)
Calculates the bessely1 of a
Tensor
-
#cbrt(x1 : BaseArray)
Calculates the cbrt of a
Tensor
-
#copysign(x1 : BaseArray, x2 : BaseArray)
Computes the copysign of two Tensors elementwise
-
#copysign(x1 : BaseArray, x2 : Number)
Computes the copysign of a
Tensor
with a scalar elementwise -
#copysign(x1 : Number, x2 : BaseArray)
copysigns a scalar with a tensor elementwise.
-
#copysign
Returns the universal copysign function.
-
#cos(x1 : BaseArray)
Calculates the cos of a
Tensor
-
#cosh(x1 : BaseArray)
Calculates the cosh of a
Tensor
-
#degrees(x1 : BaseArray)
Convert angles from radians to degrees.
-
#erf(x1 : BaseArray)
Calculates the erf of a
Tensor
-
#erfc(x1 : BaseArray)
Calculates the erfc of a
Tensor
-
#exp(x1 : BaseArray)
Calculates the exp of a
Tensor
-
#exp2(x1 : BaseArray)
Calculates the exp2 of a
Tensor
-
#expm1(x1 : BaseArray)
Calculates the expm1 of a
Tensor
-
#frexp(x1 : BaseArray)
Calculates the frexp of a
Tensor
-
#gamma(x1 : BaseArray)
Calculates the gamma of a
Tensor
-
#hypot(x1 : BaseArray, x2 : BaseArray)
Computes the hypot of two Tensors elementwise
-
#hypot(x1 : BaseArray, x2 : Number)
Computes the hypot of a
Tensor
with a scalar elementwise -
#hypot(x1 : Number, x2 : BaseArray)
hypots a scalar with a tensor elementwise.
-
#hypot
Returns the universal hypot function.
-
#ilogb(x1 : BaseArray)
Calculates the ilogb of a
Tensor
-
#ldexp(x1 : BaseArray, x2 : BaseArray)
Computes the ldexp of two Tensors elementwise
-
#ldexp(x1 : BaseArray, x2 : Number)
Computes the ldexp of a
Tensor
with a scalar elementwise -
#ldexp(x1 : Number, x2 : BaseArray)
ldexps a scalar with a tensor elementwise.
-
#ldexp
Returns the universal ldexp function.
-
#lgamma(x1 : BaseArray)
Calculates the lgamma of a
Tensor
-
#log(x1 : BaseArray)
Calculates the log of a
Tensor
-
#log10(x1 : BaseArray)
Calculates the log10 of a
Tensor
-
#log1p(x1 : BaseArray)
Calculates the log1p of a
Tensor
-
#log2(x1 : BaseArray)
Calculates the log2 of a
Tensor
-
#logb(x1 : BaseArray)
Calculates the logb of a
Tensor
-
#radians(x1 : BaseArray)
Convert angles from degrees to radians
-
#sin(x1 : BaseArray)
Calculates the sin of a
Tensor
-
#sinh(x1 : BaseArray)
Calculates the sinh of a
Tensor
-
#sqrt(x1 : BaseArray)
Calculates the sqrt of a
Tensor
-
#tan(x1 : BaseArray)
Calculates the tan of a
Tensor
-
#tanh(x1 : BaseArray)
Calculates the tanh of a
Tensor
Macro Summary
Instance Method Detail
Calculates the acos of a Tensor
t1 = Tensor.new [1, 2, 3]
B.acos(t1)
Calculates the acosh of a Tensor
t1 = Tensor.new [1, 2, 3]
B.acosh(t1)
Calculates the asin of a Tensor
t1 = Tensor.new [1, 2, 3]
B.asin(t1)
Calculates the asinh of a Tensor
t1 = Tensor.new [1, 2, 3]
B.asinh(t1)
Calculates the atan of a Tensor
t1 = Tensor.new [1, 2, 3]
B.atan(t1)
Computes the atan2 of two Tensors elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.atan2(t1, t2)
Computes the atan2 of a Tensor
with a scalar
elementwise
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.atan2(t1, t2)
atan2s a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.atan2(x, t)
Returns the universal atan2 function. Used to apply outer operations, reductions, and accumulations to tensors
B.atan2 # =>
Calculates the atanh of a Tensor
t1 = Tensor.new [1, 2, 3]
B.atanh(t1)
Computes the besselj of two Tensors elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.besselj(t1, t2)
Computes the besselj of a Tensor
with a scalar
elementwise
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.besselj(t1, t2)
besseljs a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.besselj(x, t)
Returns the universal besselj function. Used to apply outer operations, reductions, and accumulations to tensors
B.besselj # =>
Calculates the besselj0 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.besselj0(t1)
Calculates the besselj1 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.besselj1(t1)
Computes the bessely of two Tensors elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.bessely(t1, t2)
Computes the bessely of a Tensor
with a scalar
elementwise
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.bessely(t1, t2)
besselys a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.bessely(x, t)
Returns the universal bessely function. Used to apply outer operations, reductions, and accumulations to tensors
B.bessely # =>
Calculates the bessely0 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.bessely0(t1)
Calculates the bessely1 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.bessely1(t1)
Calculates the cbrt of a Tensor
t1 = Tensor.new [1, 2, 3]
B.cbrt(t1)
Computes the copysign of two Tensors elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.copysign(t1, t2)
Computes the copysign of a Tensor
with a scalar
elementwise
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.copysign(t1, t2)
copysigns a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.copysign(x, t)
Returns the universal copysign function. Used to apply outer operations, reductions, and accumulations to tensors
B.copysign # =>
Calculates the cos of a Tensor
t1 = Tensor.new [1, 2, 3]
B.cos(t1)
Calculates the cosh of a Tensor
t1 = Tensor.new [1, 2, 3]
B.cosh(t1)
Convert angles from radians to degrees.
t = Tensor.new [0, 1, 2, 3] * (Math::PI / 6)
degrees(t) # => Tensor[ 0.0 30.0 60.0 90.0]
Calculates the erf of a Tensor
t1 = Tensor.new [1, 2, 3]
B.erf(t1)
Calculates the erfc of a Tensor
t1 = Tensor.new [1, 2, 3]
B.erfc(t1)
Calculates the exp of a Tensor
t1 = Tensor.new [1, 2, 3]
B.exp(t1)
Calculates the exp2 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.exp2(t1)
Calculates the expm1 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.expm1(t1)
Calculates the frexp of a Tensor
t1 = Tensor.new [1, 2, 3]
B.frexp(t1)
Calculates the gamma of a Tensor
t1 = Tensor.new [1, 2, 3]
B.gamma(t1)
Computes the hypot of two Tensors elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.hypot(t1, t2)
Computes the hypot of a Tensor
with a scalar
elementwise
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.hypot(t1, t2)
hypots a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.hypot(x, t)
Returns the universal hypot function. Used to apply outer operations, reductions, and accumulations to tensors
B.hypot # =>
Calculates the ilogb of a Tensor
t1 = Tensor.new [1, 2, 3]
B.ilogb(t1)
Computes the ldexp of two Tensors elementwise
t1 = Tensor.new [1, 2, 3]
t2 = Tensor.new [4, 5, 6]
B.ldexp(t1, t2)
Computes the ldexp of a Tensor
with a scalar
elementwise
t1 = Tensor.new [1, 2, 3]
t2 = 5
B.ldexp(t1, t2)
ldexps a scalar with a tensor elementwise.
x = 5
t = Tensor.new [1, 2, 3]
B.ldexp(x, t)
Returns the universal ldexp function. Used to apply outer operations, reductions, and accumulations to tensors
B.ldexp # =>
Calculates the lgamma of a Tensor
t1 = Tensor.new [1, 2, 3]
B.lgamma(t1)
Calculates the log of a Tensor
t1 = Tensor.new [1, 2, 3]
B.log(t1)
Calculates the log10 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.log10(t1)
Calculates the log1p of a Tensor
t1 = Tensor.new [1, 2, 3]
B.log1p(t1)
Calculates the log2 of a Tensor
t1 = Tensor.new [1, 2, 3]
B.log2(t1)
Calculates the logb of a Tensor
t1 = Tensor.new [1, 2, 3]
B.logb(t1)
Convert angles from degrees to radians
t = Tensor.new [30, 60, 90, 120]
radians(t) # => Tensor[ 0.524 1.047 1.571 2.094]
Calculates the sin of a Tensor
t1 = Tensor.new [1, 2, 3]
B.sin(t1)
Calculates the sinh of a Tensor
t1 = Tensor.new [1, 2, 3]
B.sinh(t1)
Calculates the sqrt of a Tensor
t1 = Tensor.new [1, 2, 3]
B.sqrt(t1)
Calculates the tan of a Tensor
t1 = Tensor.new [1, 2, 3]
B.tan(t1)
Calculates the tanh of a Tensor
t1 = Tensor.new [1, 2, 3]
B.tanh(t1)