ufuncs, iterators

2005-08-20 Thread S V N Vishwanathan
Hi! Barry After sleeping on it, it may be ok to include these methods in Barry Mat as methods for filling up matrices so long as in the end Barry you end up with a Mat that you then use as an operator. Yes that sounds like a good test to me. If the end result of the computation is a matrix which

ufuncs, iterators

2005-08-20 Thread S V N Vishwanathan
Hi! Barry Certainly pointwise addition is the same as adding two operators Barry together (PETSc has this with MatAXPY), but what about, for example, Barry pointwise multiply? Pointwise multiply is the Hadamard product of two matrices matrix. You have something like MatGetRowMax which strictly

ufuncs, iterators

2005-08-20 Thread Matthew Knepley
Simon Burton simon at arrowtheory.com writes: Oh, that should probably read: exp( -1/2\sigma^{2} ||x1_{i} - x2_{j}||_{2}^{2}) And when we vectorize this operation: ||x1_i - x2_j||^2 = ||x1_i||^2 + ||x2_i||^2 + 2*(x1_i,x2_j) and the last term is the ip matrix. It seems that this

ufuncs, iterators

2005-08-20 Thread Barry Smith
I withdraw my concern for the (I thought) possible mislocation of the various operations on Matrices. So folks should feel free to begin to add them. Barry On Sat, 20 Aug 2005, S V N Vishwanathan wrote: Hi! Barry After sleeping on it, it may be ok to include these methods in Barry

ufuncs, iterators

2005-08-19 Thread Simon Burton
Is there a way to simulate a MatSet (like VecSet) ? Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com

ufuncs, iterators

2005-08-19 Thread S V N Vishwanathan
Hi! BTW: possibly related note, are you using dense matrices sometimes to represent just 2-arrays; that is, not as representations of linear operators. If so, I do not think this is the correct approach! Conceptually PETSc Mat's are linear operators I think it would be a big mistake to

ufuncs, iterators

2005-08-19 Thread S V N Vishwanathan
Hi! I am not sure I understand the fine difference. As far as we are concerned, all the operations which we are doing (point wise addition, addition, multiplication etc.) are on the linear operator. Barry Certainly pointwise addition is the same as adding two operators Barry together (PETSc

ufuncs, iterators

2005-08-19 Thread Simon Burton
On Thu, 18 Aug 2005 22:49:29 -0500 (CDT) Barry Smith bsmith at mcs.anl.gov wrote: What is x1, x2 and ip? Barry x1 and x2 are 2-arrays; their rows are the 'sample' vectors. ip is the matrix of all inner products from x1 and x2. Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU

ufuncs, iterators

2005-08-19 Thread Barry Smith
In terms of exp( -1/2\sigma^{2} ||x_{i} - x_{j}||_{2}^{2}) what are they? Thanks Barry On Fri, 19 Aug 2005, Simon Burton wrote: On Thu, 18 Aug 2005 22:49:29 -0500 (CDT) Barry Smith bsmith at mcs.anl.gov wrote: What is x1, x2 and ip? Barry x1 and x2 are

ufuncs, iterators

2005-08-19 Thread Matthew Knepley
S V N Vishwanathan vishy at mail.rsise.anu.edu.au writes: Hi! BTW: possibly related note, are you using dense matrices sometimes to represent just 2-arrays; that is, not as representations of linear operators. If so, I do not think this is the correct approach! Conceptually PETSc Mat's are

ufuncs, iterators

2005-08-19 Thread Matthew Knepley
Simon Burton simon at arrowtheory.com writes: On Thu, 18 Aug 2005 19:57:02 -0500 Matthew Knepley knepley at mcs.anl.gov wrote: (d) m=exp(m) (pointwise exp) We could add pointwise operations just like the VecPointwise*(). Matt Yes, we need MatPointwiseMult

ufuncs, iterators

2005-08-19 Thread Barry Smith
After sleeping on it, it may be ok to include these methods in Mat as methods for filling up matrices so long as in the end you end up with a Mat that you then use as an operator. But I'd still like to see/understand a little more of the construction process. Classically one would do that

ufuncs, iterators

2005-08-19 Thread Simon Burton
Hi, Along the lines of python's numarray [1], we need some way of operating pointwise (and inner/outer operations) on Mat/Vec objects. In particular, we need things like the following: (a) v=add.reduce(m) (sum along rows/cols of a Mat to produce a Vec) (b) m=add.outer(v1,v2) (sum of all

ufuncs, iterators

2005-08-18 Thread Matthew Knepley
Simon Burton simon at arrowtheory.com writes: Hi, Along the lines of python's numarray [1], we need some way of operating pointwise (and inner/outer operations) on Mat/Vec objects. In particular, we need things like the following: (a) v=add.reduce(m) (sum along rows/cols of a Mat to

ufuncs, iterators

2005-08-18 Thread Barry Smith
Simon, There is not because what does MatSet() mean for a sparse matrix? Make it dense, just set all the current nonzeros, error? You tell us, I could live with either of the later two but don't really like the first. Barry BTW: possibly related note, are you using dense matrices

ufuncs, iterators

2005-08-18 Thread Barry Smith
On Fri, 19 Aug 2005, S V N Vishwanathan wrote: Hi! BTW: possibly related note, are you using dense matrices sometimes to represent just 2-arrays; that is, not as representations of linear operators. If so, I do not think this is the correct approach! Conceptually PETSc Mat's are

ufuncs, iterators

2005-08-18 Thread Barry Smith
What is x1, x2 and ip? Barry On Fri, 19 Aug 2005, S V N Vishwanathan wrote: Hi! I am not sure I understand the fine difference. As far as we are concerned, all the operations which we are doing (point wise addition, addition, multiplication etc.) are on the linear operator.