code: private static List<MutableDoubleTuple> validate(
          Collection<? extends DoubleTuple> inputs,
          List<MutableDoubleTuple> results)
      {
          if (results == null)
          {
              results = new ArrayList<MutableDoubleTuple>(inputs.size());
              for (DoubleTuple input : inputs)
              {
                  results.add(DoubleTuples.create(input.getSize()));
              }
          }
          else
          {
              if (inputs.size() != results.size())
              {
                  throw new IllegalArgumentException(
                      "The number of inputs (" + inputs.size() + ") must " +
                      "be the same as the number of results " +
                      "(" + results.size() + ")");
              }
          }
          return results;
      }
docs: Validate the given results list. If the given results list
  is <code>null</code>, then a new results list will be created
  and returned, that contains one MutableDoubleTuple instance
  for each tuple from the inputs list, with the same size
  as the corresponding tuple from the input collection.<br>
  <br>
  If the result list is not <code>null</code>, then it must have the
  same size as the input collection, otherwise an
  <code>IllegalArgumentException</code> will be thrown.<br>
  <br>
  
  @param inputs The inputs
  @param results The results
  @return The results
  @throws IllegalArgumentException If the given results list is not
  <code>null</code>, and has a different size than the given inputs
  collection