private static double testGetNlinks(Properties props,
int startid1, int maxid1)
throws Exception {
RealDistribution rDist = new RealDistribution();
rDist.init(props, startid1, maxid1, DistributionType.LINKS);
ProbLinkDistribution dist = new ProbLinkDistribution(rDist);
int[] nlinks = new int[maxid1];
for (int i = startid1; i < maxid1; ++i) {
long x = dist.getNlinks(i);
if (x < 0) {
fail("x is negative: " + x + " for i=" + i);
}
nlinks[i] = (int)x;
}