22 #ifndef NLSR_ROUTING_TABLE_CALCULATOR_HPP 23 #define NLSR_ROUTING_TABLE_CALCULATOR_HPP 29 #include <boost/cstdint.hpp> 31 #include <ndn-cxx/name.hpp> 132 , EMPTY_PARENT(-12345)
133 , INF_DISTANCE(2147483647)
135 , NO_NEXT_HOP(-12345)
147 doDijkstraPathCalculation(
int sourceRouter);
159 sortQueueByDistance(
int* Q,
double* dist,
int start,
int element);
168 isNotExplored(
int* Q,
int u,
int start,
int element);
172 Map& pMap, uint32_t sourceRouter);
179 getLsNextHop(
int dest,
int source);
197 const int EMPTY_PARENT;
198 const double INF_DISTANCE;
199 const int NO_MAPPING_NUM;
200 const int NO_NEXT_HOP;
212 , m_isDryRun(isDryRun)
213 , m_thisRouterName(thisRouterName)
222 getHyperbolicDistance(
Map& map,
Lsdb& lsdb, ndn::Name src, ndn::Name dest);
225 addNextHop(ndn::Name destinationRouter, std::string faceUri,
double cost,
RoutingTable& rt);
228 calculateHyperbolicDistance(
double rI,
double rJ,
double deltaTheta);
231 calculateAngularDistance(std::vector<double> angleVectorI,
232 std::vector<double> angleVectorJ);
236 const bool m_isDryRun;
237 const ndn::Name m_thisRouterName;
239 static const double MATH_PI;
240 static const double UNKNOWN_DISTANCE;
241 static const double UNKNOWN_RADIUS;
246 #endif // NLSR_ROUTING_TABLE_CALCULATOR_HPP
void getLinksFromAdjMatrix(int *links, double *linkCosts, int source)
Populates temp. variables with the link costs for some router.
void makeAdjMatrix(Nlsr &pnlsr, Map pMap)
Constructs an adj. matrix to calculate with.
void allocateAdjMatrix()
Allocate the space needed for the adj. matrix.
void adjustAdMatrix(int source, int link, double linkCost)
Adjust a link cost in the adj. matrix.
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
void initMatrix()
Zero every cell of the matrix to ensure that the memory is safe.
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
RoutingTableCalculator(size_t nRouters)
HyperbolicRoutingCalculator(size_t nRouters, bool isDryRun, ndn::Name thisRouterName)
int getNumOfLinkfromAdjMatrix(int sRouter)
Returns how many links a router in the matrix has.
LinkStateRoutingTableCalculator(size_t nRouters)