13.数学运算
13.1、说明
在Gremlin中有一个专门负责科学计算功能的step math()。 math() 不同于常见的函数组合和嵌套形式,提供了一种易于读取的基于字符串的数学处理器。
-
math()支持by(),其中多个by()按照在math()运算表达式中首次引用变量的顺序应用。 -
保留变量
_是指传入math()的当前遍历器对象。
math()支持的运算符包括:+,-,*,/,%,^
math()支持的内嵌函数包括:abs: absolute value,绝对值acos: arc cosine,反余弦asin: arc sine,反正弦atan: arc tangent,反正切cbrt: cubic root,立方根ceil: nearest upper integer,向上最接近的整数cos: cosine,余弦cosh: hyperbolic cosine,双曲余弦exp: euler’s number raised to the power (e^x),以e为底的指数floor: nearest lower integer,向下最近接的整数log: logarithmus naturalis (base e),以e为底的对数log10: logarithm (base 10),以10为底的对数log2: logarithm (base 2),以2为底的对数sin: sine,正弦sinh: hyperbolic sine,双曲正弦sqrt: square root,平方根tan: tangent,正切tanh: hyperbolic tangent,双曲正切signum: signum function,签名功能
13.2、实例讲解
(待补充…)
这篇文章介绍了Gremlin中的math()函数,一个用于科学计算的步骤,它提供了基于字符串的易于阅读的数学处理,支持多种运算符和内嵌函数。文章还提到math()与by()的结合使用以及可能的实例演示。

3万+

被折叠的 条评论
为什么被折叠?



