Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Scpecific request computing a raw
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Anthony  
View profile  
 More options Mar 2 2012, 10:16 am
From: Anthony <an.souq...@gmail.com>
Date: Fri, 2 Mar 2012 07:16:03 -0800 (PST)
Local: Fri, Mar 2 2012 10:16 am
Subject: Scpecific request computing a raw
I'm new Neo4j user and developper beginner.

I work on a graph that is composed of multiples parts.
Parts have subparts.
Each part and subparts have a weight.

How can i get the total weigth of a part composed by the weigth of
this part with the weigth of all subpart ?

I don't know neither Java nor Groovy.

Can you help me to choose the better way to begin ?

Thanks for your attention.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Adell  
View profile  
 More options Mar 2 2012, 12:34 pm
From: Josh Adell <josh.ad...@gmail.com>
Date: Fri, 2 Mar 2012 09:34:01 -0800 (PST)
Local: Fri, Mar 2 2012 12:34 pm
Subject: Re: Scpecific request computing a raw
I think you could do this with a Cypher query:

START part=node(123)   // Or look it up in an index
MATCH p = part-[:HAS_SUB_PART]->subpart
RETURN SUM( EXTRACT (n in nodes(p) : n.weight ) )

I might be a bit shaky on the syntax, but all the pieces should be
there.

-- Josh

On Mar 2, 10:16 am, Anthony <an.souq...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Mar 2 2012, 12:42 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Fri, 2 Mar 2012 18:42:33 +0100
Local: Fri, Mar 2 2012 12:42 pm
Subject: Re: [Neo4j] Re: Scpecific request computing a raw
Probably as the number of parts is not limited (it's a tree) use an variable length path "*0.."

> START part=node(123)   // Or look it up in an index
> MATCH p = part-[:HAS_SUB_PART*0..]->subpart
> RETURN SUM( EXTRACT (n in nodes(p) : n.weight ) )

Am 02.03.2012 um 18:34 schrieb Josh Adell:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Adell  
View profile  
 More options Mar 2 2012, 1:40 pm
From: Josh Adell <josh.ad...@gmail.com>
Date: Fri, 2 Mar 2012 10:40:13 -0800 (PST)
Local: Fri, Mar 2 2012 1:40 pm
Subject: Re: Scpecific request computing a raw
Ah yes. I thought it, I just didn't type it.

-- Josh

On Mar 2, 12:42 pm, Michael Hunger <michael.hun...@neotechnology.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anthony  
View profile  
 More options Mar 2 2012, 5:08 pm
From: Anthony <an.souq...@gmail.com>
Date: Fri, 2 Mar 2012 14:08:29 -0800 (PST)
Local: Fri, Mar 2 2012 5:08 pm
Subject: Re: Scpecific request computing a raw
Thanks for your reactivity.

The previous command help me but in my problem, there are
effectivities on relation.

Q1: How can I multiply effectivity with part weight ?

The ultimate goal should be to have : part weight = (subpart1.weight *
effectivity1) + (subpart2.weight * effectivity2) + ...

Q2: It's possible on cypher ?

One again, thanks.

On 2 mar, 19:40, Josh Adell <josh.ad...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Mar 2 2012, 5:28 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Fri, 2 Mar 2012 23:28:55 +0100
Local: Fri, Mar 2 2012 5:28 pm
Subject: Re: [Neo4j] Re: Scpecific request computing a raw
How deep is your tree at maximum?

Michael

Am 02.03.2012 um 23:08 schrieb Anthony:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andres Taylor  
View profile  
 More options Mar 2 2012, 8:44 pm
From: Andres Taylor <and...@neotechnology.com>
Date: Sat, 3 Mar 2012 02:44:11 +0100
Local: Fri, Mar 2 2012 8:44 pm
Subject: Re: [Neo4j] Re: Scpecific request computing a raw

On Fri, Mar 2, 2012 at 6:34 PM, Josh Adell <josh.ad...@gmail.com> wrote:
> I think you could do this with a Cypher query:

> START part=node(123)   // Or look it up in an index
> MATCH p = part-[:HAS_SUB_PART]->subpart
> RETURN SUM( EXTRACT (n in nodes(p) : n.weight ) )

We talked about this a few weeks ago, but it has not been implemented. You
are trying to aggregate over a collection of elements, and not aggregate
over sub graphs. And Cypher doesn't support that. :(

Andrés


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »