Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ms-public
cwseaoptifol
Commits
66fa3100
Commit
66fa3100
authored
Jan 26, 2017
by
Miroslav Shaltev
Browse files
tmp HybridSearch commit
parent
6b04b2bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/FollowUp/Nomad/libFStatNomad.cpp
View file @
66fa3100
...
...
@@ -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
!"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment