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> 140 const std::list<AdjLsa>& adjLsaList);
147 doDijkstraPathCalculation(
int sourceRouter);
162 sortQueueByDistance(
int* Q,
double* dist,
int start,
int element);
171 isNotExplored(
int* Q,
int u,
int start,
int element);
175 Map& pMap, uint32_t sourceRouter);
182 getLsNextHop(
int dest,
int source);
200 static const int EMPTY_PARENT;
201 static const double INF_DISTANCE;
202 static const int NO_MAPPING_NUM;
216 , m_isDryRun(isDryRun)
217 , m_thisRouterName(thisRouterName)
226 getHyperbolicDistance(
Lsdb& lsdb, ndn::Name src, ndn::Name dest);
229 addNextHop(ndn::Name destinationRouter, std::string faceUri,
double cost,
RoutingTable& rt);
232 calculateHyperbolicDistance(
double rI,
double rJ,
double deltaTheta);
235 calculateAngularDistance(std::vector<double> angleVectorI,
236 std::vector<double> angleVectorJ);
240 const bool m_isDryRun;
241 const ndn::Name m_thisRouterName;
243 static const double MATH_PI;
244 static const double UNKNOWN_DISTANCE;
245 static const double UNKNOWN_RADIUS;
250 #endif // NLSR_ROUTING_TABLE_CALCULATOR_HPP
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()
set NON_ADJACENT_COST i.e. -12345 to every cell of the matrix to ensure that the memory is safe...
void writeAdjMatrixLog(const Map &map) const
Writes a formated adjacent matrix to DEBUG log.
Copyright (c) 2014-2019, 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.
static const int NO_NEXT_HOP
LinkStateRoutingTableCalculator(size_t nRouters)