help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing replicated rows from a (large) matrix


From: Etienne Grossmann
Subject: Re: removing replicated rows from a (large) matrix
Date: Sun, 06 Aug 2000 11:10:02 +0100
User-agent: WEMI/1.13.7 (Shimada) FLIM/1.13.2 (Kasanui) Emacs/20.7 (i386-debian-linux-gnu) (with unibyte mode)


  Hello,

  thanks for pointing out the bug, Joao.

  The good news is that I fixed the bug, basically by copying Paul
Kienzle and Daniel Calvelo's sortrows() code into lexicosort(). The
main difference between the two is that lexicosort returns the sorted
indices too.

  The bad news is that there was that bug for real-valued data, all
this time ...

  Fixed lex_cmp() and test_lexicosort too, and updated the toolbox in
which they live :

  http://anonimo.isr.ist.utl.pt/Šþetienne/octave/misc.2000.08.06.tar.gz

  Etienne

======================================================================
Hi,

No free lunch :-)

Your lexicosort() was so fast that I decided to investigate it. It looks
that it only work for integers... you should make it clear in the help,
although 'lexicographicaly' somehow implies discrete values.

The example ilustrates the problem.

octave:238> [b, lexicosort (b)]
ans =

  0.097587  0.819460  0.142899  0.096627
  0.656920  0.779910  0.204675  0.582550
  0.479985  0.728203  0.097587  0.819460
  0.792401  0.302763  0.544916  0.112166
  0.142899  0.096627  0.479985  0.728203
  0.978989  0.806111  0.792401  0.302763
  0.204675  0.582550  0.915432  0.289305
  0.821141  0.502010  0.656920  0.779910
  0.915432  0.289305  0.821141  0.502010
  0.544916  0.112166  0.978989  0.806111

My 'unique' was made for reals. When I wrote it I thought in a similar
approach to yours, considering each column to be a 'digit' of a number,
but I abandoned tha idea.

Thanks,
Joao



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]