X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3b7e5f4b4d7c87ee3e8827313ec966ea8fc8387..ea74f5d95928a521a588737e81f1de94eef25d19:/include/simgrid/kernel/routing/FloydZone.hpp diff --git a/include/simgrid/kernel/routing/FloydZone.hpp b/include/simgrid/kernel/routing/FloydZone.hpp index 9a57778a22..ceaa58a3b5 100644 --- a/include/simgrid/kernel/routing/FloydZone.hpp +++ b/include/simgrid/kernel/routing/FloydZone.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -22,22 +22,22 @@ namespace routing { * (somewhere between the one of @{DijkstraZone} and the one of @{FullZone}). */ class XBT_PRIVATE FloydZone : public RoutedZone { + /* vars to compute the Floyd algorithm. */ + std::vector> predecessor_table_; + std::vector> cost_table_; + std::vector>> link_table_; + + void init_tables(unsigned int table_size); + void do_seal() override; + public: - explicit FloydZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel); + using RoutedZone::RoutedZone; FloydZone(const FloydZone&) = delete; FloydZone& operator=(const FloydZone&) = delete; - ~FloydZone() override; - void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; + void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override; void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, - std::vector& link_list, bool symmetrical) override; - void seal() override; - -private: - /* vars to compute the Floyd algorithm. */ - int* predecessor_table_ = nullptr; - double* cost_table_ = nullptr; - RouteCreationArgs** link_table_ = nullptr; + const std::vector& link_list, bool symmetrical) override; }; } // namespace routing } // namespace kernel