tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Frantz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP3-761) Some basic mathematical functions / steps
Date Mon, 03 Aug 2015 20:54:04 GMT

    [ https://issues.apache.org/jira/browse/TINKERPOP3-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652501#comment-14652501
] 

Matt Frantz commented on TINKERPOP3-761:
----------------------------------------

I'm not sure what the different {{mult}} overloads do.  Would the two-arg {{mult}} ignore
the traverser and multiply two values?  Or is it a reducing barrier step, and if so, what
is the second arg for?

For the add edge steps, what if all parameters are labels, and you use {{by}} to generalize?
{noformat}
...addOutE('knows', 'b', 'weight', 'w')
  .by()  // b
  .by('weight')  // w
...addOutE('a', 'knows', 'b', 'weight', 'w')
  .by() // a
  .by() // b
  .by('weight') // w
{noformat}


> Some basic mathematical functions / steps
> -----------------------------------------
>
>                 Key: TINKERPOP3-761
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-761
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.0-incubating
>            Reporter: Daniel Kuppitz
>            Assignee: Marko A. Rodriguez
>
> Every once in a while I wish to have steps for some basic mathematical operations ({{add()}},
{{sub()}}, {{mul()}}, {{div()}}). Since {{sub(num)}} is the same as {{add(-num)}} and {{div(num)}}
is the same as {{mul(1/num)}}, we would only need two new step implementations.
> Oh, and then there's also {{mod()}}, thus 3 new step implementations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message