Commit 66fa3100 authored by Miroslav Shaltev's avatar Miroslav Shaltev
Browse files

tmp HybridSearch commit

parent 6b04b2bc
......@@ -3392,16 +3392,34 @@ void SCHybridSearch::search( Mads & mads, int &nb_search_pts, bool &stop, stop_t
// template bank
LatticeTilingIterator *itr = XLALCreateLatticeTilingIterator( tiling, n );
LatticeTilingLocator *tloc = XLALCreateLatticeTilingLocator(tiling);
const UINT8 total = XLALTotalLatticeTilingPoints( itr );
printf("TLOC CREATED, n=%d.\n",n);
gsl_matrix *points = gsl_matrix_calloc(n,1);
for (INT4 i = 0; i < n; i++){
gsl_matrix_set(points,i,1,(*x)[i].value());
printf("%d:%.16f\n",i,(*x)[i].value());
gsl_matrix_set(points,i,0,(*x)[i].value());
}
printf("MATRIX SET DONE.\n");
gsl_matrix **nearest_points = NULL;
UINT8VectorSequence **nearest_indexes = NULL;
XLALNearestLatticeTilingPoints (tloc, points, nearest_points, nearest_indexes);
gsl_matrix *GAMAT( nearest_points, n, total );
for (INT4 i = 0; i < total; i++){
gsl_vector *tpoint = gsl_vector_alloc (n);
INT4 r = XLALNextLatticeTilingPoint( itr, tpoint );
printf("r: %d\n",r);
for (INT4 j = 0; j < n; j++) {
printf("%.16f",gsl_vector_get(tpoint,j));
}
printf("\n");
gsl_vector_free(tpoint);
}
XLALNearestLatticeTilingPoints (tloc, points, nearest_points, NULL);
printf("EXIT HYBRID SEARCH\n!");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment