21 #ifndef NLSR_ROUTING_TABLE_CALCULATOR_HPP
22 #define NLSR_ROUTING_TABLE_CALCULATOR_HPP
142 doDijkstraPathCalculation(
int sourceRouter);
157 sortQueueByDistance(
int* Q,
double* dist,
int start,
int element);
166 isNotExplored(
int* Q,
int u,
int start,
int element);
170 Map& pMap, uint32_t sourceRouter);
177 getLsNextHop(
int dest,
int source);
203 : m_nRouters(nRouters)
204 , m_isDryRun(isDryRun)
205 , m_thisRouterName(thisRouterName)
214 getHyperbolicDistance(
Lsdb& lsdb, ndn::Name src, ndn::Name dest);
217 addNextHop(ndn::Name destinationRouter, std::string faceUri,
double cost,
RoutingTable& rt);
220 calculateHyperbolicDistance(
double rI,
double rJ,
double deltaTheta);
223 calculateAngularDistance(std::vector<double> angleVectorI,
224 std::vector<double> angleVectorJ);
227 const size_t m_nRouters;
228 const bool m_isDryRun;
229 const ndn::Name m_thisRouterName;
A class to house all the configuration parameters for NLSR.
void calculatePath(Map &map, RoutingTable &rt, Lsdb &lsdb, AdjacencyList &adjacencies)
HyperbolicRoutingCalculator(size_t nRouters, bool isDryRun, ndn::Name thisRouterName)
LinkStateRoutingTableCalculator(size_t nRouters)
void calculatePath(Map &pMap, RoutingTable &rt, ConfParameter &confParam, const Lsdb &lsdb)
void initMatrix()
set NON_ADJACENT_COST i.e. -12345 to every cell of the matrix to ensure that the memory is safe....
int getNumOfLinkfromAdjMatrix(int sRouter)
Returns how many links a router in the matrix has.
RoutingTableCalculator(size_t nRouters)
void adjustAdMatrix(int source, int link, double linkCost)
Adjust a link cost in the adj. matrix.
void allocateAdjMatrix()
Allocate the space needed for the adj. matrix.
void makeAdjMatrix(const Lsdb &lsdb, Map &pMap)
Constructs an adj. matrix to calculate with.
void writeAdjMatrixLog(const Map &map) const
Writes a formated adjacent matrix to DEBUG log.
void getLinksFromAdjMatrix(int *links, double *linkCosts, int source)
Populates temp. variables with the link costs for some router.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.