search for: set_intersect

Displaying 8 results from an estimated 8 matches for "set_intersect".

Did you mean: set_intercept
2004 Oct 13
2
[LLVMdev] set_intersect and Visual C compiler
----- Original Message ----- From: "Paolo Invernizzi" <arathorn at fastwebnet.it> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Wednesday, October 13, 2004 3:12 AM Subject: Re: [LLVMdev] set_intersect and Visual C compiler > Both are working well on VC. Just tested. > > template<class STy> > void set_intersect(STy &S1, const STy &S2) { > for(STy::iterator I = S1.begin(), E = S1.end(); I != E; ) > if (S2.count(*I)) > S1.erase(*I++); > else &...
2004 Oct 12
5
[LLVMdev] set_intersect and Visual C compiler
...; up the build environment now, with help from Paolo and have started to > > work on fixing some of the problems. > > Great, I'm glad we're all working together on this! :) > > > One thing that the compiler absolutely does not understand is the > > definition of set_intersect in include/llvm/ADT/SetOperations.h, and I > > am having a hard time understanding it myself. > > > > template <template<class S1ElTy> class S1Ty, class ETy, class S2Ty> > > void set_intersect(S1Ty<ETy> &S1, const S2Ty &S2) { > > for (typen...
2004 Oct 13
0
[LLVMdev] set_intersect and Visual C compiler
Both are working well on VC. Just tested. template<class STy> void set_intersect(STy &S1, const STy &S2) { for(STy::iterator I = S1.begin(), E = S1.end(); I != E; ) if (S2.count(*I)) S1.erase(*I++); else ++I; } template <class S1Ty, class S2Ty> void set_intersect(S1Ty &S1, const S2Ty &S2) { for (typename S1Ty::iterator I = S1.begi...
2004 Oct 12
3
[LLVMdev] set_intersect and Visual C compiler
...LVM in VS7.1, so I contacted Paolo Invernizzi to find the status of his effort and to help out. I have set up the build environment now, with help from Paolo and have started to work on fixing some of the problems. One thing that the compiler absolutely does not understand is the definition of set_intersect in include/llvm/ADT/SetOperations.h, and I am having a hard time understanding it myself. template <template<class S1ElTy> class S1Ty, class ETy, class S2Ty> void set_intersect(S1Ty<ETy> &S1, const S2Ty &S2) { for (typename S1Ty<ETy>::iterator I = S1.begin(); I...
2004 Oct 12
0
[LLVMdev] set_intersect and Visual C compiler
...nd to help out. I have set > up the build environment now, with help from Paolo and have started to > work on fixing some of the problems. Great, I'm glad we're all working together on this! :) > One thing that the compiler absolutely does not understand is the > definition of set_intersect in include/llvm/ADT/SetOperations.h, and I > am having a hard time understanding it myself. > > template <template<class S1ElTy> class S1Ty, class ETy, class S2Ty> > void set_intersect(S1Ty<ETy> &S1, const S2Ty &S2) { > for (typename S1Ty<ETy>::iter...
2004 Oct 12
2
[LLVMdev] set_intersect and Visual C compiler
...004 14:01, Chris Lattner wrote: > Okay, it's pretty simple.  Given two sets (e.g. std::set), it walks > through one of them.  For each element in the set it checks to see if the > other contains the element.  if not it removes it. This is a N log(M) algorithm. Why don't we use the set_intersection algorithm which runs in N+M time? -- Alkis
2004 Oct 12
0
[LLVMdev] set_intersect and Visual C compiler
...wrote: > > Okay, it's pretty simple. �Given two sets (e.g. std::set), it walks > > through one of them. �For each element in the set it checks to see if the > > other contains the element. �if not it removes it. > > This is a N log(M) algorithm. Why don't we use the set_intersection > algorithm which runs in N+M time? I would have no problem with that :) -Chris -- http://llvm.org/ http://nondot.org/sabre/
2009 Jan 17
0
Fast set intersection
I was wondering if there were any R packages supporting fast set intersection. I am aware of base::intersection, bit::`&`, and set::set_intersection, each of which has its advantages. base::intersection is space-efficient and accepts arbitrary unsorted lists of arbitrary base types. set::set_intersection is very fast but requires space and time proportional to the size of the universe, a contiguous range of integers. set::set_intersection...