File indexing completed on 2024-12-22 04:09:37

0001 /////////////////////////////////////////////////////////////////////////////
0002 //  einspline:  a library for creating and evaluating B-splines            //
0003 //  Copyright (C) 2007 Kenneth P. Esler, Jr.                               //
0004 //                                                                         //
0005 //  This program is free software; you can redistribute it and/or modify   //
0006 //  it under the terms of the GNU General Public License as published by   //
0007 //  the Free Software Foundation; either version 2 of the License, or      //
0008 //  (at your option) any later version.                                    //
0009 //                                                                         //
0010 //  This program is distributed in the hope that it will be useful,        //
0011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of         //
0012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          //
0013 //  GNU General Public License for more details.                           //
0014 //                                                                         //
0015 //  You should have received a copy of the GNU General Public License      //
0016 //  along with this program; if not, write to the Free Software            //
0017 //  Foundation, Inc., 51 Franklin Street, Fifth Floor,                     //
0018 //  Boston, MA  02110-1301  USA                                            //
0019 /////////////////////////////////////////////////////////////////////////////
0020 
0021 #ifndef BSPLINE_CREATE_H
0022 #define BSPLINE_CREATE_H
0023 
0024 #include "bspline_base.h"
0025 #include "bspline_structs.h"
0026 
0027 #ifdef __cplusplus
0028 extern "C" {
0029 #endif
0030 
0031 ////////////////////////////////////////////////////////////
0032 ////////////////////////////////////////////////////////////
0033 ////              Spline creation functions             ////
0034 ////////////////////////////////////////////////////////////
0035 ////////////////////////////////////////////////////////////
0036 
0037 /////////////////////////////////////
0038 // Uniform, single precision, real //
0039 /////////////////////////////////////
0040 // Create 1D uniform single-precision, real Bspline
0041 UBspline_1d_s *
0042 create_UBspline_1d_s (Ugrid x_grid, BCtype_s xBC, float *data);
0043 
0044 // Create 2D uniform single-precision, real Bspline
0045 UBspline_2d_s *
0046 create_UBspline_2d_s (Ugrid x_grid,   Ugrid y_grid,
0047               BCtype_s   xBC, BCtype_s   yBC,
0048               float *data);
0049 
0050 // Create 3D uniform single-precision, real Bspline
0051 UBspline_3d_s *
0052 create_UBspline_3d_s (Ugrid x_grid,   Ugrid y_grid,   Ugrid z_grid,
0053               BCtype_s  xBC,  BCtype_s   yBC, BCtype_s   zBC,
0054               float *data);
0055 
0056 void
0057 recompute_UBspline_1d_s (UBspline_1d_s* spline, float *data);
0058 
0059 void
0060 recompute_UBspline_2d_s (UBspline_2d_s* spline, float *data);
0061 
0062 void
0063 recompute_UBspline_3d_s (UBspline_3d_s* spline, float *data);
0064 
0065 /////////////////////////////////////
0066 // Uniform, double precision, real //
0067 /////////////////////////////////////
0068 // Create 1D uniform single-precision, real Bspline
0069 UBspline_1d_d *
0070 create_UBspline_1d_d (Ugrid x_grid, BCtype_d xBC, double *data);
0071 
0072 // Create 2D uniform single-precision, real Bspline
0073 UBspline_2d_d *
0074 create_UBspline_2d_d (Ugrid x_grid,   Ugrid y_grid,
0075               BCtype_d   xBC, BCtype_d   yBC,
0076               double *data);
0077 
0078 // Create 3D uniform single-precision, real Bspline
0079 UBspline_3d_d *
0080 create_UBspline_3d_d (Ugrid x_grid,   Ugrid   y_grid,   Ugrid z_grid,
0081               BCtype_d  xBC,  BCtype_d   yBC, BCtype_d   zBC,
0082               double *data);
0083 
0084 void
0085 recompute_UBspline_1d_d (UBspline_1d_d* spline, double *data);
0086 
0087 void
0088 recompute_UBspline_2d_d (UBspline_2d_d* spline, double *data);
0089 
0090 void
0091 recompute_UBspline_3d_d (UBspline_3d_d* spline, double *data);
0092 
0093 ///////////////////////////////////////
0094 // Uniform, single precision, complex//
0095 ///////////////////////////////////////
0096 // Create 1D uniform single-precision, real Bspline
0097 UBspline_1d_c *
0098 create_UBspline_1d_c (Ugrid x_grid, BCtype_c xBC, complex_float *data);
0099 
0100 // Create 2D uniform single-precision, real Bspline
0101 UBspline_2d_c *
0102 create_UBspline_2d_c (Ugrid   x_grid, Ugrid   y_grid,
0103               BCtype_c   xBC, BCtype_c   yBC,
0104               complex_float *data);
0105 
0106 // Create 3D uniform single-precision, real Bspline
0107 UBspline_3d_c *
0108 create_UBspline_3d_c (Ugrid  x_grid, Ugrid y_grid, Ugrid z_grid,
0109               BCtype_c  xBC, BCtype_c yBC, BCtype_c zBC,
0110               complex_float *data);
0111 
0112 void
0113 recompute_UBspline_1d_c (UBspline_1d_c* spline, complex_float *data);
0114 
0115 void
0116 recompute_UBspline_2d_c (UBspline_2d_c* spline, complex_float *data);
0117 
0118 void
0119 recompute_UBspline_3d_c (UBspline_3d_c* spline, complex_float *data);
0120  
0121 ///////////////////////////////////////
0122 // Uniform, double precision, complex//
0123 ///////////////////////////////////////
0124 // Create 1D uniform double-precision, complex Bspline
0125 UBspline_1d_z *
0126 create_UBspline_1d_z (Ugrid x_grid, BCtype_z xBC, complex_double *data);
0127 
0128 // Create 2D uniform double-precision, complex Bspline
0129 UBspline_2d_z *
0130 create_UBspline_2d_z (Ugrid x_grid, Ugrid y_grid,
0131               BCtype_z   xBC, BCtype_z   yBC,
0132               complex_double *data);
0133 
0134 // Create 3D uniform double-precision, complex Bspline
0135 UBspline_3d_z *
0136 create_UBspline_3d_z (Ugrid  x_grid, Ugrid   y_grid, Ugrid z_grid,
0137               BCtype_z  xBC, BCtype_z   yBC, BCtype_z zBC,
0138               complex_double *data);
0139 
0140 void
0141 recompute_UBspline_1d_z (UBspline_1d_z* spline, complex_double *data);
0142 
0143 void
0144 recompute_UBspline_2d_z (UBspline_2d_z* spline, complex_double *data);
0145 
0146 void
0147 recompute_UBspline_3d_z (UBspline_3d_z* spline, complex_double *data);
0148 
0149 #ifdef __cplusplus
0150 }
0151 #endif
0152 
0153 #endif