tinkerpop-dev mailing list archives

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

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

Marko A. Rodriguez commented on TINKERPOP3-761:
-----------------------------------------------

I was thinking that we might have a more general pattern we need to realize. We sort of messed
up the mutation steps implementation --- {{addV}}, {{property}}, {{addOutE}}, etc. What did
we mess up? --- variables vs. values. I think the same problem will bite us with these steps
if we don't come up with a general pattern that we should use throughout such steps.

{code}
....as('a')....add('a')
...as('a')..as('b')...add('a','b')
...as('a')....add(2,'a')
....add(2)
...add(...max(), ...sum())
{code}

Variables + values + traversals. What is the general pattern we should use in Gremlin3 and
then propagate that to these math steps as well as to the mutation steps.

> 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