computeLinkStateRoutes<T> function
Convenience function for quick link-state route computation
network - Network topology as adjacency list
sourceNode - Source node for routing table
topologyOptimizations - Optional topology optimization parameters
Returns complete link-state routing table from source node
Throws ArgumentError if source node doesn't exist in network
Implementation
LinkStateRoutingTable<T> computeLinkStateRoutes<T>(
Map<T, Map<T, num>> network,
T sourceNode, {
Map<String, dynamic>? topologyOptimizations,
}) {
return LinkStateRoutingAlgorithm<T>().computeRoutes(
network,
sourceNode,
topologyOptimizations: topologyOptimizations,
);
}