-
… // evaluate min(x0,x1), max(x0,x1) and midrange double min = x[0]; double max = x[1]; …
min = x[1]; max = x[0]; } double midrange = (max + min)/2.0; double output = 0.0; …
= 0.0; if (x[2] >= min && x[2] < midrange) output = 1.0; if (x[2] >= midrange …
-
…min(x,y,z), max(x,y,z), midleValue(x,y,z), midrange1, midrange2 // // evaluate min(x,y,z) …
argmax) midleValue = x[1]; // evaluate midrange1 and midrange2 double midrange1 = (min + …
midleValue)/2.0; double midrange2 = (midleValue + max)/2.0; double output = …
else if (x[3] >= min && x[3] < midrange1) output = 1.0; else if (x[3] >= …
midrange1 && x[3] < midrange2) output = 2.0; else if (x[3] >= …