A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright lines.
[simgrid.git]
/
include
/
simgrid
/
kernel
/
routing
/
FloydZone.hpp
diff --git
a/include/simgrid/kernel/routing/FloydZone.hpp
b/include/simgrid/kernel/routing/FloydZone.hpp
index
d225bb6
..
9a5b924
100644
(file)
--- a/
include/simgrid/kernel/routing/FloydZone.hpp
+++ b/
include/simgrid/kernel/routing/FloydZone.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2013-20
18
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-20
21
. 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. */
/* 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. */
@@
-23,7
+23,9
@@
namespace routing {
*/
class XBT_PRIVATE FloydZone : public RoutedZone {
public:
*/
class XBT_PRIVATE FloydZone : public RoutedZone {
public:
- explicit FloydZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel);
+ explicit FloydZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel);
+ FloydZone(const FloydZone&) = delete;
+ FloydZone& operator=(const FloydZone&) = delete;
~FloydZone() override;
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
~FloydZone() override;
void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
@@
-33,9
+35,11
@@
public:
private:
/* vars to compute the Floyd algorithm. */
private:
/* vars to compute the Floyd algorithm. */
- int* predecessor_table_;
- double* cost_table_;
- RouteCreationArgs** link_table_;
+ std::vector<int> predecessor_table_;
+ std::vector<double> cost_table_;
+ std::vector<RouteCreationArgs*> link_table_;
+
+ void init_tables(unsigned int table_size);
};
} // namespace routing
} // namespace kernel
};
} // namespace routing
} // namespace kernel