match.c File Reference

#include "match.h"
#include "datatypes.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for match.c:
This graph shows which files directly or indirectly include this file:


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)

Detailed Description

Ian Bond, IfA, University of Edinburgh

Function Documentation

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.


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().

Generated on Mon Oct 4 10:39:51 2010 for WsaTools by  doxygen 1.6.3