Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: aggregation over two hierarchies

Re: aggregation over two hierarchies

From: <mikharakiri_nospaum_at_yahoo.com>
Date: 25 Feb 2005 09:05:03 -0800
Message-ID: <1109351103.380023.269960@g14g2000cwa.googlegroups.com>

navrsale wrote:
> thanks for observation. Here is a more complex example of data in the
> JOB table. Is this directed acyclic graph? Or cyclic as there is
> closure between 12-10-5-9-11-12 nodes and 16-15-12-11-9-0-14-16?

It's acyclic as directed graph and cyclic if you ignore directions.

> http://img23.exs.cx/my.php?loc=img23&image=directedgraph11th.png

Isn't it

1,2, and 10 merge into 5?
-----^^^^^^

> Each node must be visited and the value prorated in recursive
fashion:
> foreach node
> -start with a node, for example 16
> -visit each hierarchy on which 16 depends, in this case hierarchies
for
> 14 and 15, SUM their values and the current value of node 16, and
that
> will be new, prorated value for node 16
> -repeat this recursively for each sub-hierarchy
> until all nodes are prorated

Is it hierarchical total that you are trying to calculate? In graph terms its a flow from one node into the other. For all paths from one node into the other, calculate aggregate value along the each path (a flow along the path), and add the path values together. Received on Fri Feb 25 2005 - 11:05:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US