boolean isSampleValid(double[] sample) {
        for (int i = 0; i < parameterNames.length; i++) {
            if (sample[i] < lowBound[i] || sample[i] > upBound[i]) {
                return false;
            }
        }
        return true;
    }