codac 2.0.0
Loading...
Searching...
No Matches
codac2_traj_cart_prod.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "codac2_cart_prod.h"
13#include "codac2_Vector.h"
14#include "codac2_SampledTraj.h"
15
16namespace codac2
17{
18 template<typename... X>
19 requires ((std::is_same_v<SampledTraj<double>,X> || std::is_same_v<SampledTraj<Vector>,X>) && ...)
20 inline SampledTraj<Vector> traj_cart_prod(const X&... x)
21 {
22 auto&& x0 = std::get<0>(std::forward_as_tuple(x...));
23 assert_release((SampledTraj<Vector>::same_sampling(x0, x) && ...));
24 SampledTraj<Vector> y;
25 for(auto it = x0.begin() ; it != x0.end() ; it++)
26 y.set(cart_prod(x.at(it->first)...), it->first);
27 return y;
28 }
29}
Definition codac2_OctaSym.h:21