Arrays Intersection
- From: Infinity77 <andrea.gavana@xxxxxxxxx>
- Date: Fri, 30 May 2008 04:34:58 -0700 (PDT)
Hi All,
I have received so many nice answers in this newsgroup that I
thought I could ask one more question. I am trying to find the
intersection of 2 one-dimensional integer arrays, where "intersection"
means the common elements in both arrays, i.e.:
a = [1,2,3,4,5,6]
b = [5, 6, 7]
intersection(a, b) ==> [5, 6]
At the moment I am working with Python, which handles very well sets,
lists and structures for which it's easy to define an "intersection",
but as I have many many arrays to compare, this is becoming a bit slow
so I thought to use fortran. Unfortunately, my google-fu failed me as
I couldn't find anything related to "array intersection" in Fortran.
Does anyone know what I should do in order to achieve a fast solution
to this problem?
Thank you very much for your suggestions.
Andrea.
.
- Follow-Ups:
- Re: Arrays Intersection
- From: glen herrmannsfeldt
- Re: Arrays Intersection
- From: Arjen Markus
- Re: Arrays Intersection
- Prev by Date: Re: one-liner for characater replacement
- Next by Date: Re: newbie: that mapping CHARACTER*2 to INTEGER*2 question
- Previous by thread: .true. help
- Next by thread: Re: Arrays Intersection
- Index(es):
Relevant Pages
|
|