22#ifndef LALINFERENCEROQ_H
23#define LALINFERENCEROQ_H
25#include <lal/LALStdlib.h>
26#include <lal/LALConstants.h>
27#include <lal/LALDatatypes.h>
28#include <lal/LALInference.h>
29#include <lal/XLALError.h>
31#include <gsl/gsl_vector.h>
32#include <gsl/gsl_matrix.h>
33#include <gsl/gsl_blas.h>
34#include <gsl/gsl_cblas.h>
35#include <gsl/gsl_linalg.h>
36#include <gsl/gsl_complex.h>
44typedef struct tagLALInferenceREALROQInterpolant{
50typedef struct tagLALInferenceCOMPLEXROQInterpolant{
91 const REAL8 tolerance,
98 const REAL8 tolerance,
INT4 LALInferenceTestCOMPLEX16OrthonormalBasis(const REAL8Vector *delta, REAL8 tolerance, const COMPLEX16Array *RB, COMPLEX16Array **testmodels)
Test the reduced basis against another set of waveforms.
COMPLEX16 LALInferenceROQCOMPLEX16DotProduct(COMPLEX16Vector *weights, COMPLEX16Vector *model)
Calculate the dot product of two complex vectors using the ROQ iterpolant.
REAL8 LALInferenceEnrichCOMPLEX16Basis(const REAL8Vector *delta, const REAL8 tolerance, COMPLEX16Array **RB, UINT4Vector **greedypoints, const COMPLEX16Array *testmodels, COMPLEX16Array **testmodelsnew)
Expand the complex training waveforms with ones from a set of new training waveforms.
REAL8 LALInferenceGenerateCOMPLEX16OrthonormalBasis(COMPLEX16Array **RB, const REAL8Vector *delta, REAL8 tolerance, COMPLEX16Array **TS, UINT4Vector **greedypoints)
Create a orthonormal basis set from a training set of complex waveforms.
INT4 LALInferenceTestREAL8OrthonormalBasis(const REAL8Vector *delta, REAL8 tolerance, const REAL8Array *RB, REAL8Array **testmodels)
Test the reduced basis against another set of waveforms.
void LALInferenceRemoveCOMPLEXROQInterpolant(LALInferenceCOMPLEXROQInterpolant *a)
Free memory for a LALInferenceCOMPLEXROQInterpolant.
REAL8 LALInferenceGenerateREAL8OrthonormalBasis(REAL8Array **RB, const REAL8Vector *delta, REAL8 tolerance, REAL8Array **TS, UINT4Vector **greedypoints)
Create a orthonormal basis set from a training set of real waveforms.
COMPLEX16Vector * LALInferenceGenerateCOMPLEX16LinearWeights(COMPLEX16Array *B, COMPLEX16Vector *data, REAL8Vector *vars)
Create the weights for the ROQ interpolant for the complex data and model dot product <d|h>
REAL8Vector * LALInferenceGenerateREAL8LinearWeights(REAL8Array *B, REAL8Vector *data, REAL8Vector *vars)
Create the weights for the ROQ interpolant for the linear data and model dot product <d|h>
REAL8 LALInferenceROQREAL8DotProduct(REAL8Vector *weights, REAL8Vector *model)
Calculate the dot product of two vectors using the ROQ iterpolant.
REAL8Vector * LALInferenceGenerateQuadraticWeights(REAL8Array *B, REAL8Vector *vars)
Create the weights for the ROQ interpolant for the model quadratic model term real(<h|h>).
REAL8 LALInferenceEnrichREAL8Basis(const REAL8Vector *delta, const REAL8 tolerance, REAL8Array **RB, UINT4Vector **greedypoints, const REAL8Array *testmodels, REAL8Array **testmodelsnew)
Expand the real training waveforms with ones from a set of new training waveforms.
LALInferenceCOMPLEXROQInterpolant * LALInferenceGenerateCOMPLEXROQInterpolant(COMPLEX16Array *RB)
Create a complex empirical interpolant from a set of orthonormal basis functions.
void LALInferenceValidateCOMPLEX16OrthonormalBasis(REAL8Vector **projerr, const REAL8Vector *delta, const COMPLEX16Array *RB, COMPLEX16Array **testmodels)
Validate the complex reduced basis against another set of waveforms.
void LALInferenceValidateREAL8OrthonormalBasis(REAL8Vector **projerr, const REAL8Vector *delta, const REAL8Array *RB, REAL8Array **testmodels)
Validate the real reduced basis against another set of waveforms.
void LALInferenceRemoveREALROQInterpolant(LALInferenceREALROQInterpolant *a)
Free memory for a LALInferenceREALROQInterpolant.
LALInferenceREALROQInterpolant * LALInferenceGenerateREALROQInterpolant(REAL8Array *RB)
Create a real empirical interpolant from a set of orthonormal basis functions.
A structure to hold a complex (double precision) interpolant matrix and interpolation node indices.
COMPLEX16Array * B
The interpolant matrix.
UINT4 * nodes
The nodes (indices) for the interpolation.
A structure to hold a real (double precision) interpolant matrix and interpolation node indices.
UINT4 * nodes
The nodes (indices) for the interpolation.
REAL8Array * B
The interpolant matrix.