[eigen] Copy into a MappedSparseMatrix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Copy into a MappedSparseMatrix
- From: Norman Goldstein <normvcr@xxxxxxxxx>
- Date: Wed, 15 Jul 2015 22:35:39 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telus.net; s=neo; t=1437024940; bh=Pde91OTWXVtpzC4QyYuxrsyg/RqkQBRAF/+/uctXHqA=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=5JtkfBccO+mk7Ar/GZ1U6Stk2JGu6nJzTCURH3SJCn8ieXYjqv8pPdm2cG7gL0eaf mXE5zM2buiXV5NImj4EufnMtW5W+E1oRwfhKo+LN3rBsWT973mvTxh612dNItpaSxw eVmognkwvGNSQo6dnwImsDE2AiQu3HmWvTDHcSPA3DPIMw6a+oytnE4RcKWTo9pALm xiuzu8FTmNjNv22Fc6vFjal9cQfyws9CJDB4Q4xjUyinmuLQus0cW4A8bw1e8TLIzL l2UFIbjjhdgRKMMV4UZmD79RcS46fsUnCXCwqDlYsGB39dfeRE89Y6laYSYaR66hpa Df5jBGB0JRPrA==
I have the following two matices:
MappedSparseMatrix<...> hmat; // Points to some data off to the side
SparseMatrix<...> prod; // Contains data, same size and
structure as hmat
I want to copy the prod data over to where hmat is pointing:
hmat = prod;
I get the
error: no match for
‘operator=’ (operand types are ‘Eigen::MappedSparseMatrix<double, 1>’
and ‘Eigen::SparseMatrix<double, 1, int>’)
hmat = prod;
^
note: candidate is:
/usr/include/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h:31:7: note:
Eigen::MappedSparseMatrix<double, 1>& Eigen::MappedSparseMatrix<double,
1>::operator=(const Eigen::MappedSparseMatrix<double, 1>&)
class MappedSparseMatrix
^
/usr/include/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h:31:7: note:
no known conversion for argument 1 from ‘Eigen::SparseMatrix<double, 1,
int>’ to ‘const Eigen::MappedSparseMatrix<double, 1>&
-------------------
I've seen examples for constructing and printing a MappedSparseMatrix,
but not for writing into
a MappedSparseMatrix.
Thank you
PS I was unable to register with the KDE forum -- something odd with my
KDE ID, username and email.