Re: Efficient Vector Comparison



Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx> writes:

Yao Qi <qiyaoltc@xxxxxxxxx> writes:

"Jim Langston" <tazmaster@xxxxxxxxxxxxxx> writes:

"Yao Qi" <qiyaoltc@xxxxxxxxx> wrote in message
news:m34pks4g7i.fsf@xxxxxxxxxxxx

In our program, we will compare every two vectors. In current
implementation, we compare every element of that vector until we get
the
comparison result. It is not any more efficient way to do this?

b.t.w the length of vector is variable.

Comparing two vectors for what, equality?

Yes, but more than this. We have to compare two vectors to see if they
are equal or one is bigger or smaller than the other one.

What does it mean for a vector to be bigger or smaller than another one?

One possibility is lexicographical ordering. The OP's statement
"...we compare every element of that vector until we get the
comparison result" suggests this ordering is the one desired.
--
"Sanity is not statistical."
--George Orwell
.



Relevant Pages

  • Re: Re : Re : Re : Re : [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3
    ... It is only that much bigger if you compare to 16 bits integer compilers, ... For romcc I had a 3x code bloat over had crafted assembler, ...
    (Linux-Kernel)
  • Re: 715
    ... compare the lack of interest in Bond's ... chasing Ruth and Aaron to the frenzy when Aaron was was approaching 715 ... Steve ... The steroid controversy will only make it bigger. ...
    (rec.music.gdead)
  • how to get Datagrid column header width
    ... I need to retrieve the column header width to compare it with the column ... width (and set the column width to the one which is bigger) ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Mens Hour Books
    ... Yes, smaller in size, but bigger in applications. ... So we compare "Hey, my ... PDA can not only translate South-Mongolian to German, ...
    (rec.arts.sf.composition)
  • Comparing two textboxes
    ... I like to compare two textboxes containing double values. ... should ever be bigger than the first one. ... validator elements in VisualStudio.Net? ...
    (microsoft.public.dotnet.framework.aspnet)