SOLA
Loading...
Searching...
No Matches
routing_calculations.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_CORE_ROUTING_CALCULATIONS_H_
8#define MINHTON_CORE_ROUTING_CALCULATIONS_H_
9
10#include <cstdint>
11#include <set>
12#include <tuple>
13#include <vector>
14
15namespace minhton {
30bool getFillLevelRightToLeft(uint32_t level);
31
47bool isNodePartOfPrioSet(uint32_t level, uint32_t number, uint16_t fanout);
48
66std::tuple<uint32_t, uint32_t> calcParent(uint32_t level, uint32_t number, uint16_t fanout);
67
87std::vector<std::tuple<uint32_t, uint32_t>> calcChildren(uint32_t level, uint32_t number,
88 uint16_t fanout);
89
108std::vector<uint32_t> calcRoutingSequence(uint32_t level, uint16_t fanout);
109
129std::vector<std::tuple<uint32_t, uint32_t>> calcLeftRT(uint32_t level, uint32_t number,
130 uint16_t fanout);
131
152std::vector<std::tuple<uint32_t, uint32_t>> calcRightRT(uint32_t level, uint32_t number,
153 uint16_t fanout);
154
170std::set<uint32_t> calcPrioSet(uint32_t level, uint16_t fanout);
171
173bool isPositionValid(uint32_t level, uint32_t number, uint16_t fanout);
174
176bool isFanoutValid(uint16_t fanout);
177
197double treeMapper(uint32_t level, uint32_t number, uint16_t fanout, double K);
198
205std::tuple<double, double, double> treeMapperInternal(uint32_t level, uint32_t number,
206 uint16_t fanout, uint8_t K);
207
208std::tuple<uint32_t, uint32_t> getCoveringDSN(uint32_t level, uint32_t number, uint16_t fanout);
209std::vector<std::tuple<uint32_t, uint32_t>> getCoverArea(uint32_t level, uint32_t number,
210 uint16_t fanout);
211std::vector<uint32_t> getDSNSet(uint32_t level, uint16_t fanout);
212
213} // namespace minhton
214#endif
Definition minhton_watchdog_ns3.cpp:24
bool isNodePartOfPrioSet(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:19
bool getFillLevelRightToLeft(uint32_t level)
Definition routing_calculations.cpp:17
std::vector< uint32_t > calcRoutingSequence(uint32_t level, uint16_t fanout)
Definition routing_calculations.cpp:71
std::vector< std::tuple< uint32_t, uint32_t > > calcLeftRT(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:89
std::vector< std::tuple< uint32_t, uint32_t > > calcRightRT(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:108
bool isFanoutValid(uint16_t fanout)
Definition routing_calculations.cpp:186
std::set< uint32_t > calcPrioSet(uint32_t level, uint16_t fanout)
returns an ordered set
Definition routing_calculations.cpp:145
std::tuple< uint32_t, uint32_t > calcParent(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:25
bool isPositionValid(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:174
double treeMapper(uint32_t level, uint32_t number, uint16_t fanout, double K)
Definition routing_calculations.cpp:231
std::tuple< double, double, double > treeMapperInternal(uint32_t level, uint32_t number, uint16_t fanout, uint8_t K)
Definition routing_calculations.cpp:198
std::vector< std::tuple< uint32_t, uint32_t > > calcChildren(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:43