For all the following arrays the non-zero elements
are the same, viz., 1 , and 4$.s are also the same,
viz., i.4 1
s0=: (2;0)$.4 5$1
s1=: (2;0)$.4 7$1
s2=: $. 4$1
s3=: (2;1)$.7 4$1
s4=: (2;0)$. 100 200{.4 5$1
but there is no way to recover s from 4$.s .
4$.s is not invertible.
----- Original Message -----
From: ramacd <[EMAIL PROTECTED]>
Date: Saturday, February 3, 2007 9:05 am
Subject: Re: [Jprogramming] Spare Matrix from Index Matrix
> True, if an assumption is missing about the non-zero element. I
> suggest 1.
> ----- Original Message -----
> From: "Roger Hui" <[EMAIL PROTECTED]>
> To: "Programming forum" <[email protected]>
> Sent: Saturday, February 03, 2007 10:07 AM
> Subject: Re: [Jprogramming] Spare Matrix from Index Matrix
>
>
> > 4$.s is not invertible.
> >
> >
> >
> > ----- Original Message -----
> > From: ramacd <[EMAIL PROTECTED]>
> > Date: Saturday, February 3, 2007 6:07 am
> > Subject: Re: [Jprogramming] Spare Matrix from Index Matrix
> >
> > > It seems Roger is a mortal;
> > >
> > > s=: ?4 4$2
> > > (4&$.)^:_1 (4 $. s)
> > > |domain error
> > > (4&$.)^:_1(4 $.s)
> > >
> > > ...or is my copy of J too old?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm