Set Operations on floating point arrays
From: Graham (GrahamWilsonCA_at_yahoo.ca)
Date: 03/31/04
- Next message: Guillaume: "Re: A quick if question"
- Previous message: Jerald Fijerald: "Re: Colours on console outputs"
- Next in thread: Eric Sosman: "Re: Set Operations on floating point arrays"
- Reply: Eric Sosman: "Re: Set Operations on floating point arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Mar 2004 07:24:39 -0800
Does anyone have a quick reference or snippet of code that describes a
quick way of performing set operations on arrays of doubles? In
particular, I need the union and intersection of a bunch of epoch
timestamps, i.e. seconds (including the fractional part) since May 24,
1968. Each array is already guaranteed to be sorted in time so my
thought was to brute force it:
i.e. for the union:
- initialise union set to the one of the double arrays
- check for the presence of each new timestamp and append to the end
if not present
- resort
The trouble is that the arrays are large and it is taking quite a
while. Any ideas or pointers (other than 'void *v') would be much
appreciated.
Graham
- Next message: Guillaume: "Re: A quick if question"
- Previous message: Jerald Fijerald: "Re: Colours on console outputs"
- Next in thread: Eric Sosman: "Re: Set Operations on floating point arrays"
- Reply: Eric Sosman: "Re: Set Operations on floating point arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|