MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: element selection




comp[x_?VectorQ,y_?VectorQ, maxDif_] :=
        Abs[#[[1]]-#[[2]]]<=maxDif&] /; 


{2.04 Second,16650}

Bob Hanlon

> From: "Bruyndonckx P." <pbruynd at>
To: mathgroup at
> Date: 2005/01/20 Thu AM 03:47:45 EST
> To: mathgroup at
> Subject: [mg53630] [mg53605] element selection
> I have two long sorted lists of Integers.  If the difference between a number 
in list 1 and a 
> number in list 2 is less than a certain value, both are selected to create a 
couple.  I am 
> looking for a fast way to go through both lists and extract these elements 
to create a new list 
> of couples.  I tried a number of things, but all of them were rather slow so I 
need some expert 
> advice here.
> Thx,
> Peter

  • Prev by Date: Re: TableForm and MatrixForm
  • Next by Date: Re: Memory usage
  • Previous by thread: Re: element selection
  • Next by thread: Re: element selection