/* This file is automatically generated. DO NOT EDIT! */

#ifndef _cdivn_h
#define _cdivn_h

#include "seis_conjgrad.h"

void cmultidivn_init(int nw            /* number of components */, 
		       int ndim          /* number of dimensions */, 
		       int n             /* data size */, 
		       int *ndat         /* data dimensions [ndim] */, 
		       int *nbox         /* smoothing radius [ndim] */,
		       sp_complex* den   /* denominator [nw*nd] */,
		       bool verb         /* verbosity flag */);
/*< initialize >*/


void cmultidivn_close (void);
/*< free allocated storage >*/


void cmultidivn (sp_complex* num  /* numerator */, 
		 sp_complex* rat  /* ratio */, 
		 int niter        /* number of iterations */);
/*< smoothly divide num/rat >*/


void crepeat_init(int m1            /* trace length */, 
		  int m2            /* number of traces */, 
		  sp_coperator oper1 /* operator */);
/*< initialize >*/


void crepeat_lop (bool adj, bool add, int nx, int ny, sp_complex *xx, sp_complex *yy);
/*< combined linear operator >*/


void cweight2_init(int nw1        /* number of components */, 
		   int n          /* model size */, 
		   sp_complex *ww /* weight [nw*n] */);
/*< initialize >*/


void cweight2_close(void);
/*< free allocated storage >*/


void cweight2_lop (bool adj, bool add, int nx, int ny, sp_complex* xx, sp_complex* yy);
/*< linear operator >*/


void cweight_init(sp_complex *w1);
/*< initialize >*/


void cweight_lop (bool adj, bool add, int nx, int ny, 
		  sp_complex* xx, sp_complex* yy);
/*< linear operator >*/


void cmultidivn_fs_init(int nw            /* number of components */, 
		       int ndim          /* number of dimensions */, 
		       int n             /* data size */, 
		       int *ndat         /* data dimensions [ndim] */, 
			   int nbox0  /* triangle radius in frequency */, 
			   int **nbox /* triangle radius [ndim-1] */, 
		       sp_complex* den   /* denominator [nw*nd] */,
		       bool verb         /* verbosity flag */);
/*< initialize cmultidivn with frequency-dependent smoothing >*/


void cmultidivn_fs_close (void);
/*< free allocated storage >*/


void cmultidivn_fs (sp_complex* num  /* numerator */, 
		 sp_complex* rat  /* ratio */, 
		 int niter        /* number of iterations */);
/*< smoothly divide num/rat >*/


void smooth_fs_init (int ndim  /* number of dimensions */, 
			int nbox0  /* triangle radius in frequency */, 
			int **nbox /* triangle radius [ndim-1] */, 
			int *ndat /* data dimensions [ndim] */);
/*< initialize >*/


void smooth_fs_lop (bool adj, bool add, int nx, int ny, sp_complex* x, sp_complex* y);
/*< linear operator >*/


void smooth_fs_close (void);
/*< free allocated storage >*/


void cmultidivn_rnar_init(int nw            /* number of components */, 
		       int ndim          /* number of dimensions */, 
		       int n             /* data size */, 
		       int *ndat         /* data dimensions [ndim] */, 
			   int *nbox /* triangle radius [ndim-1] */, 
		       sp_complex* den   /* denominator [nw*nd] */,
		       bool verb         /* verbosity flag */);
/*< initialize cmultidivn with frequency-dependent smoothing >*/


void cmultidivn_rnar_close (void);
/*< free allocated storage >*/


void cmultidivn_rnar (sp_complex* num  /* numerator */, 
		 sp_complex* rat  /* ratio */, 
		 int niter        /* number of iterations */);
/*< smoothly divide num/rat >*/


void smooth_rnar_init (int ndim  /* number of dimensions */, 
			int *nbox /* triangle radius [ndim-1] */, 
			int *ndat /* data dimensions [ndim] */);
/*< initialize >*/


void smooth_rnar_close(void);
/*< free allocated storage >*/


void smooth_rnar_lop (bool adj, bool add, int nx, int ny, sp_complex* x, sp_complex* y);
/*< linear operator >*/

void cmultidivnn_init(int nw            /* number of components */, 
		       int ndim          /* number of dimensions */, 
		       int n             /* data size */, 
		       int *ndat         /* data dimensions [ndim] */, 
		       int *nbox         /* smoothing radius [ndim] */,
		       float **rct /* triangle lengths [ndim][nd] */,
               int **sft /* triangle shifts [ndim][nd] */,
		       sp_complex* den   /* denominator [nw*nd] */,
		       bool verb         /* verbosity flag */);
/*< initialize cmultidivn with frequency-dependent smoothing >*/


void cmultidivnn_close (void);
/*< free allocated storage >*/


void cmultidivnn (sp_complex* num  /* numerator */, 
		 sp_complex* rat  /* ratio */, 
		 int niter        /* number of iterations */);
/*< smoothly divide num/rat >*/


void cdivnn_init(int ndim   /* number of dimensions */, 
	       int nd     /* data size */, 
	       int *ndat  /* data dimensions [ndim] */, 
	       int *nbox  /* smoothing radius [ndim] */, 
		   float **rct /* triangle lengths [ndim][nd] */,
           int **sft /* triangle shifts [ndim][nd] */,
	       int niter1 /* number of iterations */,
	       bool verb  /* verbosity */);
/*< initialize >*/


void cdivnn_close (void);
/*< free allocated storage >*/


void cdivnn (sp_complex* num, sp_complex* den,  sp_complex* rat);
/*< smoothly divide rat=num/den >*/


void cdivnne (sp_complex* num, sp_complex* den,  sp_complex* rat);
/*< smoothly divide rat=num/den with preconditioning >*/


void cmultidivns_init(int nw            /* number of components */, 
		       int ndim          /* number of dimensions */, 
		       int n             /* data size */, 
		       int *ndat         /* data dimensions [ndim] */, 
		       int *nbox         /* smoothing radius [ndim] */,
		       sp_complex* den   /* denominator [nw*nd] */,
		       bool verb         /* verbosity flag */);
/*< initialize >*/


void cmultidivns_close (void);
/*< free allocated storage >*/


void cmultidivns (sp_complex* num  /* numerator */, 
		 sp_complex* rat  /* ratio */, 
		 int niter        /* number of iterations */);
/*< smoothly divide num/rat >*/


void crepeats_init(int m1            /* trace length */, 
		  int m2            /* number of traces */, 
		  sp_coperator oper1 /* operator */);
/*< initialize >*/


void crepeats_lop (bool adj, bool add, int nx, int ny, sp_complex *xx, sp_complex *yy);
/*< combined linear operator >*/


void cweight2s_init(int nw1        /* number of components */, 
		   int n          /* model size */, 
		   sp_complex *ww /* weight [nw*n] */);
/*< initialize >*/


void cweight2s_close(void);
/*< free allocated storage >*/


void cweight2s_lop (bool adj, bool add, int nx, int ny, sp_complex* xx, sp_complex* yy);
/*< linear operator >*/



#endif
