public double[] maxminWRT(String op, NodeVariable x, HashMap<NodeVariable, MessageQ> modifierTable) throws ParameterNotFoundException {
            //System.out.println("Sto vedendo se la variabile esiste");
            int xIndex = this.getParameterPosition(x);
            //System.out.println("Non ho lanciato l'eccezione, la variabile esiste tra i miei vicini.");
            // number of parameters of f
            int fzParametersNumber = this.parametersNumber();
            // at the i-th position there is the number of possible values of the i-th argument of f
            // at the position of x, there will be only one value available
            int[] numberOfValues = new int[fzParametersNumber];
            // the array filled with variable value positions that's gonna be evaluated
            int[] functionArgument = new int[fzParametersNumber];
            // maximization array, wrt x possible values

            double[] maxes = new double[x.size()];
            for (int index = 0; index < maxes.length; index++) {
                if (op.equals("max")){
                    maxes[index] = Double.NEGATIVE_INFINITY;
                }
                else if (op.equals("min")){
                    maxes[index] = Double.POSITIVE_INFINITY;
                }

            }

            for (int i = 0; i < fzParametersNumber; i++) {
                numberOfValues[i] = this.getParameter(i).size();
            }
            numberOfValues[xIndex] = 1;

            ///////////////////////
            int imax = numberOfValues.length - 1;
            int i = imax;
            while (i >= 0) {
                while (functionArgument[i] < numberOfValues[i] - 1) {
                    // here an array ready for being evaluated
                    /*if (op.equals("max")){
                        if (modifierTable == null){
                            maxes = this.maximize(maxes, functionArgument, x, xIndex);
                        }
                        else {
                            maxes = this.maximizeMod(maxes, functionArgument, x, xIndex, modifierTable);
                        }
                    }*/
                    maxes = this.maxmin(op, maxes, functionArgument, x, xIndex, modifierTable);
                    functionArgument[i]++;
                    for (int j = i + 1; j <= imax; j++) {
                        functionArgument[j] = 0;
                    }
                    i = imax;
                }
                i--;
            }
            // here an array ready for being evaluated
            maxes = this.maxmin(op, maxes, functionArgument, x, xIndex, modifierTable);
            //////////////////////

        return maxes;

    }