58 if (n < 1)
throw InputError(
"fes_map_interdeparture: the subnetwork population must be at least 1");
62 const std::size_t ms = mapsLev[0].order();
63 const std::size_t mf = fesLev[0].order();
64 const std::size_t blk = ms * mf;
65 const std::size_t dim = (n + 1) * blk;
72 for (std::size_t k = 0; k <= n; ++k) {
73 const std::size_t off = k * blk;
74 const std::size_t j = n - k;
78 for (std::size_t a = 0; a < ms; ++a)
79 for (std::size_t b = 0; b < ms; ++b)
80 for (std::size_t f = 0; f < mf; ++f)
81 out.
D0(off + a * mf + f, off + b * mf + f) += D0(a, b);
85 for (std::size_t a = 0; a < ms; ++a)
86 for (std::size_t f = 0; f < mf; ++f)
87 for (std::size_t g = 0; g < mf; ++g)
88 out.
D0(off + a * mf + f, off + a * mf + g) += F0(f, g);
90 for (std::size_t a = 0; a < ms; ++a)
91 for (std::size_t f = 0; f < mf; ++f)
92 for (std::size_t g = 0; g < mf; ++g)
93 out.
D0(off + a * mf + f, off - blk + a * mf + g) += F1(f, g);
97 for (std::size_t a = 0; a < ms; ++a)
98 for (std::size_t b = 0; b < ms; ++b)
99 for (std::size_t f = 0; f < mf; ++f)
100 out.
D1(off + a * mf + f, off + blk + b * mf + f) += D1(a, b);
std::vector< mam::Map< T > > fes_map_levels(const mam::Map< T > &map, std::size_t n, double mi=1.0)
Replicate a load independent MAP over n levels, scaling level k by min(k, mi).
mam::Map< T > fes_map_interdeparture(const std::vector< mam::Map< T > > &maps, const std::vector< mam::Map< T > > &fes, std::size_t n)
Inter-departure MAP of a closed subnetwork made of one MAP station and one MAP flow-equivalent server...