13 #include "network/type.hpp"
14 #include "mm/transition_graph.hpp"
15 #include "util/debug.hpp"
46 UBODT(
int buckets_arg,
int multiplier_arg);
80 const std::vector<NETWORK::Edge> &edges,
81 std::vector<int> *indices)
const;
109 static std::shared_ptr<UBODT>
read_ubodt_file(
const std::string &filename,
110 int multiplier = 50000);
117 static std::shared_ptr<UBODT>
read_ubodt_csv(
const std::string &filename,
118 int multiplier = 50000);
127 int multiplier = 50000);
146 const long long multiplier;
154 #endif //FMM_SRC_FMM_FFMM_UBODT_H_
unsigned int cal_bucket_index(NETWORK::NodeIndex source, NETWORK::NodeIndex target) const
Find the bucket index for an OD pair.
constexpr static double LOAD_FACTOR
factor measuring the average number of elements in a bucket.
std::vector< const TGNode * > TGOpath
The optimal path of nodes in the transition graph.
Record * look_up(NETWORK::NodeIndex source, NETWORK::NodeIndex target) const
Look up the row according to a source node and a target node.
static std::shared_ptr< UBODT > read_ubodt_binary(const std::string &filename, int multiplier=50000)
Read UBODT from a binary file.
C_Path construct_complete_path(const TGOpath &path, const std::vector< NETWORK::Edge > &edges, std::vector< int > *indices) const
Construct the complete path (a vector of edge ID) from an optimal path (a vector of optimal nodes in ...
double get_delta() const
Get the upperbound of the UBODT.
static int find_prime_number(double value)
Find a large prime number according to input value.
std::vector< FMM::NETWORK::EdgeID > C_Path
Complete path, ids of a sequence of topologically connected edges.
NETWORK::NodeIndex target
target node
static const int BUFFER_LINE
Number of characters to store in a line.
NETWORK::NodeIndex prev_n
last node visited before target
NETWORK::NodeIndex source
source node
static std::shared_ptr< UBODT > read_ubodt_csv(const std::string &filename, int multiplier=50000)
Read UBODT from a CSV file.
NETWORK::NodeIndex first_n
next node visited from source to target
static long estimate_ubodt_rows(const std::string &filename)
Estimate the number of rows in a file.
std::vector< NETWORK::EdgeIndex > look_sp_path(NETWORK::NodeIndex source, NETWORK::NodeIndex target) const
Look up a shortest path (SP) containing edges from source to target.
double cost
distance from source to target
static std::shared_ptr< UBODT > read_ubodt_file(const std::string &filename, int multiplier=50000)
Read UBODT from a file.
unsigned int NodeIndex
Node Index in the network, range from [0,num_vertices-1 ].
Record type of the upper bounded origin destination table
unsigned int EdgeIndex
Edge Index in the network, range from [0,num_edges-1 ].
NETWORK::EdgeIndex next_e
next edge visited from source to target
void insert(Record *r)
Insert a record into the hash table.
Upperbounded origin destination table.
Record * next
the next record stored in hashtable