J
John Everett
Thanks to your suggestions...
I have fixed the problem.
I have reduced the search from 10 minutes to 5 seconds.
I combined the C++ STL map ability with a PERL trick.
1. I turned both dot lists in to strings for simplicity of comparison.
2. I loop through A_dots and associated the xyz_string with 1.
typedef map< char, int > char_int_map;
char_int_map search_map;
// while looping though A_dots
search_map ["33.224 31.332 11.332"] = 1
3. Then I loop through B_dots and test for the presence of the dot
in the map.
for ( int x=0; x<=100000; x++ )
{
if ( ! search_map[ B_dots[x] ] )
{
// record the dot since it is not in A_dots
}
}
Thanks,
John
I have fixed the problem.
I have reduced the search from 10 minutes to 5 seconds.
I combined the C++ STL map ability with a PERL trick.
1. I turned both dot lists in to strings for simplicity of comparison.
2. I loop through A_dots and associated the xyz_string with 1.
typedef map< char, int > char_int_map;
char_int_map search_map;
// while looping though A_dots
search_map ["33.224 31.332 11.332"] = 1
3. Then I loop through B_dots and test for the presence of the dot
in the map.
for ( int x=0; x<=100000; x++ )
{
if ( ! search_map[ B_dots[x] ] )
{
// record the dot since it is not in A_dots
}
}
Thanks,
John