Re: set intersection -> true/false
- From: Willem <willem@xxxxxxxx>
- Date: Mon, 30 May 2005 14:38:47 +0000 (UTC)
oanacb@xxxxxxxxx wrote:
) i am looking for an algorithm that without calculating/storing the
) result of a set intersection (i have rather large sets...and a lot of
) them) gives just a bool value - true : the sets have an non-void
) intersection; or - false : the sets are disjoint. So to say, it stops
) after it finds the first common element of the two sets.
) If i write it myself, even if it stops, the function still takes
) a lot of time :( ; much faster it goes with STL set-intersection but
) then of course the whole intersection set is computed.
) thanks a lot! grateful for any ideas...
This question has already been answered on this newsgroup within the last
few weeks. It must be a popular question with programming instructors.
Use a hash table.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.
- Follow-Ups:
- Re: set intersection -> true/false
- From: Oana
- Re: set intersection -> true/false
- From: Oana
- Re: set intersection -> true/false
- References:
- set intersection -> true/false
- From: oanacb
- set intersection -> true/false
- Prev by Date: set intersection -> true/false
- Next by Date: Re: Advice for mid-life career change (to programming)
- Previous by thread: set intersection -> true/false
- Next by thread: Re: set intersection -> true/false
- Index(es):
Relevant Pages
|