Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / include / simgrid / kernel / routing / VivaldiZone.hpp
index ccec349..2b4d6b2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2018. 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. */
@@ -6,7 +6,7 @@
 #ifndef SURF_ROUTING_VIVALDI_HPP_
 #define SURF_ROUTING_VIVALDI_HPP_
 
-#include <simgrid/kernel/routing/ClusterZone.hpp>
+#include <simgrid/kernel/routing/StarZone.hpp>
 #include <xbt/Extendable.hpp>
 
 namespace simgrid {
@@ -29,7 +29,7 @@ namespace routing {
  *
  *  The resulting value is assumed to be in milliseconds.
  *
- *  So, to go from an host A to an host B, the following links would be used:
+ *  So, to go from a host A to a host B, the following links would be used:
  *  <tt>private(A)_UP, private(B)_DOWN</tt>, with the additional latency computed above.
  *  The bandwidth of the UP and DOWN links is not symmetric (in contrary to usual SimGrid
  *  links), but naturally correspond to the values provided when the peer was created.
@@ -44,20 +44,18 @@ namespace routing {
  *  were shown superior to the Vivaldi system and could be also implemented in SimGrid.
  */
 
-class XBT_PRIVATE VivaldiZone : public ClusterZone {
+class XBT_PRIVATE VivaldiZone : public StarZone {
 public:
-  explicit VivaldiZone(NetZone* father, std::string name);
-
-  void setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord);
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  using StarZone::StarZone;
+  void set_peer_link(NetPoint* netpoint, double bw_in, double bw_out);
+  void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override;
 };
 
 namespace vivaldi {
 class XBT_PRIVATE Coords {
 public:
-  static simgrid::xbt::Extension<NetPoint, Coords> EXTENSION_ID;
-  explicit Coords(NetPoint* host, std::string str);
-  virtual ~Coords() = default;
+  static xbt::Extension<NetPoint, Coords> EXTENSION_ID;
+  explicit Coords(NetPoint* host, const std::string& str);
 
   std::vector<double> coords;
 };