*./@~:@, I believe *./@~: is supported by special code (if not, it should be).
6!:2 '*./@~: y' [ y=: 1e6$4 0.0114199 6!:2 '*./@~: y' [ y=: 1e6$1 4 0.0100949 Hmm, the times are the same. No special code. ----- Original Message ----- From: Ian Gorse <[email protected]> Date: Wednesday, November 11, 2009 11:43 Subject: [Jprogramming] Checking if all elements are the same To: Programming forum <[email protected]> > Hi everyone, > > This is slightly related my other thread on how to check if the first > and last element were the same. > > If I have > a=. 2 2 2 2 2 2 2 2 > b=. 10 4 $ 2 > c=. 2 2 2 2 2 2 4 > d=. (10 4 $ 2) , 2 2 2 4 > > It can be seen that the list 'a' contains all the same number > It can be seen that all the rows in matrix 'b' are the same > It can be seen that the list 'c' _doesn't_ contain all the same number > It can be seen that the last row of the matrix 'd' is different > of the > result, thus d doesn't contain all the same rows. > > I am looking for a way to perform a check to see if all the elements > are the same or not. > > I have managed to come up with a solution, but it is very ugly > and inefficient > > Thanks ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
