这是将向量重塑为C++中重叠窗口矩阵的最快方法使用特征库?
假设您有一个n元素的向量,并且要创建一个由从原始矢量切片的重叠窗口制成的m矩阵。哪种是使用EIGEN库在C ++中执行此操作的最快方法?
对于ex(n = 7,window_length(m)= 3,重叠= 2):
0, 1, 2, 3, 4, 5, 6 -> 0, 1, 2
1, 2, 3
2, 3, 4
3, 4, 5
4, 5, 6
其中m和重叠必须是参数。
Let's suppose you have a vector of N elements and you want to create a n by m matrix made of stacked overlapping windows sliced from the original vector. Which is the fastest way to perform this operation in C++ using Eigen library?
for ex (N = 7, window_length(m) = 3, overlap = 2):
0, 1, 2, 3, 4, 5, 6 -> 0, 1, 2
1, 2, 3
2, 3, 4
3, 4, 5
4, 5, 6
where m and overlap must be parametric.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论