我正在尝试使用Eigen的map功能来映射到内存中的稀疏向量,但我似乎无法编译到此的声明,因为'InnerStrideAtCompileTime‘不是'Eigen::SparseVector<_Scalar,0,_StorageIndex>’的成员。
这没人支持吗?
示例代码:
#include <Eigen/Core>
#include <Eigen/SparseCore>
void Foo()
{
int innerIndices[10];
float values[10];
Eigen::Map<const Eigen::SparseVector<float>> eigenRigOffsets(100, 10, &innerIndices[0], &values[0]);
}发布于 2019-10-29 20:22:56
它似乎还没有得到支持。有对Eigen::Map<Eigen::SparseMatrix<float>>的支持(如文档中所示),尽管这不是您所要求的。可能,ggael会有一个更好的答案(或实现)。
https://stackoverflow.com/questions/58611437
复制相似问题