Displaying 8 results from an estimated 8 matches for "set_intersection".
2004 Oct 13
2
[LLVMdev] set_intersect and Visual C compiler
...typename S1Ty::iterator I = S1.begin(); I != S1.end();) {
> const S1Ty::key_type &E = *I;
> ++I;
> if (!S2.count(E)) S1.erase(E); // Erase element if not in S2
> }
> }
>
> ---
> Paolo Invernizzi
But like Alkis said we should probably just use the stl set_intersection, it
runs in linear time instead of n*lg(n).
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
2004 Oct 12
5
[LLVMdev] set_intersect and Visual C compiler
On Tue, 12 Oct 2004 14:01:21 -0500 (CDT)
Chris Lattner <sabre at nondot.org> wrote:
> On Tue, 12 Oct 2004, Morten Ofstad wrote:
>
> > This is my first post on this mailing list, so bear with me... My name
> > is Morten Ofstad and I work for Hue AS (www.hue.no), a company that
> > makes 3D Visualization software. We are looking into using LLVM for JIT
> >
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.begin(); I !=
2004 Oct 12
3
[LLVMdev] set_intersect and Visual C compiler
Hello,
This is my first post on this mailing list, so bear with me... My name
is Morten Ofstad and I work for Hue AS (www.hue.no), a company that
makes 3D Visualization software. We are looking into using LLVM for JIT
compiling shader programs, to replace our own (slow) VM. A requirement
for this is that we can compile LLVM in VS7.1, so I contacted Paolo
Invernizzi to find the status of his
2004 Oct 12
0
[LLVMdev] set_intersect and Visual C compiler
On Tue, 12 Oct 2004, Morten Ofstad wrote:
> This is my first post on this mailing list, so bear with me... My name
> is Morten Ofstad and I work for Hue AS (www.hue.no), a company that
> makes 3D Visualization software. We are looking into using LLVM for JIT
> compiling shader programs, to replace our own (slow) VM. A requirement
Neat!
> for this is that we can compile LLVM in
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 is...