22 #ifndef NLSR_ROUTING_TABLE_CALCULATOR_HPP 23 #define NLSR_ROUTING_TABLE_CALCULATOR_HPP 31 #include <boost/cstdint.hpp> 33 #include <ndn-cxx/name.hpp> 132 , EMPTY_PARENT(-12345)
133 , INF_DISTANCE(2147483647)
135 , NO_NEXT_HOP(-12345)
141 const std::list<AdjLsa>& adjLsaList);
148 doDijkstraPathCalculation(
int sourceRouter);
160 sortQueueByDistance(
int* Q,
double* dist,
int start,
int element);
169 isNotExplored(
int* Q,
int u,
int start,
int element);
173 Map& pMap, uint32_t sourceRouter);
180 getLsNextHop(
int dest,
int source);
198 const int EMPTY_PARENT;
199 const double INF_DISTANCE;
200 const int NO_MAPPING_NUM;
201 const int NO_NEXT_HOP;
213 , m_isDryRun(isDryRun)
214 , m_thisRouterName(thisRouterName)
223 getHyperbolicDistance(
Lsdb& lsdb, ndn::Name src, ndn::Name dest);
226 addNextHop(ndn::Name destinationRouter, std::string faceUri,
double cost,
RoutingTable& rt);
229 calculateHyperbolicDistance(
double rI,
double rJ,
double deltaTheta);
232 calculateAngularDistance(std::vector<double> angleVectorI,
233 std::vector<double> angleVectorJ);
237 const bool m_isDryRun;
238 const ndn::Name m_thisRouterName;
240 static const double MATH_PI;
241 static const double UNKNOWN_DISTANCE;
242 static const double UNKNOWN_RADIUS;
247 #endif // NLSR_ROUTING_TABLE_CALCULATOR_HPP
void writeAdjMatrixLog(const Map &map) const
A class to house all the configuration parameters for NLSR.
void getLinksFromAdjMatrix(int *links, double *linkCosts, int source)
Populates temp. variables with the link costs for some router.
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-2018, The University of Memphis, Regents of the University of California.
void makeAdjMatrix(const std::list< AdjLsa > &adjLsaList, Map &pMap)
Constructs an adj. matrix to calculate with.
void initMatrix()
Zero every cell of the matrix to ensure that the memory is safe.
Copyright (c) 2014-2018, 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)