From b90ec67959ca72cab7a9339600eeacba37370fa8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 16 May 2011 17:46:09 +0200 Subject: Add partial matching (against 'a' and 'b' only) --- src/index.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/index.c') diff --git a/src/index.c b/src/index.c index 47866a18..2fa7f58d 100644 --- a/src/index.c +++ b/src/index.c @@ -154,6 +154,7 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm, for ( i=0; incells; i++ ) { UnitCell *new_cell = NULL; + UnitCell *cand = image->candidate_cells[i]; if ( verbose ) { STATUS("--------------------\n"); @@ -166,16 +167,16 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm, /* Match or reduce the cell as appropriate */ switch ( cellr ) { case CELLR_NONE : - new_cell = cell_new_from_cell(image - ->candidate_cells[i]); + new_cell = cell_new_from_cell(cand); break; case CELLR_REDUCE : - new_cell = match_cell(image->candidate_cells[i], - cell, verbose, 1); + new_cell = match_cell(cand, cell, verbose, 1); break; case CELLR_COMPARE : - new_cell = match_cell(image->candidate_cells[i], - cell, verbose, 0); + new_cell = match_cell(cand, cell, verbose, 0); + break; + case CELLR_COMPARE_AB : + new_cell = match_cell_ab(cand, cell); break; } -- cgit v1.2.3