| 1 |
233 |
bertin |
/*
|
| 2 |
|
|
* assoc.h
|
| 3 |
2 |
bertin |
*
|
| 4 |
233 |
bertin |
* Include file for assoc.c.
|
| 5 |
2 |
bertin |
*
|
| 6 |
233 |
bertin |
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
| 7 |
2 |
bertin |
*
|
| 8 |
233 |
bertin |
* This file part of: SExtractor
|
| 9 |
2 |
bertin |
*
|
| 10 |
235 |
bertin |
* Copyright: (C) 1997-2010 Emmanuel Bertin -- IAP/CNRS/UPMC
|
| 11 |
2 |
bertin |
*
|
| 12 |
233 |
bertin |
* License: GNU General Public License
|
| 13 |
|
|
*
|
| 14 |
|
|
* SExtractor is free software: you can redistribute it and/or modify
|
| 15 |
|
|
* it under the terms of the GNU General Public License as published by
|
| 16 |
|
|
* the Free Software Foundation, either version 3 of the License, or
|
| 17 |
|
|
* (at your option) any later version.
|
| 18 |
|
|
* SExtractor is distributed in the hope that it will be useful,
|
| 19 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 20 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 21 |
|
|
* GNU General Public License for more details.
|
| 22 |
|
|
* You should have received a copy of the GNU General Public License
|
| 23 |
|
|
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
|
| 24 |
|
|
*
|
| 25 |
|
|
* Last modified: 11/10/2010
|
| 26 |
|
|
*
|
| 27 |
|
|
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
| 28 |
2 |
bertin |
|
| 29 |
173 |
bertin |
#define ASSOC_BUFINC 131072 /* Assoc buffer increment (bytes) */
|
| 30 |
2 |
bertin |
|
| 31 |
|
|
/*--------------------------------- typedefs --------------------------------*/
|
| 32 |
|
|
|
| 33 |
|
|
typedef struct structassoc
|
| 34 |
|
|
{
|
| 35 |
|
|
float *list; /* Pointer to the list of data */
|
| 36 |
|
|
int nobj; /* Number of data rows */
|
| 37 |
|
|
int ncol; /* Total number of columns per row */
|
| 38 |
|
|
int ndata; /* Number of retained cols per row */
|
| 39 |
|
|
int *hash; /* Pointer to the hash table */
|
| 40 |
|
|
float *data; /* Copy of current parameters */
|
| 41 |
|
|
float radius; /* Radius of search for association */
|
| 42 |
|
|
} assocstruct;
|
| 43 |
|
|
|
| 44 |
|
|
/*------------------------------ Prototypes ---------------------------------*/
|
| 45 |
|
|
|
| 46 |
|
|
assocstruct *load_assoc(char *filename);
|
| 47 |
|
|
|
| 48 |
|
|
int do_assoc(picstruct *field, float x, float y);
|
| 49 |
|
|
|
| 50 |
|
|
void init_assoc(picstruct *field),
|
| 51 |
|
|
end_assoc(picstruct *field),
|
| 52 |
|
|
sort_assoc(picstruct *field, assocstruct *assoc);
|