mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
This scalar needs to be passed by ref to preserve its alignment.
This commit is contained in:
parent
e5aa6a466b
commit
99d952466f
@ -226,7 +226,7 @@ template<typename Derived> class MatrixBase
|
|||||||
template<unsigned int UpLo> SelfAdjointView<Derived, UpLo> selfadjointView();
|
template<unsigned int UpLo> SelfAdjointView<Derived, UpLo> selfadjointView();
|
||||||
template<unsigned int UpLo> const SelfAdjointView<Derived, UpLo> selfadjointView() const;
|
template<unsigned int UpLo> const SelfAdjointView<Derived, UpLo> selfadjointView() const;
|
||||||
|
|
||||||
const SparseView<Derived> sparseView(const Scalar m_reference = Scalar(0),
|
const SparseView<Derived> sparseView(const Scalar& m_reference = Scalar(0),
|
||||||
typename NumTraits<Scalar>::Real m_epsilon = NumTraits<Scalar>::dummy_precision()) const;
|
typename NumTraits<Scalar>::Real m_epsilon = NumTraits<Scalar>::dummy_precision()) const;
|
||||||
static const IdentityReturnType Identity();
|
static const IdentityReturnType Identity();
|
||||||
static const IdentityReturnType Identity(Index rows, Index cols);
|
static const IdentityReturnType Identity(Index rows, Index cols);
|
||||||
|
@ -35,7 +35,7 @@ class SparseView : public SparseMatrixBase<SparseView<MatrixType> >
|
|||||||
public:
|
public:
|
||||||
EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView)
|
EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView)
|
||||||
|
|
||||||
SparseView(const MatrixType& mat, const Scalar m_reference = Scalar(0),
|
SparseView(const MatrixType& mat, const Scalar& m_reference = Scalar(0),
|
||||||
typename NumTraits<Scalar>::Real m_epsilon = NumTraits<Scalar>::dummy_precision()) :
|
typename NumTraits<Scalar>::Real m_epsilon = NumTraits<Scalar>::dummy_precision()) :
|
||||||
m_matrix(mat), m_reference(m_reference), m_epsilon(m_epsilon) {}
|
m_matrix(mat), m_reference(m_reference), m_epsilon(m_epsilon) {}
|
||||||
class InnerIterator;
|
class InnerIterator;
|
||||||
@ -86,7 +86,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
const SparseView<Derived> MatrixBase<Derived>::sparseView(const Scalar m_reference,
|
const SparseView<Derived> MatrixBase<Derived>::sparseView(const Scalar& m_reference,
|
||||||
typename NumTraits<Scalar>::Real m_epsilon) const
|
typename NumTraits<Scalar>::Real m_epsilon) const
|
||||||
{
|
{
|
||||||
return SparseView<Derived>(derived(), m_reference, m_epsilon);
|
return SparseView<Derived>(derived(), m_reference, m_epsilon);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user