#include <math.h>
#include <gsl/gsl_block.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_blas.h>
#include "LatticeCovering.h"
Include dependency graph for LatticeCovering.c:

Go to the source code of this file.
Defines | |
| #define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
| #define | MAX(x, y) ((x) > (y) ? (x) : (y)) |
| #define | TRUE (1==1) |
| #define | FALSE (1==0) |
| #define | HAVE_INLINE 1 |
Functions | |
| NRCSID (LATTICECOVERINGC,"$Id: LatticeCovering.c,v 1.4 2007/01/31 00:18:48 reinhard Exp $") | |
| void | LALLatticeCovering (LALStatus *status, REAL8VectorList **covering, REAL8 coveringRadius, const gsl_matrix *metric, const REAL8Vector *startPoint, BOOLEAN(*isInside)(const REAL8Vector *point), LatticeType latticeType) |
| Central function of this module: produce a lattice-covering of given lattice-type for the given parameter-space with constant metric. | |
| void | LALLatticeFill (LALStatus *status, REAL8VectorList **fillGrid, const gsl_matrix *generator, const REAL8Vector *startPoint, BOOLEAN(*isInside)(const REAL8Vector *point)) |
| Fill the given parameter-space by a lattice defined by the specified generating matrix. | |
| REAL8 | XLALMetricScalarProduct (const gsl_vector *v1, const gsl_vector *v2, const gsl_matrix *gij) |
Scalar product of two vectors with respect to the given metric . | |
| int | XLALFindCoveringGenerator (gsl_matrix **outmatrix, LatticeType type, REAL8 coveringRadius, const gsl_matrix *gij) |
| Construct the full-rank generating matrix of given type, for covering a space of given (constant) metric and a given covering Radius. | |
| int | XLALReduceGenerator2FullRank (gsl_matrix **outmatrix, const gsl_matrix *inmatrix) |
| "Reduce" a general (non-quadratic) generating matrix M with rank(M) <= cols(M) into a quadratic generator of full rank. | |
| int | XLALGetLatticeGenerator (gsl_matrix **outmatrix, UINT4 dimension, LatticeType type) |
Return a (not necessarily quadratic) n-dimensional generating matrix for one of several possible lattices (currently possible: cubic or ). | |
| REAL8VectorList * | XLALREAL8VectorListAddEntry (REAL8VectorList *head, const REAL8Vector *entry) |
| Add a new element at the end of the list 'head', _copy_ the given entry there, and return pointer to the new list-entry. | |
| void | XLALREAL8VectorListDestroy (REAL8VectorList *head) |
| 'List-destructor' for REAL8VectorList: free a complete list. | |
| REAL8Vector * | XLALgsl2LALmetric (const gsl_matrix *gmetric) |
| Translate a symmetric gsl_matrix into a 'LAL-encoded' REAL8Vector, using the index-convention l = a + b*(b+1) if a <= b, see PMETRIC_INDEX(a,b). | |
| gsl_matrix * | XLALmetric2gsl (const REAL8Vector *metric) |
| Convert a LAL-encoded metric (REAL8Vector) into a symmetric gsl_matrix. | |
Variables | |
| INT4VectorList | empty_INT4VectorList |
| REAL8VectorList | empty_REAL8VectorList |
Definition in file LatticeCovering.c.
| #define TRUE (1==1) |
Definition at line 51 of file LatticeCovering.c.
| #define FALSE (1==0) |
Definition at line 52 of file LatticeCovering.c.
| #define HAVE_INLINE 1 |
Definition at line 55 of file LatticeCovering.c.
| NRCSID | ( | LATTICECOVERINGC | , | |
| "$Id: LatticeCovering. | c, | |||
| v 1.4 2007/01/31 00:18:48 reinhard Exp $" | ||||
| ) |
| void LALLatticeCovering | ( | LALStatus * | status, | |
| REAL8VectorList ** | covering, | |||
| REAL8 | coveringRadius, | |||
| const gsl_matrix * | metric, | |||
| const REAL8Vector * | startPoint, | |||
| BOOLEAN(*)(const REAL8Vector *point) | isInside, | |||
| LatticeType | latticeType | |||
| ) |
Central function of this module: produce a lattice-covering of given lattice-type for the given parameter-space with constant metric.
For optimal covering, use latticeType=0, namely the An* lattice, which is the best known covering-lattice up to dimension 23, see [CS99]
| covering | [out] final covering-grid |
| coveringRadius | [in] covering radius |
| metric | [in] constant metric |
| startPoint | [in] start-point in the covering-region |
| isInside | [in] boundary-condition |
Definition at line 103 of file LatticeCovering.c.
| void LALLatticeFill | ( | LALStatus * | status, | |
| REAL8VectorList ** | fillGrid, | |||
| const gsl_matrix * | generator, | |||
| const REAL8Vector * | startPoint, | |||
| BOOLEAN(*)(const REAL8Vector *point) | isInside | |||
| ) |
Fill the given parameter-space by a lattice defined by the specified generating matrix.
| fillGrid | [out] fillGrid final fill-grid (physical points) |
| generator | [in] SQUARE generating matrix for lattice |
| startPoint | [in] physical startpoint for filling |
| isInside | [in] boundary-condition |
Definition at line 167 of file LatticeCovering.c.
| REAL8 XLALMetricScalarProduct | ( | const gsl_vector * | v1, | |
| const gsl_vector * | v2, | |||
| const gsl_matrix * | gij | |||
| ) |
Scalar product of two vectors with respect to the given metric
.
Definition at line 405 of file LatticeCovering.c.
| int XLALFindCoveringGenerator | ( | gsl_matrix ** | outmatrix, | |
| LatticeType | type, | |||
| REAL8 | coveringRadius, | |||
| const gsl_matrix * | gij | |||
| ) |
Construct the full-rank generating matrix of given type, for covering a space of given (constant) metric and a given covering Radius.
| outmatrix | [out] generating matrix for covering lattice |
| type | [in] type of lattice |
| coveringRadius | [in] desired covering radius |
| gij | [in] (constant) metric of covering space |
Definition at line 591 of file LatticeCovering.c.
| int XLALReduceGenerator2FullRank | ( | gsl_matrix ** | outmatrix, | |
| const gsl_matrix * | inmatrix | |||
| ) |
"Reduce" a general (non-quadratic) generating matrix M with rank(M) <= cols(M) into a quadratic generator of full rank.
The input matrix can have columns >= rows, the rows reprenting the lattice vectors. This algorithm simply proceeds by constructing an (Euclidean!) orthonormal basis out of the lattice vectors (using GramSchmidt), and then expressing the lattice-vectors in this new basis.
| outmatrix | [out] full-rank square generating matrix |
| inmatrix | [in] generating matrix (cols >= rows) |
Definition at line 691 of file LatticeCovering.c.
| int XLALGetLatticeGenerator | ( | gsl_matrix ** | outmatrix, | |
| UINT4 | dimension, | |||
| LatticeType | type | |||
| ) |
Return a (not necessarily quadratic) n-dimensional generating matrix for one of several possible lattices (currently possible: cubic or
).
See [CS99] for the definition and properties of these lattices.
of a lattice by
, then the covering radius R scales as
)| outmatrix | [out] generating matrix |
| dimension | [in] number of dimensions |
| type | [in] type of lattice |
Definition at line 795 of file LatticeCovering.c.
| REAL8VectorList* XLALREAL8VectorListAddEntry | ( | REAL8VectorList * | head, | |
| const REAL8Vector * | entry | |||
| ) |
Add a new element at the end of the list 'head', _copy_ the given entry there, and return pointer to the new list-entry.
Definition at line 939 of file LatticeCovering.c.
| void XLALREAL8VectorListDestroy | ( | REAL8VectorList * | head | ) |
'List-destructor' for REAL8VectorList: free a complete list.
Definition at line 1063 of file LatticeCovering.c.
| REAL8Vector* XLALgsl2LALmetric | ( | const gsl_matrix * | gmetric | ) |
Translate a symmetric gsl_matrix into a 'LAL-encoded' REAL8Vector, using the index-convention l = a + b*(b+1) if a <= b, see PMETRIC_INDEX(a,b).
Definition at line 1150 of file LatticeCovering.c.
| gsl_matrix* XLALmetric2gsl | ( | const REAL8Vector * | metric | ) |
Convert a LAL-encoded metric (REAL8Vector) into a symmetric gsl_matrix.
Definition at line 1184 of file LatticeCovering.c.
Definition at line 62 of file LatticeCovering.c.
Definition at line 63 of file LatticeCovering.c.
1.5.2