数学计算
在Gremlin中有一个专门负责科学计算功能的step 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,签名功能
原文链接:https://blog.csdn.net/linlin1989117/article/details/82849477
https://tinkerpop.apache.org/docs/3.3.3/reference/#math-step