*/
/**
- * @file transport/gnunet-service-transport_ats.c
- * @brief automatic transport selection
+ * @file ats/gnunet-service-ats_math.c
+ * @brief automatic transport selection, LP code
* @author Matthias Wachs
*
*/
/**
* Initialize ATS
- * @param cfg configuration handle to retrieve configuration (to be removed)
* @return
*/
-
struct ATS_Handle *
ats_init (double D, double U, double R, int v_b_min, int v_n_min,
int max_iterations, struct GNUNET_TIME_Relative max_duration,
- GNUNET_TRANSPORT_ATS_AddressNotification address_not,
- GNUNET_TRANSPORT_ATS_ResultCallback res_cb)
+ GNUNET_ATS_AddressNotification address_not,
+ GNUNET_ATS_ResultCallback res_cb)
{
struct ATS_Handle *ats = NULL;
{
ia[array_index] = row_index;
ja[array_index] = c2;
- if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY)
+ if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DELAY)
{
double v0 = 0, v1 = 0, v2 = 0;
value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0);
value = 1;
}
- if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE)
+ if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DISTANCE)
{
double v0 = 0, v1 = 0, v2 = 0;
GNUNET_assert (ats->mechanisms[c2].addr != NULL);
GNUNET_assert (ats->mechanisms[c2].peer != NULL);
- if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY)
+ if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DELAY)
{
double v0 = 0, v1 = 0, v2 = 0;
value = 100.0 / ((v0 + 2 * v1 + 3 * v2) / 6.0);
//value = 1;
}
- if (qm[c - 1].atis_index == GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE)
+ if (qm[c - 1].atis_index == GNUNET_ATS_QUALITY_NET_DISTANCE)
{
double v0 = 0, v1 = 0, v2 = 0;