1 /* This file is in the public domain. */
4 * @brief Program to simulate results from #GCP_get_desirability_of_path()
5 * for various plausible inputs.
6 * @author Christian Grothoff
13 for (unsigned int num_alts = 1; num_alts < 10; num_alts++)
14 for (unsigned int off = 0; off < 10; off++)
15 for (double delta = -(int) off; delta <= 5; delta += 0.25)
20 weight_alts = -1.0 * num_alts / delta; /* discount alternative paths */
21 else if (delta >= 1.0)
22 weight_alts = 1.0 * num_alts * delta; /* overcount alternative paths */
24 weight_alts = 1.0 * num_alts; /* count alternative paths normally */
27 "Paths: %u Offset: %u Delta: %5.2f SCORE: %f\n",
31 ((off + 1.0) / (weight_alts * weight_alts)));