Roger, Raul, thanks for attending me on the explicit definition with 13 and showing me the tacit form. I'm involved in a comparison of Haskell versus J in an application and I want to express the wanted functionality in the most elegant J representation. Jan.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Hui Sent: dinsdag 9 oktober 2007 23:28 To: Programming forum Subject: Re: [Jprogramming] tacit solution wanted for the mean of quantisationclasses Correction: g (/:@[EMAIL PROTECTED] { mean/.)&, gamma ----- Original Message ----- From: Roger Hui <[EMAIL PROTECTED]> Date: Tuesday, October 9, 2007 14:20 Subject: Re: [Jprogramming] tacit solution wanted for the mean of quantisation classes To: Programming forum <[email protected]> > g (/:[EMAIL PROTECTED]@[ { mean/.)&, gamma > > > > ----- Original Message ----- > From: "Jacobs, Jan" <[EMAIL PROTECTED]> > Date: Tuesday, October 9, 2007 12:42 > Subject: [Jprogramming] tacit solution wanted for the mean of > quantisation classes > To: [email protected] > > > ls, > > I've a small grey-value bitmap (gamma) and a given class assignment > > (g), see below. I need to compute the class means, but sorted in > > normal > > order: first class 0, then 1 ... > > In the example below I assume 4 classes. > > > > mean=:+/%# > > > > g=:4|>:i.2 3 NB. sample quantisation states > > gamma=:?2 3$255 NB. sample grey-value bitmap > > > > mu=:(/:~.,g){(,g)mean/.,gamma > > > > Is there a nice tacit solution for these means (mu)? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
