#include <routing-table-calculator.hpp>
nlsr::LinkStateRoutingTableCalculator::LinkStateRoutingTableCalculator |
( |
size_t |
nRouters | ) |
|
|
inline |
void nlsr::RoutingTableCalculator::adjustAdMatrix |
( |
int |
source, |
|
|
int |
link, |
|
|
double |
linkCost |
|
) |
| |
|
protectedinherited |
Adjust a link cost in the adj. matrix.
- Parameters
-
source | The source router whose adjacency to adjust. |
link | The adjacency of the source to adjust. |
linkCost | The cost to change to. |
Definition at line 132 of file routing-table-calculator.cpp.
void nlsr::RoutingTableCalculator::allocateAdjMatrix |
( |
| ) |
|
|
protectedinherited |
void nlsr::RoutingTableCalculator::allocateLinkCosts |
( |
| ) |
|
|
protectedinherited |
void nlsr::RoutingTableCalculator::allocateLinks |
( |
| ) |
|
|
protectedinherited |
void nlsr::LinkStateRoutingTableCalculator::calculatePath |
( |
Map & |
pMap, |
|
|
RoutingTable & |
rt, |
|
|
Nlsr & |
pnlsr |
|
) |
| |
void nlsr::RoutingTableCalculator::freeAdjMatrix |
( |
| ) |
|
|
protectedinherited |
void nlsr::RoutingTableCalculator::freeLinks |
( |
| ) |
|
|
protectedinherited |
void nlsr::RoutingTableCalculator::freeLinksCosts |
( |
| ) |
|
|
protectedinherited |
void nlsr::RoutingTableCalculator::getLinksFromAdjMatrix |
( |
int * |
links, |
|
|
double * |
linkCosts, |
|
|
int |
source |
|
) |
| |
|
protectedinherited |
Populates temp. variables with the link costs for some router.
- Parameters
-
source | The router whose values are to be adjusted. |
links | An integer pointer array for the link mappingNos. |
linkCosts | A double pointer array that stores the link costs. |
Obtains a sparse list of adjacencies and link costs for some router. Since this is sparse, that means while generating these arrays, if there is no adjacency at i in the matrix, these temporary variables will not contain a 0 at i, but rather will contain the values for the next valid adjacency.
Definition at line 158 of file routing-table-calculator.cpp.
int nlsr::RoutingTableCalculator::getNumOfLinkfromAdjMatrix |
( |
int |
sRouter | ) |
|
|
protectedinherited |
Returns how many links a router in the matrix has.
- Parameters
-
sRouter | The router to count the links of. |
Definition at line 145 of file routing-table-calculator.cpp.
void nlsr::RoutingTableCalculator::initMatrix |
( |
| ) |
|
|
protectedinherited |
void nlsr::RoutingTableCalculator::makeAdjMatrix |
( |
Nlsr & |
pnlsr, |
|
|
Map |
pMap |
|
) |
| |
|
protectedinherited |
Constructs an adj. matrix to calculate with.
- Parameters
-
pnlsr | The NLSR object that contains the LSAs that we need to iterate over. |
pMap | The map to populate with the adj. data. |
Definition at line 59 of file routing-table-calculator.cpp.
void nlsr::RoutingTableCalculator::setNoLink |
( |
int |
nl | ) |
|
|
inlineprotectedinherited |
void nlsr::RoutingTableCalculator::writeAdjMatrixLog |
( |
| ) |
|
|
protectedinherited |
double** nlsr::RoutingTableCalculator::adjMatrix |
|
protectedinherited |
double* nlsr::RoutingTableCalculator::linkCosts |
|
protectedinherited |
int* nlsr::RoutingTableCalculator::links |
|
protectedinherited |
size_t nlsr::RoutingTableCalculator::m_nRouters |
|
protectedinherited |
int nlsr::RoutingTableCalculator::vNoLink |
|
protectedinherited |