comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Adding sparse matrices
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Adding sparse matrices [message #63878 is a reply to message #63876] Fri, 21 November 2008 11:03 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Luis wrote:
> On Nov 21, 4:10�pm, Vince Hradil <vincehra...@gmail.com> wrote:
> :-) My mail wasn't very detail...
>
> Unfortunately I can not use c = sprsin(fulstr(a) + fulstr(b)) (Out of
> memory problems)

Well, it seems that the algorithm is obvious enough:
if an element is in a and not in b, copy it to c
if an element is in b and not in a, copy it to c
if an element is in a and in b, put the sum in c

Ciao,
Paolo


>
>> On Nov 21, 9:59�am, Vince Hradil <vincehra...@gmail.com> wrote:
>>
>>> On Nov 21, 9:27�am, Luis <lgmen...@gmail.com> wrote:
>>
>>>> Hi,
>>
>>>> Does anyone know how to add two sparse matrices?
>>
>>>> Tks,
>>>> Luis
>>
>>> c = a + b ?
>>
>> Sorry (removing foot from mouth and humbly retreating...)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL books to buy
Next Topic: Re: Why the contour does not show?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:06:02 PDT 2025

Total time taken to generate the page: 1.04137 seconds