Lattice-based template generation for constant-metric parameter spaces, described in [30] and [31] .
Prototypes | |
LatticeTiling * | XLALCreateLatticeTiling (const size_t ndim) |
Create a new lattice tiling. More... | |
void | XLALDestroyLatticeTiling (LatticeTiling *tiling) |
Destroy a lattice tiling. More... | |
int | XLALSetLatticeTilingBound (LatticeTiling *tiling, const size_t dim, const LatticeTilingBound func, const size_t data_len, const void *data_lower, const void *data_upper) |
Set a parameter-space bound on a dimension of the lattice tiling. More... | |
int | XLALSetLatticeTilingBoundName (LatticeTiling *tiling, const size_t dim, const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(3 |
Set the name of a lattice tiling parameter-space dimension. More... | |
int int | XLALSetLatticeTilingBoundCacheFunction (LatticeTiling *tiling, const size_t dim, const LatticeTilingBoundCache func) |
Set bound cache function for a lattice tiling parameter-space dimension. More... | |
int | XLALSetLatticeTilingConstantBound (LatticeTiling *tiling, const size_t dim, const double bound1, const double bound2) |
Set a constant lattice tiling parameter-space bound, given by the minimum and maximum of the two supplied bounds, on a dimension of the lattice tiling. More... | |
int | XLALSetLatticeTilingPadding (LatticeTiling *tiling, const size_t dim, const double lower_bbox_pad, const double upper_bbox_pad, const int lower_intp_pad, const int upper_intp_pad, const int find_bound_extrema) |
Control the padding of lattice tiling parameter-space bounds in the given dimension. More... | |
int | XLALSetLatticeTilingOrigin (LatticeTiling *tiling, const size_t dim, const double origin) |
Set the physical parameter-space origin of the lattice tiling in the given dimension. More... | |
int | XLALSetLatticeTilingRandomOriginOffsets (LatticeTiling *tiling, RandomParams *rng) |
Offset the physical parameter-space origin of the lattice tiling by a random fraction of the lattice step size in tiled dimensions. More... | |
int | XLALSetTiledLatticeDimensionsFromTiling (LatticeTiling *tiling, const LatticeTiling *ref_tiling) |
Set the tiled (i.e. More... | |
int | XLALSetTilingLatticeAndMetric (LatticeTiling *tiling, const TilingLattice lattice, const gsl_matrix *metric, const double max_mismatch) |
Set the tiling lattice, parameter-space metric, and maximum prescribed mismatch. More... | |
size_t | XLALTotalLatticeTilingDimensions (const LatticeTiling *tiling) |
Return the total number of dimensions of the lattice tiling. More... | |
size_t | XLALTiledLatticeTilingDimensions (const LatticeTiling *tiling) |
Return the number of tiled dimensions of the lattice tiling. More... | |
size_t | XLALLatticeTilingTiledDimension (const LatticeTiling *tiling, const size_t tiled_dim) |
Return the dimension of the tiled lattice tiling dimension indexed by 'tiled_dim'. More... | |
int | XLALIsTiledLatticeTilingDimension (const LatticeTiling *tiling, const size_t dim) |
Return >0 if a lattice tiling dimension is tiled (i.e. More... | |
const char * | XLALLatticeTilingBoundName (const LatticeTiling *tiling, const size_t dim) |
Get the name of a lattice tiling parameter-space dimension. More... | |
int | XLALLatticeTilingDimensionByName (const LatticeTiling *tiling, const char *bound_name) |
Return the index of the lattice tiling dimension which has the given name. More... | |
REAL8 | XLALLatticeTilingStepSize (const LatticeTiling *tiling, const size_t dim) |
Return the step size of the lattice tiling in a given dimension, or 0 for non-tiled dimensions. More... | |
REAL8 | XLALLatticeTilingBoundingBox (const LatticeTiling *tiling, const size_t dim) |
Return the bounding box extent of the lattice tiling in a given dimension, or 0 for non-tiled dimensions. More... | |
const void * | XLALRegisterLatticeTilingCallback (LatticeTiling *tiling, const LatticeTilingCallback func, const size_t param_len, const void *param, const size_t out_len) |
Register a callback function which can be used to compute properties of a lattice tiling. More... | |
int | XLALPerformLatticeTilingCallbacks (const LatticeTiling *tiling) |
Perform all registered lattice tiling callbacks. More... | |
const LatticeTilingStats * | XLALLatticeTilingStatistics (const LatticeTiling *tiling, const size_t dim) |
Return statistics related to the number/value of lattice tiling points in a dimension. More... | |
int | XLALRandomLatticeTilingPoints (const LatticeTiling *tiling, const double scale, RandomParams *rng, gsl_matrix *random_points) |
Generate random points within the parameter space of the lattice tiling. More... | |
int | XLALGetLatticeTilingBound (const LatticeTiling *tiling, const size_t dim, const gsl_vector *point, const bool padding, double *lower, double *upper) |
Get a parameter-space bound on a dimension of the lattice tiling. More... | |
LatticeTilingIterator * | XLALCreateLatticeTilingIterator (const LatticeTiling *tiling, const size_t itr_ndim) |
Create a new lattice tiling iterator. More... | |
void | XLALDestroyLatticeTilingIterator (LatticeTilingIterator *itr) |
Destroy a lattice tiling iterator. More... | |
int | XLALSetLatticeTilingAlternatingIterator (LatticeTilingIterator *itr, const bool alternating) |
Set whether the lattice tiling iterator should alternate its iteration direction (i.e. More... | |
int | XLALResetLatticeTilingIterator (LatticeTilingIterator *itr) |
Reset an iterator to the beginning of a lattice tiling. More... | |
int | XLALNextLatticeTilingPoint (LatticeTilingIterator *itr, gsl_vector *point) |
Advance lattice tiling iterator, and optionally return the next point in point . More... | |
int | XLALNextLatticeTilingPoints (LatticeTilingIterator *itr, gsl_matrix **points) |
Advance lattice tiling iterator, and optionally return the next set of points in points . More... | |
UINT8 | XLALTotalLatticeTilingPoints (const LatticeTilingIterator *itr) |
Return the total number of points covered by the lattice tiling iterator. More... | |
UINT8 | XLALLatticeTilingPointsAtDimension (const LatticeTilingIterator *itr, const size_t dim) |
Return the total number of points along a certain dimension covered by the lattice tiling iterator. More... | |
UINT8 | XLALCurrentLatticeTilingIndex (const LatticeTilingIterator *itr) |
Return the index of the current point in the lattice tiling iterator. More... | |
int | XLALCurrentLatticeTilingBlock (const LatticeTilingIterator *itr, const size_t dim, INT4 *left, INT4 *right) |
Return indexes of the left-most and right-most points in the current block of points in the given dimension, relative to the current point. More... | |
int | XLALSaveLatticeTilingIterator (const LatticeTilingIterator *itr, FITSFile *file, const char *name) |
Save the state of a lattice tiling iterator to a FITS file. More... | |
int | XLALRestoreLatticeTilingIterator (LatticeTilingIterator *itr, FITSFile *file, const char *name) |
Restore the state of a lattice tiling iterator from a FITS file. More... | |
LatticeTilingLocator * | XLALCreateLatticeTilingLocator (const LatticeTiling *tiling) |
Create a new lattice tiling locator. More... | |
void | XLALDestroyLatticeTilingLocator (LatticeTilingLocator *loc) |
Destroy a lattice tiling locator. More... | |
int | XLALNearestLatticeTilingPoint (const LatticeTilingLocator *loc, const gsl_vector *point, gsl_vector *nearest_point, UINT8Vector *nearest_index) |
Locate the nearest point in a lattice tiling to a given point. More... | |
int | XLALNearestLatticeTilingPoints (const LatticeTilingLocator *loc, const gsl_matrix *points, gsl_matrix **nearest_points, UINT8VectorSequence **nearest_indexes) |
Locate the nearest points in a lattice tiling to a given set of points. More... | |
int | XLALNearestLatticeTilingBlock (const LatticeTilingLocator *loc, const gsl_vector *point, const size_t dim, gsl_vector *nearest_point, UINT8 *nearest_index, INT4 *nearest_left, INT4 *nearest_right) |
Locate the nearest block in a lattice tiling to a given point. More... | |
int | XLALPrintLatticeTilingIndexTrie (const LatticeTilingLocator *loc, FILE *file) |
Print the internal index trie of a lattice tiling locator to the given file pointer. More... | |
Data Structures | |
struct | LatticeTilingStats |
Statistics related to the number/value of lattice tiling points in a dimension. More... | |
Typedefs | |
typedef double(* | LatticeTilingBound) (const void *data, const size_t dim, const gsl_matrix *cache, const gsl_vector *point) |
Function which returns a bound on a dimension of the lattice tiling. More... | |
typedef void(* | LatticeTilingBoundCache) (const size_t dim, const gsl_vector *point, gsl_vector *cache) |
Function which caches values required by a lattice tiling bound function. More... | |
typedef int(* | LatticeTilingCallback) (const bool first_call, const LatticeTiling *tiling, const LatticeTilingIterator *itr, const gsl_vector *point, const size_t changed_i, const void *param, void *out) |
Callback function which can be used to compute properties of a lattice tiling. More... | |
Enumerations | |
enum | TilingLattice { TILING_LATTICE_CUBIC , TILING_LATTICE_ANSTAR , TILING_LATTICE_MAX } |
Type of lattice to generate tiling with. More... | |
Variables | |
const UserChoices | TilingLatticeChoices |
Static array of all :tagTilingLattice choices, for use by the UserInput module parsing routines. More... | |
int | LatticeTilingProgressLogLevel |
Log level at which to print progress messages when counting templates and performing callbacks. More... | |
LatticeTiling * XLALCreateLatticeTiling | ( | const size_t | ndim | ) |
Create a new lattice tiling.
[in] | ndim | Number of parameter-space dimensions |
Definition at line 809 of file LatticeTiling.c.
void XLALDestroyLatticeTiling | ( | LatticeTiling * | tiling | ) |
Destroy a lattice tiling.
[in] | tiling | Lattice tiling |
Definition at line 847 of file LatticeTiling.c.
int XLALSetLatticeTilingBound | ( | LatticeTiling * | tiling, |
const size_t | dim, | ||
const LatticeTilingBound | func, | ||
const size_t | data_len, | ||
const void * | data_lower, | ||
const void * | data_upper | ||
) |
Set a parameter-space bound on a dimension of the lattice tiling.
The bound is described by a function func
, and two data of length data_len
, data_lower
and data_upper
, describing the lower and upper parameter space bounds respectively. If data_lower
and data_upper
are identical, this parameter-space dimension will be treated as a single point, and will not be tiled.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension on which bound applies |
[in] | func | Parameter space bound function |
[in] | data_len | Length of arbitrary data describing parameter space bounds |
[in] | data_lower | Arbitrary data describing lower parameter space bound |
[in] | data_upper | Arbitrary data describing upper parameter space bound |
Definition at line 865 of file LatticeTiling.c.
int XLALSetLatticeTilingBoundName | ( | LatticeTiling * | tiling, |
const size_t | dim, | ||
const char * | fmt, | ||
... | |||
) |
Set the name of a lattice tiling parameter-space dimension.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension to which name applies |
[in] | fmt | Name format string |
[in] | ... | Arguments to format string |
int int XLALSetLatticeTilingBoundCacheFunction | ( | LatticeTiling * | tiling, |
const size_t | dim, | ||
const LatticeTilingBoundCache | func | ||
) |
Set bound cache function for a lattice tiling parameter-space dimension.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension on which bound cache function applies |
[in] | func | Parameter space bound cache function |
Definition at line 936 of file LatticeTiling.c.
int XLALSetLatticeTilingConstantBound | ( | LatticeTiling * | tiling, |
const size_t | dim, | ||
const double | bound1, | ||
const double | bound2 | ||
) |
Set a constant lattice tiling parameter-space bound, given by the minimum and maximum of the two supplied bounds, on a dimension of the lattice tiling.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension on which bound applies |
[in] | bound1 | First bound on dimension |
[in] | bound2 | Second bound on dimension |
Definition at line 972 of file LatticeTiling.c.
int XLALSetLatticeTilingPadding | ( | LatticeTiling * | tiling, |
const size_t | dim, | ||
const double | lower_bbox_pad, | ||
const double | upper_bbox_pad, | ||
const int | lower_intp_pad, | ||
const int | upper_intp_pad, | ||
const int | find_bound_extrema | ||
) |
Control the padding of lattice tiling parameter-space bounds in the given dimension.
This is an optional setting and should generally not be used unless specifically required.
All parameters, if passed a negative value, will use their built-in defaults.
The {lower|upper}_{bbox|intp}_pad
parameters set the extra padding added to the parameter space; see [31] , Fig. 6 for an illustration of why this is needed.
Setting all {lower|upper}_{bbox|intp}_pad
parameters to zero triggers a strict mode, where the lattice tiling will not place points outside the prescribed parameter space bounds.
If find_bound_extrema
is true, the parameter-space padding is extended to the extrema of the parameter-space bounds, by sampling the bounds around the current point. This is intended to address the "staircase" boundary template issue described in [31] , Sec. IV E.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension on which to set padding control flags |
[in] | lower_bbox_pad | Lower padding as multiple of metric ellipse bounding box; use default if negative |
[in] | upper_bbox_pad | Upper padding as multiple of metric ellipse bounding box; use default if negative |
[in] | lower_intp_pad | Lower padding as integer number of points; use default if negative |
[in] | upper_intp_pad | Upper padding as integer number of points; use default if negative |
[in] | find_bound_extrema | Whether to find the extrema of the parameter-space bounds; use default if negative |
Definition at line 994 of file LatticeTiling.c.
Set the physical parameter-space origin of the lattice tiling in the given dimension.
This is an optional setting and should generally not be used unless specifically required.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension in which to set origin |
[in] | origin | Physical parameter-space origin |
Definition at line 1023 of file LatticeTiling.c.
int XLALSetLatticeTilingRandomOriginOffsets | ( | LatticeTiling * | tiling, |
RandomParams * | rng | ||
) |
Offset the physical parameter-space origin of the lattice tiling by a random fraction of the lattice step size in tiled dimensions.
This is important when performing mismatch studies to ensure that the mismatch distribution is fully sampled.
[in] | tiling | Lattice tiling |
[in] | rng | Random number generator used to generate offsets |
Definition at line 1043 of file LatticeTiling.c.
int XLALSetTiledLatticeDimensionsFromTiling | ( | LatticeTiling * | tiling, |
const LatticeTiling * | ref_tiling | ||
) |
Set the tiled (i.e.
not a single point) dimensions of a lattice from a reference lattice. This is an optional setting and should generally not be used unless specifically required.
[in] | tiling | Lattice tiling to set tiled dimensions on |
[in] | ref_tiling | Reference lattice tiling for tiled dimensions |
Definition at line 1069 of file LatticeTiling.c.
int XLALSetTilingLatticeAndMetric | ( | LatticeTiling * | tiling, |
const TilingLattice | lattice, | ||
const gsl_matrix * | metric, | ||
const double | max_mismatch | ||
) |
Set the tiling lattice, parameter-space metric, and maximum prescribed mismatch.
The lattice tiling tiling
is now fully initialised, and can be used to create tiling iterators [via XLALCreateLatticeTilingIterator()] and locators [via XLALCreateLatticeTilingLocator()].
[in] | tiling | Lattice tiling |
[in] | lattice | Type of lattice to generate tiling with |
[in] | metric | Parameter-space metric |
[in] | max_mismatch | Maximum prescribed mismatch |
Definition at line 1098 of file LatticeTiling.c.
size_t XLALTotalLatticeTilingDimensions | ( | const LatticeTiling * | tiling | ) |
Return the total number of dimensions of the lattice tiling.
[in] | tiling | Lattice tiling |
Definition at line 1373 of file LatticeTiling.c.
size_t XLALTiledLatticeTilingDimensions | ( | const LatticeTiling * | tiling | ) |
Return the number of tiled dimensions of the lattice tiling.
[in] | tiling | Lattice tiling |
Definition at line 1385 of file LatticeTiling.c.
Return the dimension of the tiled lattice tiling dimension indexed by 'tiled_dim'.
[in] | tiling | Lattice tiling |
[in] | tiled_dim | Index of tiled dimension to return |
Definition at line 1398 of file LatticeTiling.c.
Return >0 if a lattice tiling dimension is tiled (i.e.
not a single point), and 0 otherwise.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension of which to return tiling status |
Definition at line 1413 of file LatticeTiling.c.
Get the name of a lattice tiling parameter-space dimension.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension for which to get name |
Definition at line 1428 of file LatticeTiling.c.
Return the index of the lattice tiling dimension which has the given name.
[in] | tiling | Lattice tiling |
[in] | bound_name | Name of bound for which to find index |
Definition at line 1443 of file LatticeTiling.c.
Return the step size of the lattice tiling in a given dimension, or 0 for non-tiled dimensions.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension of which to return step size |
Definition at line 1464 of file LatticeTiling.c.
Return the bounding box extent of the lattice tiling in a given dimension, or 0 for non-tiled dimensions.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension of which to return bounding box extent |
Definition at line 1485 of file LatticeTiling.c.
const void * XLALRegisterLatticeTilingCallback | ( | LatticeTiling * | tiling, |
const LatticeTilingCallback | func, | ||
const size_t | param_len, | ||
const void * | param, | ||
const size_t | out_len | ||
) |
Register a callback function which can be used to compute properties of a lattice tiling.
Returns a const pointer to the output data to be filled by the callback function.
[in] | tiling | Lattice tiling |
[in] | func | Callback function |
[in] | param_len | Length of arbitrary input data for use by callback function |
[in] | param | Arbitrary input data for use by callback function |
[in] | out_len | Length of output data to be filled by callback function |
Definition at line 1505 of file LatticeTiling.c.
Perform all registered lattice tiling callbacks.
[in] | tiling | Lattice tiling |
Definition at line 1541 of file LatticeTiling.c.
const LatticeTilingStats * XLALLatticeTilingStatistics | ( | const LatticeTiling * | tiling, |
const size_t | dim | ||
) |
Return statistics related to the number/value of lattice tiling points in a dimension.
Statistics are computed through a callback function with XLALPerformLatticeTilingCallbacks().
[in] | tiling | Lattice tiling |
[in] | dim | Dimension in which to return statistics |
Definition at line 1617 of file LatticeTiling.c.
int XLALRandomLatticeTilingPoints | ( | const LatticeTiling * | tiling, |
const double | scale, | ||
RandomParams * | rng, | ||
gsl_matrix * | random_points | ||
) |
Generate random points within the parameter space of the lattice tiling.
Points can be scaled to fill the parameter space exactly (scale == 0
), fill a subset of the parameter space (-1 < scale < 0
), or fill outside the parameter space (scale > 0
).
[in] | tiling | Lattice tiling |
[in] | scale | Scale of random points |
[in] | rng | Random number generator used to generate points |
[out] | random_points | Matrix whose columns are the random points |
Definition at line 1637 of file LatticeTiling.c.
int XLALGetLatticeTilingBound | ( | const LatticeTiling * | tiling, |
const size_t | dim, | ||
const gsl_vector * | point, | ||
const bool | padding, | ||
double * | lower, | ||
double * | upper | ||
) |
Get a parameter-space bound on a dimension of the lattice tiling.
This is a convenience function which returns the bounds set by XLALSetLatticeTilingBound() for debugging, plotting, etc.
[in] | tiling | Lattice tiling |
[in] | dim | Dimension on which bound applies |
[in] | point | Point at which bound applies |
[in] | padding | Whether to add padding to bounds |
[out] | lower | Lower parameter-space bound |
[out] | upper | Upper parameter-space bound |
Definition at line 1683 of file LatticeTiling.c.
LatticeTilingIterator * XLALCreateLatticeTilingIterator | ( | const LatticeTiling * | tiling, |
const size_t | itr_ndim | ||
) |
Create a new lattice tiling iterator.
[in] | tiling | Lattice tiling |
[in] | itr_ndim | Number of parameter-space dimensions to iterate over |
Definition at line 1737 of file LatticeTiling.c.
void XLALDestroyLatticeTilingIterator | ( | LatticeTilingIterator * | itr | ) |
Destroy a lattice tiling iterator.
[in] | itr | Lattice tiling iterator |
Definition at line 1797 of file LatticeTiling.c.
Set whether the lattice tiling iterator should alternate its iteration direction (i.e.
lower to upper bound, then upper to lower bound, and so on) after every crossing of each dimension.
[in] | itr | Lattice tiling iterator |
[in] | alternating | If true, set alternating iterator |
Definition at line 1812 of file LatticeTiling.c.
int XLALResetLatticeTilingIterator | ( | LatticeTilingIterator * | itr | ) |
Reset an iterator to the beginning of a lattice tiling.
[in] | itr | Lattice tiling iterator |
Definition at line 1829 of file LatticeTiling.c.
int XLALNextLatticeTilingPoint | ( | LatticeTilingIterator * | itr, |
gsl_vector * | point | ||
) |
Advance lattice tiling iterator, and optionally return the next point in point
.
Returns >0 if there are points remaining, 0 if there are no more points, and XLAL_FAILURE on error.
[in] | itr | Lattice tiling iterator |
[out] | point | Next point in lattice tiling |
Definition at line 1844 of file LatticeTiling.c.
int XLALNextLatticeTilingPoints | ( | LatticeTilingIterator * | itr, |
gsl_matrix ** | points | ||
) |
Advance lattice tiling iterator, and optionally return the next set of points in points
.
Returns the number of points stored in points
if there are points remaining, 0 if there are no more points, and XLAL_FAILURE on error.
[in] | itr | Lattice tiling iterator |
[out] | points | Columns are next set of points in lattice tiling |
Definition at line 2096 of file LatticeTiling.c.
Return the total number of points covered by the lattice tiling iterator.
[in] | itr | Lattice tiling iterator |
Definition at line 2131 of file LatticeTiling.c.
Return the total number of points along a certain dimension covered by the lattice tiling iterator.
[in] | itr | Lattice tiling iterator |
[in] | dim | Dimension for which to return count |
Definition at line 2148 of file LatticeTiling.c.
Return the index of the current point in the lattice tiling iterator.
[in] | itr | Lattice tiling iterator |
Definition at line 2166 of file LatticeTiling.c.
int XLALCurrentLatticeTilingBlock | ( | const LatticeTilingIterator * | itr, |
const size_t | dim, | ||
INT4 * | left, | ||
INT4 * | right | ||
) |
Return indexes of the left-most and right-most points in the current block of points in the given dimension, relative to the current point.
[in] | itr | Lattice tiling iterator |
[in] | dim | Dimension in which to return block |
[out] | left | Index of left-most point of block relative to current point |
[out] | right | Index of right-most point of block relative to current point |
Definition at line 2179 of file LatticeTiling.c.
int XLALSaveLatticeTilingIterator | ( | const LatticeTilingIterator * | itr, |
FITSFile * | file, | ||
const char * | name | ||
) |
Save the state of a lattice tiling iterator to a FITS file.
[in] | itr | Lattice tiling iterator |
[in] | file | FITS file to save iterator to |
[in] | name | FITS HDU to save iterator to |
Definition at line 2209 of file LatticeTiling.c.
int XLALRestoreLatticeTilingIterator | ( | LatticeTilingIterator * | itr, |
FITSFile * | file, | ||
const char * | name | ||
) |
Restore the state of a lattice tiling iterator from a FITS file.
[in] | itr | Lattice tiling iterator |
[in] | file | FITS file to restore iterator from |
[in] | name | FITS HDU to restore iterator from |
Definition at line 2296 of file LatticeTiling.c.
LatticeTilingLocator * XLALCreateLatticeTilingLocator | ( | const LatticeTiling * | tiling | ) |
Create a new lattice tiling locator.
If there are tiled dimensions, an index trie is internally built.
[in] | tiling | Lattice tiling |
Definition at line 2397 of file LatticeTiling.c.
void XLALDestroyLatticeTilingLocator | ( | LatticeTilingLocator * | loc | ) |
Destroy a lattice tiling locator.
[in] | loc | Lattice tiling locator |
Definition at line 2511 of file LatticeTiling.c.
int XLALNearestLatticeTilingPoint | ( | const LatticeTilingLocator * | loc, |
const gsl_vector * | point, | ||
gsl_vector * | nearest_point, | ||
UINT8Vector * | nearest_index | ||
) |
Locate the nearest point in a lattice tiling to a given point.
Return optionally the nearest point in nearest_point
, and sequential indexes, unique up to each dimension, to the nearest point in nearest_index
.
[in] | loc | Lattice tiling locator |
[in] | point | Point for which to find nearest point |
[out] | nearest_point | Nearest point |
[out] | nearest_index | Unique sequential indexes of the nearest point |
Definition at line 2524 of file LatticeTiling.c.
int XLALNearestLatticeTilingPoints | ( | const LatticeTilingLocator * | loc, |
const gsl_matrix * | points, | ||
gsl_matrix ** | nearest_points, | ||
UINT8VectorSequence ** | nearest_indexes | ||
) |
Locate the nearest points in a lattice tiling to a given set of points.
Return the nearest points in nearest_points
, and optionally sequential indexes, unique up to each dimension, to the nearest points in nearest_seqs_idxs
. Outputs are dynamically resized as required.
[in] | loc | Lattice tiling locator |
[in] | points | Columns are set of points for which to find nearest points |
[out] | nearest_points | Columns are the corresponding nearest points |
[out] | nearest_indexes | Vectors are unique sequential indexes of the nearest points |
Definition at line 2577 of file LatticeTiling.c.
int XLALNearestLatticeTilingBlock | ( | const LatticeTilingLocator * | loc, |
const gsl_vector * | point, | ||
const size_t | dim, | ||
gsl_vector * | nearest_point, | ||
UINT8 * | nearest_index, | ||
INT4 * | nearest_left, | ||
INT4 * | nearest_right | ||
) |
Locate the nearest block in a lattice tiling to a given point.
Return the nearest point in nearest_point
, the unique sequential index in dimension dim-1
to the nearest point in nearest_index
, and the indexes of the left-most nearest_left
and right-most nearest_right
points in the nearest block, relative to the nearest point.
[in] | loc | Lattice tiling locator |
[in] | point | Point for which to find nearest point |
[in] | dim | Dimension for which to return indexes |
[out] | nearest_point | Nearest point |
[out] | nearest_index | Unique sequential index of the nearest point in dim-1 |
[out] | nearest_left | Index of left-most point of block relative to nearest point |
[out] | nearest_right | Index of right-most point of block relative to nearest point |
Definition at line 2628 of file LatticeTiling.c.
Print the internal index trie of a lattice tiling locator to the given file pointer.
[in] | loc | Lattice tiling locator |
[in] | file | File pointer to print trie to |
Definition at line 2686 of file LatticeTiling.c.
typedef double(* LatticeTilingBound) (const void *data, const size_t dim, const gsl_matrix *cache, const gsl_vector *point) |
Function which returns a bound on a dimension of the lattice tiling.
[in] | data | Arbitrary data describing parameter space bound |
[in] | dim | Dimension on which bound applies |
[in] | cache | Cached values computed in lower dimensions |
[in] | point | Point at which to find bound |
Definition at line 82 of file LatticeTiling.h.
typedef void(* LatticeTilingBoundCache) (const size_t dim, const gsl_vector *point, gsl_vector *cache) |
Function which caches values required by a lattice tiling bound function.
[in] | dim | Dimension on which bound applies |
[in] | point | Point at which to find bound |
[out] | cache | Values to cache |
Definition at line 92 of file LatticeTiling.h.
typedef int(* LatticeTilingCallback) (const bool first_call, const LatticeTiling *tiling, const LatticeTilingIterator *itr, const gsl_vector *point, const size_t changed_i, const void *param, void *out) |
Callback function which can be used to compute properties of a lattice tiling.
[in] | first_call | Whether this is the first call to this function |
[in] | tiling | Lattice tiling |
[in] | itr | Lattice tiling iterator |
[in] | point | Current lattice tiling point |
[in] | changed_i | Index of first dimension to have changed since last call |
[in] | param | Arbitrary input data for use by callback function |
[out] | out | Output data to be filled by callback function |
Definition at line 101 of file LatticeTiling.h.
enum TilingLattice |
Type of lattice to generate tiling with.
Enumerator | |
---|---|
TILING_LATTICE_CUBIC | Cubic ( \( Z_n \) ) lattice. |
TILING_LATTICE_ANSTAR | An-star ( \( A_n^* \) ) lattice. |
TILING_LATTICE_MAX |
Definition at line 63 of file LatticeTiling.h.
|
extern |
Static array of all :tagTilingLattice choices, for use by the UserInput module parsing routines.
Definition at line 144 of file LatticeTiling.c.
|
extern |
Log level at which to print progress messages when counting templates and performing callbacks.
Definition at line 152 of file LatticeTiling.c.