Convenience function to max out all but one variable, and return the marginal array.

@return an array of doubles one-to-one with variable states for each variable
482520
public double[][] getMaxedMarginals() {
    double[][] maxValues = new double[neighborIndices.length][];
    for (int i = 0; i < neighborIndices.length; i++) {
      maxValues[i] = new double[getDimensions()[i]];
      for (int j = 0; j < maxValues[i].length; j++) maxValues[i][j] = Double.NEGATIVE_INFINITY;
    }

    // Get max values

    // OPTIMIZATION:
    // Rather than use the standard iterator, which creates lots of int[] arrays on the heap, which need to be GC'd,
    // we use the fast version that just mutates one array. Since this is read once for us here, this is ideal.

    Iterator<int[]> fastPassByReferenceIterator = fastPassByReferenceIterator();
    int[] assignment = fastPassByReferenceIterator.next();
    while (true) {
      double v = getAssignmentLogValue(assignment);
      for (int i = 0; i < neighborIndices.length; i++) {
        if (maxValues[i][assignment[i]] < v) maxValues[i][assignment[i]] = v;
      }
      // This mutates the resultAssignment[] array, rather than creating a new one
      if (fastPassByReferenceIterator.hasNext()) {
        fastPassByReferenceIterator.next();
      } else break;
    }

    for (int i = 0; i < neighborIndices.length; i++) {
      normalizeLogArr(maxValues[i]);
    }

    return maxValues;
  }
1321223
public double[][] getD() {
    double[][] D = new double[n][n];
    for(int i = 0; i < n; i++) {
      final double e_i = e[i];
      final double[] D_i = D[i];
      D_i[i] = d[i];
      if(e_i > 0) {
        D_i[i + 1] = e_i;
      }
      else if(e_i < 0) {
        D_i[i - 1] = e_i;
      } // else: e_i = 0
    }
    return D;
  }
347580
public double[] getDimensions(){

		double[] dim = new double[3];

		dim[0] = xmax-xmin;
		dim[1] = ymax-ymin;
		dim[2] = zmax-zmin;

		return dim;

	}
585029
public HashMap<Variable,Object> chooseValues() {
		MultiVariable mv = (MultiVariable)myVariable;
		Variable[] internalVars = mv.getInternalVariables();
		HashMap<Variable,Object> values = new HashMap<Variable,Object>();
		for (Variable v: internalVars) {
			if (v instanceof MultiVariable) {
				MultiVariable nestedMv = (MultiVariable)v;
				MultiDomain nestedMd = nestedMv.getDomain();
				HashMap<Variable,Object> nested = nestedMd.chooseValues();
				for (Entry<Variable,Object> e : nested.entrySet()) {
					values.put(e.getKey(), e.getValue());
				}
			}
			else {
				values.put(v,v.getDomain().chooseValue());
			}
		}
		return values;
	}
916249
public static double[] getMax(SpatialComparable box) {
    final int dim = box.getDimensionality();
    double[] max = new double[dim];
    for(int i = 0; i < dim; i++) {
      max[i] = box.getMax(i);
    }
    return max;
  }
453500
public List<Variable> variables() {
        List<Variable> result = new ArrayList<Variable>(inputVariables.size() + outputVariables.size());
        result.addAll(inputVariables);
        result.addAll(outputVariables);
        return result;
    }
596646
public double[][] getL() {
    double[][] L = new double[m][n];
    L[0][0] = 1.;
    for(int i = 1; i < m; i++) {
      final double[] Li = L[i];
      System.arraycopy(LU[i], 0, Li, 0, Math.min(i, n));
      if (i < n) {
        Li[i] = 1.;
      }
    }
    return L;
  }
753406
private double getMaxSelectedValue() {
        double max = Double.MIN_VALUE;

        for (int i = 0; i < this.measures.length; i++) {
            if (this.measures[i].getMaxValue(this.measureSelected) > max) {
                max = this.measures[i].getMaxValue(this.measureSelected);
            }
        }
        return max;
    }
449857
public static double[] getMaximumValues(Front front) {
    if (front == null) {
      throw new NullFrontException() ;
    } else if (front.getNumberOfPoints() == 0) {
      throw new EmptyFrontException() ;
    }

    int numberOfObjectives = front.getPoint(0).getDimension() ;

    double[] maximumValue = new double[numberOfObjectives];
    for (int i = 0; i < numberOfObjectives; i++) {
      maximumValue[i] = Double.NEGATIVE_INFINITY;
    }

    for (int i = 0 ; i < front.getNumberOfPoints(); i++) {
      for (int j = 0; j < numberOfObjectives; j++) {
        if (front.getPoint(i).getValue(j) > maximumValue[j]) {
          maximumValue[j] = front.getPoint(i).getValue(j);
        }
      }
    }

    return maximumValue;
  }
1007901
public static double max( double []array , int offset , int length ) {
		double max = -Double.MAX_VALUE;
		for (int i = 0; i < length; i++) {
			double tmp = array[offset+i];
			if( tmp > max ) {
				max = tmp;
			}
		}
		return max;
	}
163410
public double[] getMinMax(double[] array) {
		double[] minmax = new double[2];

		double max = Double.MIN_VALUE;
		double min = Double.MAX_VALUE;

		for(double value : array) {
			if(value > max) max = value;
			if(value < min) min = value;
		}

		minmax[0] = min;
		minmax[1] = max;
		return minmax;
	}
677546
public VariableRef[] getVariableRefs() {
        Collection<VariableRef> allRefs = new ArrayList<VariableRef>();
        fillVariableRefs(allRefs, this);
        return allRefs.toArray(new VariableRef[allRefs.size()]);
    }
1131245
private int remainingVars() {
        int res = maxvar();
        res -= this.stats.varsFixed;
        res -= this.stats.varsEquivalent;
        res -= this.stats.varsEliminated;
        return res;
    }
732331
@Override
	protected DoubleMatrix1D getUb() {
		if (this.limitedUb == null) {
			if (super.getUb() == null) {
				this.limitedUb = F1.make(getC().size(), maxUBValue);
			} else {
				this.limitedUb = F1.make(super.getUb().size());
				for (int i = 0; i < super.getUb().size(); i++) {
					double ubi = super.getUb().getQuick(i);
					if (maxUBValue < ubi) {
						log.warn("the " + i +"-th upper bound was limited form "+ubi+" to the value of maxUBValue: " + maxUBValue);
						limitedUb.setQuick(i, maxUBValue);
					} else {
						limitedUb.setQuick(i, ubi);
					}
				}
			}
		}
		return limitedUb;
	}
320748
public VariableRef[] getOutOfScopeVariableRefs() {
        Scope parent;
        if ((parent = getParent()) == null) {
            return new VariableRef[0];
        }

        Collection<VariableRef> allRefs = new ArrayList<VariableRef>();
        fillVariableRefs(allRefs, this);

        Collection<VariableRef> refs =
            new ArrayList<VariableRef>(allRefs.size());

        Iterator<VariableRef> it = allRefs.iterator();
        while (it.hasNext()) {
            VariableRef ref = it.next();
            Variable var = ref.getVariable();
            if (var != null &&
                parent.getDeclaredVariable(var.getName()) == var) {
                refs.add(ref);
            }
        }

        VariableRef[] refsArray = new VariableRef[refs.size()];
        return refs.toArray(refsArray);
    }
851895
public function getVariables()
    {
        $variableStats = [];

        foreach ($this->variablesToSkip as $branchNumber => $variables) {
            foreach ($variables as $variable => $one) {
                if (!isset($variableStats[$variable])) {
                    $variableStats[$variable] = 1;
                } else {
                    ++$variableStats[$variable];
                }
            }
        }

        $variables = [];
        $numberBranches = \count($this->branches);
        foreach ($variableStats as $variable => $number) {
            if ($number == $numberBranches) {
                $variables[] = $variable;
            }
        }

        return $variables;
    }
1143516
protected Set<?> getPrevExpandedRows() {
		Set<?> keys = getComponentModel().prevExpandedRows;
		if (keys == null) {
			return Collections.emptySet();
		} else {
			return Collections.unmodifiableSet(keys);
		}
	}