50 maximum=minimum+(
uint)pow(2.0,(
double)
N)-1;
57 cerr<<
"Couldn't add childL"<<endl; exit(-1);
62 cerr<<
"Couldn't add childR"<<endl; exit(-1);
64 childR->
addLayers(N,vals,minimum+(maximum-minimum+1)/2);
67 val=childL->
val*childR->
val;
68 cout<<
"layer="<<N<<
", minimum="<<minimum<<
", maximum="<<maximum<<
", val="<<val<<endl;
74 if (childL==NULL & childR==NULL)
75 if ((whichNode==maximum) & (whichNode==minimum)){
85 if ((whichNode<childL->minimum) | (whichNode>childL->
maximum)){
95 if ((whichNode<childR->minimum) | (whichNode>childR->
maximum)){
int multiply(uint whichNode)
void addLayers(uint N, int *vals, uint minimumIn=1)