From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: Re: Submission of Matrix Kronecker Product for calc Date: Wed, 5 Mar 2008 13:43:27 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_ad3f34e2-e991-46b0-995b-c6a49402dca1_" X-Trace: ger.gmane.org 1204721030 11380 80.91.229.12 (5 Mar 2008 12:43:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2008 12:43:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 05 13:44:16 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JWsyh-0006Cw-WB for ged-emacs-devel@m.gmane.org; Wed, 05 Mar 2008 13:44:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWsyA-0001lR-On for ged-emacs-devel@m.gmane.org; Wed, 05 Mar 2008 07:43:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JWsy3-0001jU-4J for emacs-devel@gnu.org; Wed, 05 Mar 2008 07:43:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JWsy1-0001iZ-7O for emacs-devel@gnu.org; Wed, 05 Mar 2008 07:43:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWsy0-0001iG-S3 for emacs-devel@gnu.org; Wed, 05 Mar 2008 07:43:28 -0500 Original-Received: from blu139-omc2-s7.blu139.hotmail.com ([65.55.175.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JWsy0-0004o3-9S for emacs-devel@gnu.org; Wed, 05 Mar 2008 07:43:28 -0500 Original-Received: from BLU104-W41 ([65.55.162.184]) by blu139-omc2-s7.blu139.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 Mar 2008 04:43:27 -0800 X-Originating-IP: [90.32.145.133] Importance: Normal X-OriginalArrivalTime: 05 Mar 2008 12:43:27.0432 (UTC) FILETIME=[82422C80:01C87EBE] X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91374 Archived-At: --_ad3f34e2-e991-46b0-995b-c6a49402dca1_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Jay, 1) No problem if you like to tidy up. Please do as you like. 2) For the legal paper, no problem either. Please send me the form and=20 make me know whether I can fill it electronically, or if I need a postal=20 real paper send. 3) Concerning whether the result should or should not be a matrix, I am=20 not sure that this is 100% useful. My intent was not to add extra=20 useless bracketing. However the counterpart of this is that if you use=20 the calc-Funckron in Lisp you would may need in the sequel extra testing=20 in order to know into what level of bracketing it has resulted. Maybe=20 some extra optional argument telling whether to minimize bracketing or=20 not would therefore be useful. However, not being a Lisp expert I did not know how to make this on the=20 Lisp function on the one hand, and have it compatible with Stack=20 manipulation on the other hand (in case of Stack manipulation some "C-u=20 + digit" before calling function could serve telling whether bracketing=20 is to be minimized or not). In fact, for my own purpose (I wanted to computed some Walsh codes by=20 "kron"-ing some 2x2 Hadamard matrices together) and having=20 systematically matrices and not vectors was sufficient. 4) note that the function name "kron" has already some publicity as it=20 is borrowed from Matlab and Scilab (a license-free equivalent made by=20 INRIA and ENPC France). So I suggest to keep the same. BR, Vincent. Jay Belanger a =E9crit : > Vincent Bela=EFche writes: > ... > =20 >> Maybe this can be useful to somebody else. >> =20 > > Yes. Would there be a problem if I tidied it up a bit? > Altogether, it would end up 20 lines or so; to be included in Calc, > we would need legal papers from you. > > =20 >> (defun calcFunc-kron (x y) >> "Kronecker product of matrices x and y. >> =20 > > If x and y are not explicitly matrices, I take it they will be > implicitly considered matrices. =20 > > =20 >> After computation the result may be desembedded from matrix so that >> the Kronecker product of two scalars is a scalar, >> =20 > ... > > Why should the result not be a matrix? Is it useful? > > Jay > > > =20 _________________________________________________________________ Microsoft vous offre un logiciel pour classer, retoucher et partager vos ph= otos ! http://www.windowslive.fr/galerie/= --_ad3f34e2-e991-46b0-995b-c6a49402dca1_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Jay,

1) No problem if you like to tidy up. Please do as you lik= e.

2) For the legal paper, no problem either. Please send me the for= m and
make me know whether I can fill it electronically, or if I need a= postal
real paper send.

3) Concerning whether the result should= or should not be a matrix, I am
not sure that this is 100% useful. My = intent was not to add extra
useless bracketing. However the counterpart= of this is that if you use
the calc-Funckron in Lisp you would may nee= d in the sequel extra testing
in order to know into what level of brack= eting it has resulted. Maybe
some extra optional argument telling wheth= er to minimize bracketing or
not would therefore be useful.

Howe= ver, not being a Lisp expert I did not know how to make this on the
Lis= p function on the one hand, and have it compatible with Stack
manipulat= ion on the other hand (in case of Stack manipulation some "C-u
+ digit"= before calling function could serve telling whether bracketing
is to b= e minimized or not).

In fact, for my own purpose (I wanted to comput= ed some Walsh codes by
"kron"-ing some 2x2 Hadamard matrices together) = and having
systematically matrices and not vectors was sufficient.
<= br>4) note that the function name "kron" has already some publicity as it <= br>is borrowed from Matlab and Scilab (a license-free equivalent made by INRIA and ENPC France). So I suggest to keep the same.

BR,
= Vincent.



Jay Belanger a =E9crit :
> Vincent Bela=EFche= writes:
> ...
>
>> Maybe this can be = useful to somebody else.
>>
>
> Yes. Would there be a proble= m if I tidied it up a bit?
> Altogether, it would end up 20 lines or so;= to be included in Calc,
> we would need legal papers from you.
>
= >
>> (defun calcFunc-kron (x y)
>> "Kronecker product of matrices = x and y.
>>
>
> If x and y are not explicitly matrices, I tak= e it they will be
> implicitly considered matrices.
>
>
>>= After computation the result may be desembedded from matrix so that
>> = the Kronecker product of two scalars is a scalar,
>>
> ...
><= br>> Why should the result not be a matrix? Is it useful?
>
> Jay>
>
>




Windows Live Messenger 2008 vient de= sortir, enti=E8rement personnalisable ! T=E9l=E9chargez gratuitement Messenge= r 2008 = --_ad3f34e2-e991-46b0-995b-c6a49402dca1_--