Re: Compare Datasets or Arrays

From: Cor Ligthert (notmyfirstname_at_planet.nl)
Date: 02/09/05


Date: Wed, 9 Feb 2005 09:49:19 +0100

Justin,

This is the most classic dataprocessing what already whas done on Hollerith
machines. It was called "matching" in that cardpunch concept. That is still
the fastest.

It is doing going foreward in the arrays by matching everytime the keys of
that, it assumes that both arrays are sorted on the key value.

When that is not the case than you can make first from arrayB a tempory
hashtable/sortedlist and than match the keys of arrayA if they are in that
and set than the values to true.

The hashtable/sortedlist gives than at the end the missing members.

I hope this helps?

Cor



Relevant Pages

  • Re: To count number of quadruplets with sum = 0
    ... My attempt uses a different approach: create two sorted arrays, ... and then iterate over them looking for matching ...
    (comp.lang.python)
  • Match using array of column and row references to match with
    ... Can you use the match function or any combination of any function to find in ... intersecting cell's value by matching to arrays of row values or matching to ...
    (microsoft.public.excel.worksheet.functions)
  • Re: hashtable - select by wilecard... is it doable?
    ... and also have fast retrievals? ... If you are only concerned about matching the first few characters then would a TreeSetwork? ...
    (comp.lang.java.programmer)
  • Re: Converting using a hash
    ... What this does is put the keys in a string, separated by a | (which means ... matching 'ab' BEFORE you try matching 'a', or else 'ab' will NEVER be ... Then, we take $re, and turn it into a compiled regex: ... [I'm looking for programming work. ...
    (perl.beginners)
  • index in
    ... I have two arrays whose rows are uniquely identified by the combination ... I need to find the row-indices in ARRAY1 of the rows ... matching those in ARRAY2. ...
    (comp.lang.apl)