Re: [eigen] sparse colwise |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] sparse colwise
- From: Sameer Agarwal <sameeragarwal@xxxxxxxxxx>
- Date: Fri, 25 Jun 2010 08:54:08 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1277481250; bh=iXb4wQnrjCHserHvmis2xcI/KBQ=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Content-Type:Content-Transfer-Encoding; b=gCHKjrYPB3PGjdGyosHKBFJFw7yN/JLQkGH5nF1VsJDBqJYDmO+qsQnhKbsopCK56 IJyq9sXPgI8u+LwyzGzww==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: content-type:content-transfer-encoding:x-system-of-record; b=EvKD/Xy6uDSoqQZMHuwA8MDjE2uqBTpuo/rAE7JiIepj43wzB5AzAX2qQwXqU6TNl hnL+dza+ivXcChPm0iA9g==
I was hoping to avoid the multiplication.
Sameer
On Fri, Jun 25, 2010 at 8:41 AM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> Hi,
>
> it's not a bug, but a lack of features.The sparse module does not
> support the full dense API. Column-wise and row-wise operations do not
> seem to be of high priority, but I agree that can be convenient.
>
> Note that you can still do:
>
> RowVectorXd::Ones(5) * m2
>
> Hopefully, the compiler should be smart enough to remove the products
> by 1 (well, maybe it is not allowed to do so by default....)
>
> gael
>
> On Fri, Jun 25, 2010 at 5:14 PM, Sameer Agarwal
> <sameeragarwal@xxxxxxxxxx> wrote:
>> Hi Guys,
>>
>> On the development branch,
>>
>> #include "Eigen/Core"
>> #include "Eigen/Sparse"
>>
>> using namespace Eigen;
>> int main() {
>> Matrix<double, Dynamic, Dynamic, ColMajor> m1(5,5);
>> SparseMatrix<double, ColMajor> m2(5,5);
>> m1.colwise().sum();
>> m2.colwise().sum() // Fails to compile
>> }
>>
>> fails to compile with
>>
>> 'class Eigen::SparseMatrix<double, 0, int>' has no member named 'colwise'
>>
>> am I missing something here?
>> Sameer
>>
>>
>>
>
>
>