added isFlat function to functions annexe (and getMax, getMin and getMean)