Source Matching Code. More...
#include "datatypes.h"
Go to the source code of this file.
Defines | |
#define | MATCH_FAIL -1 |
#define | HANDSHAKE_FAIL -2 |
Functions | |
int | bfind (IndexedList list[], int low, int high, double key) |
void | getrange (IndexedList dec[], int nrecs, int idx, double tol, int *i1, int *i2, double dec0) |
double | calc_metric (double asvalue) |
int * | matchpairs (CartesianSet cartM[], IndexedList decM[], int nrecM, CartesianSet cartS[], IndexedList decS[], int nrecS, double matchradius) |
void | handshake (int *ppM, int nrecM, int *ppS, int nrecS) |
Source Matching Code.
#define HANDSHAKE_FAIL -2 |
Null value meaning that although a one way match was found, the handshake test failed
Referenced by handshake().
#define MATCH_FAIL -1 |
Null value meaning that for a given master record, a matching slave record was not found
Referenced by create_merge_table(), and matchpairs().
int bfind | ( | IndexedList | list[], | |
int | low, | |||
int | high, | |||
double | key | |||
) |
Binary find function. Search the sorted indexed list within the two limits for the nearest value to the given key. This gets called recursively.
References bfind(), and IndexedList::value.
Referenced by bfind(), and matchpairs().
double calc_metric | ( | double | asvalue | ) |
Convert a spatial separation in arcseconds to a distance in cartesian space. Not used anymore.
Referenced by matchpairs().
void getrange | ( | IndexedList | dec[], | |
int | nrecs, | |||
int | idx, | |||
double | tol, | |||
int * | i1, | |||
int * | i2, | |||
double | dec0 | |||
) |
Find the range of values in the indexed list that lie within the tolerance of the given pivot index
References IndexedList::value.
Referenced by matchpairs().
void handshake | ( | int * | ppM, | |
int | nrecM, | |||
int * | ppS, | |||
int | nrecS | |||
) |
Carry out the "handshaking" operation between the two pointer arrays.
References HANDSHAKE_FAIL.
Referenced by create_pointer_files().
int* matchpairs | ( | CartesianSet | cartM[], | |
IndexedList | decM[], | |||
int | nrecM, | |||
CartesianSet | cartS[], | |||
IndexedList | decS[], | |||
int | nrecS, | |||
double | matchradius | |||
) |
Take the two lists of cartesian coordinates and return a pointer to an array of pair points from the "master" (suffix M) to the "slave" (suffix S) arrays.
References bfind(), calc_metric(), CartesianSet::cx, CartesianSet::cy, CartesianSet::cz, getrange(), IndexedList::index, and MATCH_FAIL.
Referenced by create_pointer_files().