code: public final int getNumberOfPossibleAssignments() {
      int[] sizes = getVariableSizes();
      int numAssignments = 1;
      for (int i = 0; i < sizes.length; i++) {
        numAssignments *= sizes[i];
      }
      return numAssignments;
    }
docs: Gets an array containing the number of possible joint assignments
  to the variables in {@code this}. Requires all {@code Variable}s
  in this to be {@code DiscreteVariable}s.
  
  @return