VRPH
1.0
|
#include <VRPRoute.h>
Public Member Functions | |
VRPRouteWarehouse () | |
VRPRouteWarehouse (int h_size) | |
~VRPRouteWarehouse () | |
void | remove_route (int hash_val, int hash_val2) |
int | add_route (VRPRoute *R) |
void | liquidate () |
Public Attributes | |
int | hash_table_size |
int | num_unique_routes |
struct htable_entry * | hash_table |
Definition at line 71 of file VRPRoute.h.
Default constructor for the route warehouse.
Definition at line 141 of file VRPRoute.cpp.
VRPRouteWarehouse::VRPRouteWarehouse | ( | int | h_size | ) |
Constructor for the rote warehouse with h_size entries in the hash table. Best if h_size is a power of 2.
Definition at line 152 of file VRPRoute.cpp.
Destructor for the route warehouse.
Definition at line 171 of file VRPRoute.cpp.
int VRPRouteWarehouse::add_route | ( | VRPRoute * | R | ) |
Adds the given route R to the warehouse, returning true if the addition is made and false otherwise.
Definition at line 248 of file VRPRoute.cpp.
void VRPRouteWarehouse::liquidate | ( | ) |
Clears the hash table, removing all routes from the WH.
Definition at line 181 of file VRPRoute.cpp.
void VRPRouteWarehouse::remove_route | ( | int | hash_val, |
int | hash_val2 | ||
) |
Removes a particular route from the hash table, using the second hash value to remove the correct entry if we have duplicates at the same location in the table.
Definition at line 194 of file VRPRoute.cpp.
Definition at line 80 of file VRPRoute.h.
Definition at line 78 of file VRPRoute.h.
Definition at line 79 of file VRPRoute.h.