public static int expectedSizeOfProbabilityTable(RandomVariable... vars){
  int expectedSizeOfDistribution=1;
  if (null != vars) {
    for (    RandomVariable rv : vars) {
      if (!(rv.getDomain() instanceof FiniteDomain)) {
        throw new IllegalArgumentException("Cannot have an infinite domain for a variable in this calculation:" + rv);
      }
      FiniteDomain d=(FiniteDomain)rv.getDomain();
      expectedSizeOfDistribution*=d.size();
    }
  }
  return expectedSizeOfDistribution;
}

public static int expectedSizeOfProbabilityTable ( RandomVariable ... vars ) { int expectedSizeOfDistribution = 1 ; if ( null != vars ) { for ( RandomVariable rv : vars ) { if ( ! ( rv . getDomain ( ) instanceof FiniteDomain ) ) { throw new IllegalArgumentException ( "Cannot have an infinite domain for a variable in this calculation:" + rv ) ; } FiniteDomain d = ( FiniteDomain ) rv . getDomain ( ) ; expectedSizeOfDistribution *= d . size ( ) ; } } return expectedSizeOfDistribution ; }
calculated the expected size of a probabilitytable for the provided random variables .
