X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/67fe7b9d6c00b390a8598bc1e72d42d8343cb218..19e1048a7009c4144b0f361ad85fb9dff44761ea:/include/simgrid/kernel/routing/FloydZone.hpp?ds=sidebyside diff --git a/include/simgrid/kernel/routing/FloydZone.hpp b/include/simgrid/kernel/routing/FloydZone.hpp index d225bb644d..83539d1b00 100644 --- a/include/simgrid/kernel/routing/FloydZone.hpp +++ b/include/simgrid/kernel/routing/FloydZone.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2021. 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,20 +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, std::string name, resource::NetworkModel* netmodel); - ~FloydZone() override; + using RoutedZone::RoutedZone; + FloydZone(const FloydZone&) = delete; + FloydZone& operator=(const FloydZone&) = delete; - 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_; - double* cost_table_; - RouteCreationArgs** link_table_; + const std::vector& link_list, bool symmetrical) override; }; } // namespace routing } // namespace kernel