Class Entry represents a dictionary containing current estimated values for forwarding a packet to the given mac.
More...
|
def | __init__ (self, dst_ip, neighbors_list) |
| Constructor. More...
|
|
def | init_values (self) |
| Initialize the first estimation values for the freshly added actions/neighbors. More...
|
|
def | update_neighbors (self, neighbors_list) |
| Update the list of neighbors, according to a given neighbors list. More...
|
|
def | update_value (self, mac, reward) |
| Update estimation value on the action (mac) by the given reward. More...
|
|
def | calc_avg_value (self) |
| Calculate and output the average of estimation values of this entry itself. More...
|
|
Class Entry represents a dictionary containing current estimated values for forwarding a packet to the given mac.
def RouteTable.Entry.__init__ |
( |
|
self, |
|
|
|
dst_ip, |
|
|
|
neighbors_list |
|
) |
| |
Constructor.
- Parameters
-
self | The object pointer. |
dst_ip | Destination IP address of the route. |
neighbors_list | List of MAC addresses of currently accessible direct neighbors. |
- Returns
- None
def RouteTable.Entry.calc_avg_value |
( |
|
self | ) |
|
Calculate and output the average of estimation values of this entry itself.
Initialize the first estimation values for the freshly added actions/neighbors.
- Parameters
-
- Returns
- Average estimation value: sum(self.values()) / len(self).
def RouteTable.Entry.init_values |
( |
|
self | ) |
|
Initialize the first estimation values for the freshly added actions/neighbors.
- Parameters
-
- Returns
- None
def RouteTable.Entry.update_neighbors |
( |
|
self, |
|
|
|
neighbors_list |
|
) |
| |
Update the list of neighbors, according to a given neighbors list.
- Parameters
-
self | The object pointer. |
neighbors_list | List of MAC addresses of currently accessible direct neighbors. |
- Returns
- None
def RouteTable.Entry.update_value |
( |
|
self, |
|
|
|
mac, |
|
|
|
reward |
|
) |
| |
Update estimation value on the action (mac) by the given reward.
- Parameters
-
self | The object pointer. |
mac | MAC address of the neighbor (action ID). |
reward | Reward value to be assigned. |
- Returns
- None
Destination IP address of the route.
RouteTable.Entry.local_neighbor_list |
Store a copy of the initial list of direct neighbors.
RouteTable.Entry.value_estimator |
The documentation for this class was generated from the following file: