mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Enable to view a SparseVector as a Ref<SparseMatrix>
This commit is contained in:
@@ -72,6 +72,18 @@ protected:
|
||||
{
|
||||
::new (static_cast<Base*>(this)) Base(expr.rows(), expr.cols(), expr.nonZeros(), expr.outerIndexPtr(), expr.innerIndexPtr(), expr.valuePtr(), expr.innerNonZeroPtr());
|
||||
}
|
||||
|
||||
template<int ExprOptions>
|
||||
void construct(const SparseVector<Scalar,ExprOptions,StorageIndex>& expr)
|
||||
{
|
||||
::new (static_cast<Base*>(this)) Base(expr.size(), expr.nonZeros(), expr.innerIndexPtr(), expr.valuePtr());
|
||||
}
|
||||
|
||||
template<int ExprOptions>
|
||||
void construct(SparseVector<Scalar,ExprOptions,StorageIndex>& expr)
|
||||
{
|
||||
::new (static_cast<Base*>(this)) Base(expr.size(), expr.nonZeros(), expr.innerIndexPtr(), expr.valuePtr());
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
Reference in New Issue
Block a user