code: private void add(Constraint constr, int... ind)
  	{
  		assert ind.length > 0;
  		assert constr.getVariableSize() == ind.length;
  
  		for (int i = 0; i < (constr.canGenerate() ? ind.length - 1 : ind.length); i++)
  		{
  			assert ind[i] <= lastIndex;
  		}
  
  		constraints.add(new MappedConst(constr, ind));
  
  		if (constr.canGenerate() && ind[ind.length - 1] > lastIndex)
  		{
  			if (ind[ind.length - 1] - lastIndex > 1) throw new IllegalArgumentException(
  				"Generated index too large. Attempting to generate index " + ind[ind.length - 1] +
  					" while last index is " + lastIndex);
  
  			else lastIndex++;
  		}
  	}
docs: Creates a mapped constraint with the given constraint and the indexes it applies.
  @param constr constraint to add
  @param ind indices to map the constraint to the element in the pattern