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 #63875] Fri, 21 November 2008 11:24 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Nov 21, 2:03 pm, Paolo <pgri...@gmail.com> wrote:
> 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...)
>
>

The algorithm may be obvious, but reverse-engineering how the indices
are stored in the structure so you can figure out what's what isn't so
obvious (even with a copy of NR). :-)=

-Jeremy.
[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 07:42:27 PDT 2025

Total time taken to generate the page: 1.35916 seconds