computeLinkStateRoutes<T> function

LinkStateRoutingTable<T> computeLinkStateRoutes<T>(
  1. Map<T, Map<T, num>> network,
  2. T sourceNode, {
  3. Map<String, dynamic>? topologyOptimizations,
})

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,
  );
}