Re: [Haskell-cafe] matrix computations based on the GSL

2006-03-18 Thread Alberto Ruiz
The Atlas library (Linux_P4SSE2) seems to be 9x faster (!) than gslcblas in matrix multiplication: ghc-6.4.1 --make examples/pca.hs GSL/debuggslaux.o \ -L$(LIBATLAS) -lcblas /usr/lib/libgsl.a -latlas $ time ./a.out GSL Wrapper gsl_matrix_fscanf: 2 s GSL Wrapper submatrix: 0 s GSL Wrapper

Re: [Haskell-cafe] matrix computations based on the GSL

2006-03-17 Thread Alberto Ruiz
On Thursday 16 March 2006 18:13, Frederik Eaton wrote: Also, in my experiments (with matrix inversion) it seems, subjectively, that Octave is about 5 or so times faster for operations on large matrices. Presumably you've tested this as well, do you have any comparison results? Frederik, you

Re: [Haskell-cafe] matrix computations based on the GSL

2006-03-16 Thread Frederik Eaton
Hi Alberto, I'm sorry if this has been discussed before... I'm reading your paper, at one point it says (re. the PCA example): Octave achieves the same result, slightly faster. (In this experiment we have not used optimized BLAS libraries which can improve efficiency of the GSL) That seems to

Re: [Haskell-cafe] matrix computations based on the GSL

2005-12-09 Thread Frederik Eaton
Hi, I've just looked through this discussion, since I'm working on my own library, I wanted to see what people are doing. It's something like this, using the Prepose (Implicit Configurations) paper: data L n = L Int deriving (Show, Eq, Ord) -- singleton domain type S = L Zero class (Bounded

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-19 Thread Alberto Ruiz
Hello Bulat, thanks a lot for your message, the RULES pragma is just what we need! However, in some initial experiments I have observed some strange behavior. For instance, in the following program: -- {-# OPTIONS_GHC -fglasgow-exts #-} apply :: (Int

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-13 Thread Alberto Ruiz
Hello! I have a few doubts concerning the LinearAlgebra library... On Friday 08 July 2005 11:29, Henning Thielemann wrote: I would remove the 'matrix' portions of the function names, since this information is already contained in the module name. E.g. after importing LinearAlgebra.Matrix as

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-13 Thread Henning Thielemann
On Wed, 13 Jul 2005, Alberto Ruiz wrote: But now I have two problems: 1) If I define foo :: Vector.T a - Matrix.T a Haddock (version 0.6) shows just this: foo :: T a - T a I don't know how to tell haddock that I want the full names in the signatures. I don't know, too. I'm afraid

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-09 Thread Glynn Clements
Keean Schupke wrote: So the linear operator is translation (ie: + v)... effectively 'plus' could be viewed as a function which takes a vector and returns a matrix (operator) (+) :: Vector - Matrix Since a matrix _is_ not a linear map but only its representation, this would

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Alberto Ruiz
The server is working again. On Thursday 07 July 2005 20:58, Alberto Ruiz wrote: I' sorry, our web server is temporarily down :-( http://dis.um.es/~alberto/hmatrix/matrix.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Alberto Ruiz wrote: The server is working again. On Thursday 07 July 2005 20:58, Alberto Ruiz wrote: I' sorry, our web server is temporarily down :-( http://dis.um.es/~alberto/hmatrix/matrix.html I would remove the 'matrix' portions of the function names, since

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Thu, 7 Jul 2005, Alberto Ruiz wrote: Hello! Thank you very much for all your suggestions. A new version of the library can be found at: http://dis.um.es/~alberto/hmatrix/matrix.html If the Matrix type would be parametrised then Matrix.fromBlocks could use a more natural indexing.

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread David Roundy
On Thu, Jul 07, 2005 at 03:08:50PM +0200, Henning Thielemann wrote: On Thu, 7 Jul 2005, David Roundy wrote: On Tue, Jul 05, 2005 at 08:17:58PM +0200, Henning Thielemann wrote: The example, again: If you write some common expression like transpose x * a * x then both the human

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Keean Schupke
Henning Thielemann wrote: My objections to making everything a matrix were the objections I sketched for MatLab. The example, again: If you write some common expression like transpose x * a * x Which just goes to show why haskell limits the '*' operator to multiplying the same types. Keep

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Thu, 7 Jul 2005, David Roundy wrote: On the other hand, this is sort of a silly debate, since the API *I* want is a subset of the API *you* want. The API you want is certainly not just a subset of what I want. E.g. the singular value decomposition in your favorite API will probably return

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Alberto Ruiz wrote: The server is working again. On Thursday 07 July 2005 20:58, Alberto Ruiz wrote: I' sorry, our web server is temporarily down :-( http://dis.um.es/~alberto/hmatrix/matrix.html I would also prefer a vector of complex numbers for the FFT

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Keean Schupke
Henning Thielemann wrote: Let me elaborate on that: In some cases putting vectors as columns into a matrix then applying a matrix operation on this matrix leads to the same like to 'map' a matrix-vector operation to a list of vectors. But in other cases (as the one above) this is not what you

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Keean Schupke wrote: Henning Thielemann wrote: My objections to making everything a matrix were the objections I sketched for MatLab. The example, again: If you write some common expression like transpose x * a * x Which just goes to show why haskell limits the

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Keean Schupke wrote: Okay, this approach is starting to make sense to me... I can see now that Vectors are a different type of object to Matrices. Vectors represent points in N-Space and matrices represent operations on those points That's what I wanted to express.

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Keean Schupke
Henning Thielemann wrote: I'm excited if your code gets swamped by conversions between Double and Matrix then. I really plead for representing everything with strings, this is the most simple and most flexible solution! :-] Surely its a case of balancing the advantage of type safety against

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Keean Schupke
Henning Thielemann wrote: Do you mean [x,y,z,1] * [[1,0,0,0],[0,1,0,0],[0,0,1,0],[dx,dy,dz,dw+1]] ? Erm, yes thats what I meant ... but you obviously got the point. but how is this different from adding vectors? If we allow vector addition then we no longer have the nice separation

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread David Roundy
On Fri, Jul 08, 2005 at 03:33:16PM +0200, Henning Thielemann wrote: On Thu, 7 Jul 2005, David Roundy wrote: On the other hand, this is sort of a silly debate, since the API *I* want is a subset of the API *you* want. The API you want is certainly not just a subset of what I want. E.g.

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Keean Schupke wrote: Henning Thielemann wrote: Do you mean [x,y,z,1] * [[1,0,0,0],[0,1,0,0],[0,0,1,0],[dx,dy,dz,dw+1]] ? Erm, yes thats what I meant ... but you obviously got the point. but how is this different from adding vectors? If we allow vector addition

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Keean Schupke
Henning Thielemann wrote: In general a vector need not to be a linear operator. You talked about vector translation, translation is not a linear operator. You gave some process to map the problem to somewhere, where it becomes a linear operator. Other people said that the scalar product with a

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, David Roundy wrote: I don't particularly care what API you use for svd, since it's trivial to convert from one API to the other. It's matrix arithmetic I care about, since that's the complicated part of the API. Of course I want to use the results of more complicated

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Keean Schupke wrote: So the linear operator is translation (ie: + v)... effectively 'plus' could be viewed as a function which takes a vector and returns a matrix (operator) (+) :: Vector - Matrix Since a matrix _is_ not a linear map but only its representation,

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Keean Schupke
Henning Thielemann wrote: On Fri, 8 Jul 2005, Keean Schupke wrote: So the linear operator is translation (ie: + v)... effectively 'plus' could be viewed as a function which takes a vector and returns a matrix (operator) (+) :: Vector - Matrix Since a matrix _is_ not a linear map

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Henning Thielemann
On Fri, 8 Jul 2005, Keean Schupke wrote: Henning Thielemann wrote: On Fri, 8 Jul 2005, Keean Schupke wrote: So the linear operator is translation (ie: + v)... effectively 'plus' could be viewed as a function which takes a vector and returns a matrix (operator) (+) :: Vector -

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-08 Thread Benjamin Franksen
On Friday 08 July 2005 17:46, Henning Thielemann wrote: Vectors can be used and abused for many things but an object which can be called a vector (because of its ability of to be added and to be scaled) is not a linear operator itself and does not naturally represent one. At least for finite

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread David Roundy
On Tue, Jul 05, 2005 at 08:17:58PM +0200, Henning Thielemann wrote: The example, again: If you write some common expression like transpose x * a * x then both the human reader and the compiler don't know whether x is a true matrix or if it simulates a column or a row vector. It may be that

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread David Roundy
On Tue, Jul 05, 2005 at 07:49:56PM +0200, Henning Thielemann wrote: On Tue, 5 Jul 2005, Keean Schupke wrote: David Roundy wrote: In short, especially since the folks doing the work (not me) seem to want plain old octave-style matrix operations, it makes sense to actually do that.

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Lennart Augustsson
David Roundy wrote: The issue is that Haskell (as far as I understand, and noone has suggested anything to the contrary) doesn't have a sufficiently powerful type system to represent matrices or vectors in a statically typed way. It would be wonderful if we could represent matrix multiplication

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Henning Thielemann
On Thu, 7 Jul 2005, David Roundy wrote: On Tue, Jul 05, 2005 at 08:17:58PM +0200, Henning Thielemann wrote: The example, again: If you write some common expression like transpose x * a * x then both the human reader and the compiler don't know whether x is a true matrix or if it

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Henning Thielemann
On Thu, 7 Jul 2005, Henning Thielemann wrote: Also note that if you have several vectors x for which you want to compute the dot product with metric A, and if you want to do this efficiently, you'll have to convert your list of vectors into a matrix anyways. If you bundle some vectors as

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Henning Thielemann
On Thu, 7 Jul 2005, David Roundy wrote: Also note that if you have several vectors x for which you want to compute the dot product with metric A, and if you want to do this efficiently, you'll have to convert your list of vectors into a matrix anyways. Writing functions of vectors instead

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Henning Thielemann
On Thu, 7 Jul 2005, Henning Thielemann wrote: fft([1,0;0,0]) ans = 1 0 1 0 Also funny: conv([1;1],[1,1]) ans = 1 2 1 conv([1;1;1],[1,1]) ans = 1 2 2 1 ___ Haskell-Cafe mailing list

RE: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Conal Elliott
how to define LMap and what operations it supports. It may be worth exploring, though. Cheers, - Conal -Original Message- From: Lennart Augustsson Sent: Thursday, July 07, 2005 5:44 AM To: David Roundy Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] matrix computations based

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Alberto Ruiz
Hello! Thank you very much for all your suggestions. A new version of the library can be found at: http://dis.um.es/~alberto/hmatrix/matrix.html Here are the main changes: - Vector and Matrix are now different types with different functions operating on them. They cannot be interchanged and

RE: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Henning Thielemann
On Thu, 7 Jul 2005, Conal Elliott wrote: Maybe we could solve this problem in a simple and general way by working with a more abstract notion of linear maps, rather than the matrices commonly used to represent linear maps. Instead of Matrix n m, where n and m are either integers (requiring

RE: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Conal Elliott
Sorry for the delayed response, which has now led to two separate threads. See below. From: Henning Thielemann On Wed, 29 Jun 2005, Conal Elliott wrote: On row column vectors, do you really want to think of them as {1,...,n)-R? They often represent linear maps from R^n to R or R to

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Henning Thielemann
On Thu, 7 Jul 2005, Alberto Ruiz wrote: Hello! Thank you very much for all your suggestions. A new version of the library can be found at: http://dis.um.es/~alberto/hmatrix/matrix.html I get time-out/ :-( - Vector and Matrix are now different types with different functions operating on

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-07 Thread Alberto Ruiz
I' sorry, our web server is temporarily down :-( On Thursday 07 July 2005 20:37, Alberto Ruiz wrote: Hello! Thank you very much for all your suggestions. A new version of the library can be found at: http://dis.um.es/~alberto/hmatrix/matrix.html

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-06 Thread Henning Thielemann
On Tue, 5 Jul 2005, Michael Walter wrote: On 7/5/05, Henning Thielemann [EMAIL PROTECTED] wrote: The example, again: If you write some common expression like transpose x * a * x then both the human reader and the compiler don't know whether x is a true matrix or if it simulates a

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-05 Thread Keean Schupke
Henning Thielemann wrote: I'm uncertain about how who want to put the different kinds of multiplication into one method, even with multi-parameter type classes. You need instances (*) :: Matrix - Matrix - Matrix (*) :: RowVector - Matrix - RowVector (*) :: Matrix - ColumnVector - ColumnVector

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-05 Thread Keean Schupke
David Roundy wrote: In short, especially since the folks doing the work (not me) seem to want plain old octave-style matrix operations, it makes sense to actually do that. *Then* someone can implement an ultra-uber-tensor library on top of that, if they like. And I would be interested in a nice

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-05 Thread Henning Thielemann
On Tue, 5 Jul 2005, Keean Schupke wrote: David Roundy wrote: In short, especially since the folks doing the work (not me) seem to want plain old octave-style matrix operations, it makes sense to actually do that. *Then* someone can implement an ultra-uber-tensor library on top of that, if

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-05 Thread Henning Thielemann
On Tue, 5 Jul 2005, Keean Schupke wrote: Henning Thielemann wrote: I'm uncertain about how who want to put the different kinds of multiplication into one method, even with multi-parameter type classes. You need instances (*) :: Matrix - Matrix - Matrix (*) :: RowVector - Matrix -

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-05 Thread Michael Walter
On 7/5/05, Henning Thielemann [EMAIL PROTECTED] wrote: The example, again: If you write some common expression like transpose x * a * x then both the human reader and the compiler don't know whether x is a true matrix or if it simulates a column or a row vector. But since a, by definition

RE: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Henning Thielemann
Let me a bit elaborate on what I wrote yesterday. On Wed, 29 Jun 2005, Henning Thielemann wrote: I think matrices and derivatives are very different issues. I have often seen that the first derivative is considered as vector, and the second derivative is considered as matrix. In this spirit

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread David Roundy
On Wed, Jun 29, 2005 at 10:23:23PM +0200, Henning Thielemann wrote: More specific: You give two different things the same name. You write A*B and you mean a matrix multiplication. Matrix multiplication means finding a representation of the composition of the operators represented by A

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Henning Thielemann
On Thu, 30 Jun 2005, David Roundy wrote: If we support matrix-matrix multiplication, we already automatically support matrix-column-vector and row-vector-matrix multiplication, whether or not we actually intend to, unless you want to forbid the use of 1xn or nx1 matrices. So (provided we

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread David Roundy
On Thu, Jun 30, 2005 at 02:20:16PM +0200, Henning Thielemann wrote: On Thu, 30 Jun 2005, David Roundy wrote: If we support matrix-matrix multiplication, we already automatically support matrix-column-vector and row-vector-matrix multiplication, whether or not we actually intend to, unless

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Jacques Carette
David Roundy and Henning Thielemann have been arguing about the nature of vectors and matrices, in particular saying: On Thu, Jun 30, 2005 at 02:20:16PM +0200, Henning Thielemann wrote: On Thu, 30 Jun 2005, David Roundy wrote: Matrices _and_ vectors! Because matrices represent

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Jacques Carette
Henning Thielemann wrote: I'm uncertain about how who want to put the different kinds of multiplication into one method, even with multi-parameter type classes. You need instances (*) :: Matrix - Matrix - Matrix (*) :: RowVector - Matrix - RowVector [many other instances removed.]

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Henning Thielemann
On Thu, 30 Jun 2005, Jacques Carette wrote: Henning Thielemann wrote: I'm uncertain about how who want to put the different kinds of multiplication into one method, even with multi-parameter type classes. You need instances (*) :: Matrix - Matrix - Matrix (*) :: RowVector - Matrix -

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Jacques Carette
Henning Thielemann wrote: Data Orientation = Row | Column Data Vector a = Vector Orientation [a] In the first mail you wrote 9. There are row vectors and column vectors, and these are different types. You get type errors if you mix them incorrectly. I interpreted that you want to

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Henning Thielemann
On Thu, 30 Jun 2005, Jacques Carette wrote: Henning Thielemann wrote: Data Orientation = Row | Column Data Vector a = Vector Orientation [a] In the first mail you wrote 9. There are row vectors and column vectors, and these are different types. You get type errors if you mix them

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-30 Thread Benjamin Franksen
On Wednesday 29 June 2005 22:54, Henning Thielemann wrote: On Wed, 29 Jun 2005, Dan Piponi wrote: On Wed, 29 Jun 2005, Jacques Carette wrote: Distinction of row and column vectors is a misconcept Row and column vectors are sometimes worth distinguishing because they can represent

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Alberto Ruiz wrote: In my work I often need linear algebra algorithms and other numeric computations. Nice coincidence: http://www.haskell.org//pipermail/libraries/2005-June/003936.html An option is using scientific computing systems like Matlab, Mathematica, Maple,

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Alberto Ruiz wrote: On Wednesday 29 June 2005 12:31, Henning Thielemann wrote: On Wed, 29 Jun 2005, Alberto Ruiz wrote: In my work I often need linear algebra algorithms and other numeric computations. Nice coincidence:

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Henning Thielemann wrote: On Wed, 29 Jun 2005, Alberto Ruiz wrote: On Wednesday 29 June 2005 12:31, Henning Thielemann wrote: On Wed, 29 Jun 2005, Alberto Ruiz wrote: In my work I often need linear algebra algorithms and other numeric computations. Nice

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread David Roundy
On Wed, Jun 29, 2005 at 01:38:51PM +0200, Alberto Ruiz wrote: Wow! It is exactly the same idea! I did not find the above message by Keean in my google searchs when I decided to work on this, it is very recent! After a quick look to the thread I wish I would have followed the discussions... A

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Jacques Carette
I would recommend that you look very closely at the design of the LinearAlgebra package, the Matrix and Vector constructors, and the underlying implementation data-structure rtable() for Maple's implementation of all these ideas. About 250 person-days were spent on just the high-level design,

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Jacques Carette wrote: 9. There are row vectors and column vectors, and these are different types. You get type errors if you mix them incorrectly. What do you mean with row vectors and column vectors are different types? Do you mean that in a well designed library they

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Jacques Carette
Henning Thielemann wrote: On Wed, 29 Jun 2005, Jacques Carette wrote: 9. There are row vectors and column vectors, and these are different types. You get type errors if you mix them incorrectly. What do you mean with row vectors and column vectors are different types? Do you mean

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Alberto Ruiz
Henning: I was wrong, the different names are synonymes for the same type. :-( I agree that we must statically distinguish Vector and Matrix (see below). Some notes: I would not call it a matrix library but a linear algebra library. Then setup modules like LinearAlgebra.Matrix,

RE: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Conal Elliott
On row column vectors, do you really want to think of them as {1,...,n)-R? They often represent linear maps from R^n to R or R to R^n, which are very different types. Similarly, instead of working with matrices, how about linear maps from R^n to R^m? In this view, column and row vectors,

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Dan Piponi
On Wed, 29 Jun 2005, Jacques Carette wrote: Distinction of row and column vectors is a misconcept Row and column vectors are sometimes worth distinguishing because they can represent entirely different types of object. For example, if a column vector represents an element of a vector space V

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Jacques Carette wrote: If we instead distinguish row and column vectors because we treat them as matrices, then the quadratic form x^T * A * x denotes a 1x1 matrix, not a real. But if you consider x to be a vector without orientation, writing down x^T is

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Dan Piponi wrote: On Wed, 29 Jun 2005, Jacques Carette wrote: Distinction of row and column vectors is a misconcept Row and column vectors are sometimes worth distinguishing because they can represent entirely different types of object. For example, if a column vector

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Jacques Carette
Henning Thielemann wrote: Mathematical notation has the problem that it doesn't distinguish between things that are different but in turn discriminates things which are essentially the same. I used to think that too. And while that is sometimes true, it is actually quite rare! When common

RE: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Conal Elliott wrote: On row column vectors, do you really want to think of them as {1,...,n)-R? They often represent linear maps from R^n to R or R to R^n, which are very different types. Similarly, instead of working with matrices, how about linear maps from R^n to

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Jacques Carette wrote: In fact, type classes in Haskell is a *great* way to do just that! I agree. I'm also aware of that I mean different objects when I write uniformly '1'. But I know that they are somehow different. I'm also ok with not writing a conversion from say the

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Henning Thielemann
On Wed, 29 Jun 2005, Jacques Carette wrote: sarcasmNext thing you know, you'll want a different 'application' symbol for every arity of function, because they are ``different''. /sarcasm Btw. there is less sarcasm in it as may you think. There was already a proposal to extend function

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread karczma
Jacques Carette writes: Henning Thielemann wrote: I don't see the problem. There are three very different kinds of multiplication, they should also have their own signs: Scalar product, matrix-vector multiplication, matrix-matrix multiplication. You see 3 concepts, I see one:

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Jacques Carette
[EMAIL PROTECTED] wrote: One of the things I appreciate and I hate simultaneously in your postings is that you are so categorical. 'tis indeed simultaneously one of my strengths and one of my weaknesses ;-) I also like to play Devil's Advocate, to draw out the interesting arguments.

Re: [Haskell-cafe] matrix computations based on the GSL

2005-06-29 Thread Jacques Carette
Henning Thielemann wrote: I'm also aware of that I mean different objects when I write uniformly '1'. But I know that they are somehow different. Since '1' can safely be used to denote the unit of any monoid, it does indeed have a lot of applications. And of course the syntactic artifact