forum.alglib.net

ALGLIB forum
It is currently Tue Nov 26, 2024 5:39 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  [ 3 posts ] 
Author Message
 Post subject: Column Vector vs. Row Vector
PostPosted: Tue Dec 11, 2012 6:33 pm 
Offline

Joined: Fri Oct 19, 2012 4:28 pm
Posts: 8
I was wanting to know if ALGLIB distinguishes between row vectors and column vectors. For instance if
a is a row vector
b is a col vector

a*b is a scalar (also the dot product)

b*a is a square matrix.

how would you do a computation like b*a to produce a matrix in ALGLIB?


Top
 Profile  
 
 Post subject: Re: Column Vector vs. Row Vector
PostPosted: Wed Dec 12, 2012 7:22 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Strictly speaking, ALGLIB works with arrays, 1-dimensional or 2-dimensional - not vectors (or matrices). It means that ALGLIB has no overloaded operators to performs calculations like "a:=b+3*c" with vectors or matrices. It concentrates on higher-lever operations, like matrix decompositions.

If you want, you may use RMatrixGEMM to calculate product of two matrices - Mx1 and 1xN, but this function is optimized for large operands. It is not optimized to calculate such "thin", low-rank products, so its performance may be several times lower than that of two nested loops without any optimizations at all.


Top
 Profile  
 
 Post subject: Re: Column Vector vs. Row Vector
PostPosted: Wed Dec 12, 2012 4:38 pm 
Offline

Joined: Fri Oct 19, 2012 4:28 pm
Posts: 8
Sergey,

Thanks for the reply. It seems that it will be simpler (and more efficient) to write my own outer product function for 2 vectors.

Regards,


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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