Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Header LatticeTiling.h

Detailed Description

Lattice-based template generation for constant-metric parameter spaces, described in [30] and [31] .

Author
Karl Wette

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 charXLALLatticeTilingBoundName (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 LatticeTilingStatsXLALLatticeTilingStatistics (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...
 

Function Documentation

◆ XLALCreateLatticeTiling()

LatticeTiling * XLALCreateLatticeTiling ( const size_t  ndim)

Create a new lattice tiling.

Parameters
[in]ndimNumber of parameter-space dimensions

Definition at line 809 of file LatticeTiling.c.

◆ XLALDestroyLatticeTiling()

void XLALDestroyLatticeTiling ( LatticeTiling *  tiling)

Destroy a lattice tiling.

Parameters
[in]tilingLattice tiling

Definition at line 847 of file LatticeTiling.c.

◆ XLALSetLatticeTilingBound()

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.

Parameters
[in]tilingLattice tiling
[in]dimDimension on which bound applies
[in]funcParameter space bound function
[in]data_lenLength of arbitrary data describing parameter space bounds
[in]data_lowerArbitrary data describing lower parameter space bound
[in]data_upperArbitrary data describing upper parameter space bound

Definition at line 865 of file LatticeTiling.c.

◆ XLALSetLatticeTilingBoundName()

int XLALSetLatticeTilingBoundName ( LatticeTiling *  tiling,
const size_t  dim,
const char fmt,
  ... 
)

Set the name of a lattice tiling parameter-space dimension.

Parameters
[in]tilingLattice tiling
[in]dimDimension to which name applies
[in]fmtName format string
[in]...Arguments to format string

◆ XLALSetLatticeTilingBoundCacheFunction()

int int XLALSetLatticeTilingBoundCacheFunction ( LatticeTiling *  tiling,
const size_t  dim,
const LatticeTilingBoundCache  func 
)

Set bound cache function for a lattice tiling parameter-space dimension.

Parameters
[in]tilingLattice tiling
[in]dimDimension on which bound cache function applies
[in]funcParameter space bound cache function

Definition at line 936 of file LatticeTiling.c.

◆ XLALSetLatticeTilingConstantBound()

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.

Parameters
[in]tilingLattice tiling
[in]dimDimension on which bound applies
[in]bound1First bound on dimension
[in]bound2Second bound on dimension

Definition at line 972 of file LatticeTiling.c.

◆ XLALSetLatticeTilingPadding()

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.

Parameters
[in]tilingLattice tiling
[in]dimDimension on which to set padding control flags
[in]lower_bbox_padLower padding as multiple of metric ellipse bounding box; use default if negative
[in]upper_bbox_padUpper padding as multiple of metric ellipse bounding box; use default if negative
[in]lower_intp_padLower padding as integer number of points; use default if negative
[in]upper_intp_padUpper padding as integer number of points; use default if negative
[in]find_bound_extremaWhether to find the extrema of the parameter-space bounds; use default if negative

Definition at line 994 of file LatticeTiling.c.

◆ XLALSetLatticeTilingOrigin()

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.

This is an optional setting and should generally not be used unless specifically required.

Parameters
[in]tilingLattice tiling
[in]dimDimension in which to set origin
[in]originPhysical parameter-space origin

Definition at line 1023 of file LatticeTiling.c.

◆ XLALSetLatticeTilingRandomOriginOffsets()

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.

Parameters
[in]tilingLattice tiling
[in]rngRandom number generator used to generate offsets

Definition at line 1043 of file LatticeTiling.c.

◆ XLALSetTiledLatticeDimensionsFromTiling()

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.

Parameters
[in]tilingLattice tiling to set tiled dimensions on
[in]ref_tilingReference lattice tiling for tiled dimensions

Definition at line 1069 of file LatticeTiling.c.

◆ XLALSetTilingLatticeAndMetric()

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()].

Parameters
[in]tilingLattice tiling
[in]latticeType of lattice to generate tiling with
[in]metricParameter-space metric
[in]max_mismatchMaximum prescribed mismatch

Definition at line 1098 of file LatticeTiling.c.

◆ XLALTotalLatticeTilingDimensions()

size_t XLALTotalLatticeTilingDimensions ( const LatticeTiling *  tiling)

Return the total number of dimensions of the lattice tiling.

Parameters
[in]tilingLattice tiling

Definition at line 1373 of file LatticeTiling.c.

◆ XLALTiledLatticeTilingDimensions()

size_t XLALTiledLatticeTilingDimensions ( const LatticeTiling *  tiling)

Return the number of tiled dimensions of the lattice tiling.

Parameters
[in]tilingLattice tiling

Definition at line 1385 of file LatticeTiling.c.

◆ XLALLatticeTilingTiledDimension()

size_t XLALLatticeTilingTiledDimension ( const LatticeTiling *  tiling,
const size_t  tiled_dim 
)

Return the dimension of the tiled lattice tiling dimension indexed by 'tiled_dim'.

Parameters
[in]tilingLattice tiling
[in]tiled_dimIndex of tiled dimension to return

Definition at line 1398 of file LatticeTiling.c.

◆ XLALIsTiledLatticeTilingDimension()

int XLALIsTiledLatticeTilingDimension ( const LatticeTiling *  tiling,
const size_t  dim 
)

Return >0 if a lattice tiling dimension is tiled (i.e.

not a single point), and 0 otherwise.

Parameters
[in]tilingLattice tiling
[in]dimDimension of which to return tiling status

Definition at line 1413 of file LatticeTiling.c.

◆ XLALLatticeTilingBoundName()

const char * XLALLatticeTilingBoundName ( const LatticeTiling *  tiling,
const size_t  dim 
)

Get the name of a lattice tiling parameter-space dimension.

Parameters
[in]tilingLattice tiling
[in]dimDimension for which to get name

Definition at line 1428 of file LatticeTiling.c.

◆ XLALLatticeTilingDimensionByName()

int XLALLatticeTilingDimensionByName ( const LatticeTiling *  tiling,
const char bound_name 
)

Return the index of the lattice tiling dimension which has the given name.

Parameters
[in]tilingLattice tiling
[in]bound_nameName of bound for which to find index

Definition at line 1443 of file LatticeTiling.c.

◆ XLALLatticeTilingStepSize()

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.

Parameters
[in]tilingLattice tiling
[in]dimDimension of which to return step size

Definition at line 1464 of file LatticeTiling.c.

◆ XLALLatticeTilingBoundingBox()

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.

Parameters
[in]tilingLattice tiling
[in]dimDimension of which to return bounding box extent

Definition at line 1485 of file LatticeTiling.c.

◆ XLALRegisterLatticeTilingCallback()

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.

Parameters
[in]tilingLattice tiling
[in]funcCallback function
[in]param_lenLength of arbitrary input data for use by callback function
[in]paramArbitrary input data for use by callback function
[in]out_lenLength of output data to be filled by callback function

Definition at line 1505 of file LatticeTiling.c.

◆ XLALPerformLatticeTilingCallbacks()

int XLALPerformLatticeTilingCallbacks ( const LatticeTiling *  tiling)

Perform all registered lattice tiling callbacks.

Parameters
[in]tilingLattice tiling

Definition at line 1541 of file LatticeTiling.c.

◆ XLALLatticeTilingStatistics()

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().

Parameters
[in]tilingLattice tiling
[in]dimDimension in which to return statistics

Definition at line 1617 of file LatticeTiling.c.

◆ XLALRandomLatticeTilingPoints()

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).

Parameters
[in]tilingLattice tiling
[in]scaleScale of random points
[in]rngRandom number generator used to generate points
[out]random_pointsMatrix whose columns are the random points

Definition at line 1637 of file LatticeTiling.c.

◆ XLALGetLatticeTilingBound()

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.

Parameters
[in]tilingLattice tiling
[in]dimDimension on which bound applies
[in]pointPoint at which bound applies
[in]paddingWhether to add padding to bounds
[out]lowerLower parameter-space bound
[out]upperUpper parameter-space bound

Definition at line 1683 of file LatticeTiling.c.

◆ XLALCreateLatticeTilingIterator()

LatticeTilingIterator * XLALCreateLatticeTilingIterator ( const LatticeTiling *  tiling,
const size_t  itr_ndim 
)

Create a new lattice tiling iterator.

Parameters
[in]tilingLattice tiling
[in]itr_ndimNumber of parameter-space dimensions to iterate over

Definition at line 1737 of file LatticeTiling.c.

◆ XLALDestroyLatticeTilingIterator()

void XLALDestroyLatticeTilingIterator ( LatticeTilingIterator *  itr)

Destroy a lattice tiling iterator.

Parameters
[in]itrLattice tiling iterator

Definition at line 1797 of file LatticeTiling.c.

◆ XLALSetLatticeTilingAlternatingIterator()

int XLALSetLatticeTilingAlternatingIterator ( LatticeTilingIterator *  itr,
const bool  alternating 
)

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.

Parameters
[in]itrLattice tiling iterator
[in]alternatingIf true, set alternating iterator

Definition at line 1812 of file LatticeTiling.c.

◆ XLALResetLatticeTilingIterator()

int XLALResetLatticeTilingIterator ( LatticeTilingIterator *  itr)

Reset an iterator to the beginning of a lattice tiling.

Parameters
[in]itrLattice tiling iterator

Definition at line 1829 of file LatticeTiling.c.

◆ XLALNextLatticeTilingPoint()

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.

Parameters
[in]itrLattice tiling iterator
[out]pointNext point in lattice tiling

Definition at line 1844 of file LatticeTiling.c.

◆ XLALNextLatticeTilingPoints()

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.

Parameters
[in]itrLattice tiling iterator
[out]pointsColumns are next set of points in lattice tiling

Definition at line 2096 of file LatticeTiling.c.

◆ XLALTotalLatticeTilingPoints()

UINT8 XLALTotalLatticeTilingPoints ( const LatticeTilingIterator *  itr)

Return the total number of points covered by the lattice tiling iterator.

Parameters
[in]itrLattice tiling iterator

Definition at line 2131 of file LatticeTiling.c.

◆ XLALLatticeTilingPointsAtDimension()

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.

Parameters
[in]itrLattice tiling iterator
[in]dimDimension for which to return count

Definition at line 2148 of file LatticeTiling.c.

◆ XLALCurrentLatticeTilingIndex()

UINT8 XLALCurrentLatticeTilingIndex ( const LatticeTilingIterator *  itr)

Return the index of the current point in the lattice tiling iterator.

Parameters
[in]itrLattice tiling iterator

Definition at line 2166 of file LatticeTiling.c.

◆ XLALCurrentLatticeTilingBlock()

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.

Parameters
[in]itrLattice tiling iterator
[in]dimDimension in which to return block
[out]leftIndex of left-most point of block relative to current point
[out]rightIndex of right-most point of block relative to current point

Definition at line 2179 of file LatticeTiling.c.

◆ XLALSaveLatticeTilingIterator()

int XLALSaveLatticeTilingIterator ( const LatticeTilingIterator *  itr,
FITSFile file,
const char name 
)

Save the state of a lattice tiling iterator to a FITS file.

Parameters
[in]itrLattice tiling iterator
[in]fileFITS file to save iterator to
[in]nameFITS HDU to save iterator to

Definition at line 2209 of file LatticeTiling.c.

◆ XLALRestoreLatticeTilingIterator()

int XLALRestoreLatticeTilingIterator ( LatticeTilingIterator *  itr,
FITSFile file,
const char name 
)

Restore the state of a lattice tiling iterator from a FITS file.

Parameters
[in]itrLattice tiling iterator
[in]fileFITS file to restore iterator from
[in]nameFITS HDU to restore iterator from

Definition at line 2296 of file LatticeTiling.c.

◆ XLALCreateLatticeTilingLocator()

LatticeTilingLocator * XLALCreateLatticeTilingLocator ( const LatticeTiling *  tiling)

Create a new lattice tiling locator.

If there are tiled dimensions, an index trie is internally built.

Parameters
[in]tilingLattice tiling

Definition at line 2397 of file LatticeTiling.c.

◆ XLALDestroyLatticeTilingLocator()

void XLALDestroyLatticeTilingLocator ( LatticeTilingLocator *  loc)

Destroy a lattice tiling locator.

Parameters
[in]locLattice tiling locator

Definition at line 2511 of file LatticeTiling.c.

◆ XLALNearestLatticeTilingPoint()

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.

Parameters
[in]locLattice tiling locator
[in]pointPoint for which to find nearest point
[out]nearest_pointNearest point
[out]nearest_indexUnique sequential indexes of the nearest point

Definition at line 2524 of file LatticeTiling.c.

◆ XLALNearestLatticeTilingPoints()

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.

Parameters
[in]locLattice tiling locator
[in]pointsColumns are set of points for which to find nearest points
[out]nearest_pointsColumns are the corresponding nearest points
[out]nearest_indexesVectors are unique sequential indexes of the nearest points

Definition at line 2577 of file LatticeTiling.c.

◆ XLALNearestLatticeTilingBlock()

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.

Parameters
[in]locLattice tiling locator
[in]pointPoint for which to find nearest point
[in]dimDimension for which to return indexes
[out]nearest_pointNearest point
[out]nearest_indexUnique sequential index of the nearest point in dim-1
[out]nearest_leftIndex of left-most point of block relative to nearest point
[out]nearest_rightIndex of right-most point of block relative to nearest point

Definition at line 2628 of file LatticeTiling.c.

◆ XLALPrintLatticeTilingIndexTrie()

int XLALPrintLatticeTilingIndexTrie ( const LatticeTilingLocator *  loc,
FILE *  file 
)

Print the internal index trie of a lattice tiling locator to the given file pointer.

Parameters
[in]locLattice tiling locator
[in]fileFile pointer to print trie to

Definition at line 2686 of file LatticeTiling.c.

Typedef Documentation

◆ LatticeTilingBound

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.

Parameters
[in]dataArbitrary data describing parameter space bound
[in]dimDimension on which bound applies
[in]cacheCached values computed in lower dimensions
[in]pointPoint at which to find bound

Definition at line 82 of file LatticeTiling.h.

◆ LatticeTilingBoundCache

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.

Parameters
[in]dimDimension on which bound applies
[in]pointPoint at which to find bound
[out]cacheValues to cache

Definition at line 92 of file LatticeTiling.h.

◆ LatticeTilingCallback

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.

Parameters
[in]first_callWhether this is the first call to this function
[in]tilingLattice tiling
[in]itrLattice tiling iterator
[in]pointCurrent lattice tiling point
[in]changed_iIndex of first dimension to have changed since last call
[in]paramArbitrary input data for use by callback function
[out]outOutput data to be filled by callback function

Definition at line 101 of file LatticeTiling.h.

Enumeration Type Documentation

◆ 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.

Variable Documentation

◆ TilingLatticeChoices

const UserChoices TilingLatticeChoices
extern

Static array of all :tagTilingLattice choices, for use by the UserInput module parsing routines.

Definition at line 144 of file LatticeTiling.c.

◆ LatticeTilingProgressLogLevel

int LatticeTilingProgressLogLevel
extern

Log level at which to print progress messages when counting templates and performing callbacks.

Definition at line 152 of file LatticeTiling.c.