hello, 

l fixed the problem by adding a function called data_node() as follows :

function data_node(node)
 
  println("data     : ", node.data)
  println("index ", node.index)
end

for i in 1:nChildren
for k in 1:root.child[i].nchild
  data_node(root.child[i].child[k])
end
end


On Wednesday, June 29, 2016 at 4:53:55 PM UTC+2, Ahmed Mazari wrote:
>
> Hello ,
>  
>
> I need to implement a tree in Julia with depth of l=3. Initially the root 
> node has a vector of m=10000 random values (k=rand(m)).Then this vector is 
> divided into k=10 partitions where each node child has a vector of n=1000 
> values. Finally the leafs are connected to a given child node.
>
> each partition (child node) has 10 leafs where each leaf has a vector of 
> g= 100 values. Since each child node has a vector of 1000 values.this 
> latter is shared with its leafs 100 values for each leaf. so the structure 
> of the tree is as follows: 
>
>
>
> level 0 root node :                             vector of 10000 values
>
> level 1                                10 child node each one of 1000 
> values
>
> level 2                   10 leafs for each child node of 100 values (that 
> means we have in total we have 100 leafs )
>
>
>
> Thank you for helps
>

Reply via email to