[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27406 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27406 - gnunet/src/ats |
Date: |
Tue, 11 Jun 2013 10:20:33 +0200 |
Author: wachs
Date: 2013-06-11 10:20:33 +0200 (Tue, 11 Jun 2013)
New Revision: 27406
Modified:
gnunet/src/ats/gnunet-service-ats-solver_proportional.c
gnunet/src/ats/gnunet-service-ats-solver_proportional.h
Log:
docu
Modified: gnunet/src/ats/gnunet-service-ats-solver_proportional.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_proportional.c 2013-06-11
08:07:18 UTC (rev 27405)
+++ gnunet/src/ats/gnunet-service-ats-solver_proportional.c 2013-06-11
08:20:33 UTC (rev 27406)
@@ -310,38 +310,112 @@
};
+/**
+ * Wrapper for addresses to store them in network's linked list
+ */
struct AddressWrapper
{
+ /**
+ * Next in DLL
+ */
struct AddressWrapper *next;
+
+ /**
+ * Previous in DLL
+ */
struct AddressWrapper *prev;
+ /**
+ * The address
+ */
struct ATS_Address *addr;
};
+/**
+ * Preference client
+ */
struct PreferenceClient
{
+ /**
+ * Next in DLL
+ */
struct PreferenceClient *prev;
+
+ /**
+ * Next in DLL
+ */
+
struct PreferenceClient *next;
+
+ /**
+ * Client handle
+ */
void *client;
+ /**
+ * Total preference for this peer
+ */
double f_total[GNUNET_ATS_PreferenceCount];
+ /**
+ * List of peer preferences for this client
+ */
+
+ /**
+ * Head of peer list
+ */
struct PreferencePeer *p_head;
+
+ /**
+ * Tail of peer list
+ */
struct PreferencePeer *p_tail;
};
-
+/**
+ * Preference peer
+ */
struct PreferencePeer
{
+ /**
+ * Next in DLL
+ */
struct PreferencePeer *next;
+
+ /**
+ * Previous in DLL
+ */
struct PreferencePeer *prev;
+
+ /**
+ * Client
+ */
struct PreferenceClient *client;
+
+ /**
+ * Solver handle
+ */
struct GAS_PROPORTIONAL_Handle *s;
+
+ /**
+ * Peer id
+ */
struct GNUNET_PeerIdentity id;
+ /**
+ * Preference Values
+ */
double f[GNUNET_ATS_PreferenceCount];
+
+ /**
+ * Relative Preference Values
+ */
double f_rel[GNUNET_ATS_PreferenceCount];
+
+ /**
+ * Relative Total Preference Value
+ */
double f_rel_total;
GNUNET_SCHEDULER_TaskIdentifier aging_task;
Modified: gnunet/src/ats/gnunet-service-ats-solver_proportional.h
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_proportional.h 2013-06-11
08:07:18 UTC (rev 27405)
+++ gnunet/src/ats/gnunet-service-ats-solver_proportional.h 2013-06-11
08:20:33 UTC (rev 27406)
@@ -29,16 +29,13 @@
#include "gnunet-service-ats_addresses.h"
/**
- * ATS simplistic solver
+ * ATS proportional solver
*
* General description
*/
-
-
-
/**
- * Init the simplistic problem solving component
+ * Init the proportional problem solver
*
* Quotas:
* network[i] contains the network type as type GNUNET_ATS_NetworkType[i]
@@ -71,12 +68,12 @@
GAS_bandwidth_changed_cb bw_changed_cb,
void *bw_changed_cb_cls);
+
/**
- * Shutdown the simplistic problem solving component
+ * Shutdown the proportional problem solver
*
* @param solver the respective handle to shutdown
*/
-void
GAS_proportional_done (void * solver);
/**
@@ -89,9 +86,9 @@
*/
void
GAS_proportional_address_add (void *solver,
-
struct GNUNET_CONTAINER_MultiHashMap *addresses,
-
struct ATS_Address *address,
-
uint32_t network);
+ struct
GNUNET_CONTAINER_MultiHashMap *addresses,
+ struct ATS_Address
*address,
+ uint32_t network);
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27406 - gnunet/src/ats,
gnunet <=