forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 7:15 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Enumerate one row of CRS matrix
PostPosted: Mon Dec 08, 2014 6:24 pm 
Offline

Joined: Mon Dec 08, 2014 6:04 pm
Posts: 3
Hi,

First of all, I've been using Alglib for the last year and find it really powerful.

That being said, there is one capability I miss regarding the sparse matrix subpackage (maybe because of my own ignorance).
I would like to enumerate a particular row of a CRS matrix without having to enumerate the whole matrix. This should be straightforward to implement for the CRS format.
An alternative would be to directly have access to the data, column indices and pointers. Is that possible?


Top
 Profile  
 
 Post subject: Re: Enumerate one row of CRS matrix
PostPosted: Tue Dec 09, 2014 2:25 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Hello!

You choose right time for proposal :) ALGLIB 3.9.0 will be released within few days, and it's a last moment for minor changes like one proposed by you.

There already exists sparsegetrow() function, but it returns entire row in dense format. I think that it is worth adding sparsegetcompressedrow() which will return just one row in compressed format (only nonzero entries).


Top
 Profile  
 
 Post subject: Re: Enumerate one row of CRS matrix
PostPosted: Tue Dec 09, 2014 2:51 pm 
Offline

Joined: Mon Dec 08, 2014 6:04 pm
Posts: 3
Thank you for the fast answer!

Well, the idea is, for each row of the CRS matrix, to perform an operation (not necessarily in-place) only for the non-zero elements of the row.
So an iterator on the non-zero elements (and their position) of the row would be the best (since no copy is needed), or at least a copy of the row as a CRS matrix on which one could use sparseenumerate, as you suggested.

Thank you again!


Top
 Profile  
 
 Post subject: Re: Enumerate one row of CRS matrix
PostPosted: Tue Dec 09, 2014 2:53 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
I think that returning entire row in compressed format will be faster than performing iteration (less function call/check overhead).


Top
 Profile  
 
 Post subject: Re: Enumerate one row of CRS matrix
PostPosted: Tue Dec 09, 2014 2:54 pm 
Offline

Joined: Mon Dec 08, 2014 6:04 pm
Posts: 3
Great! Looking forward to the new version!


Top
 Profile  
 
 Post subject: Re: Enumerate one row of CRS matrix
PostPosted: Fri Dec 12, 2014 6:10 am 
Offline

Joined: Fri Dec 12, 2014 6:03 am
Posts: 2
ALGLIB for VBA is quite old (many years old), misses most functionality present in modern ALGLIB versions. As far as I remember, it misses constrained LM functionality. Only unconstrained fits are performed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group