Krita Source Code Documentation
Loading...
Searching...
No Matches
bspline_base.h
Go to the documentation of this file.
1
2// einspline: a library for creating and evaluating B-splines //
3// Copyright (C) 2007 Kenneth P. Esler, Jr. //
4// //
5// This program is free software; you can redistribute it and/or modify //
6// it under the terms of the GNU General Public License as published by //
7// the Free Software Foundation; either version 2 of the License, or //
8// (at your option) any later version. //
9// //
10// This program is distributed in the hope that it will be useful, //
11// but WITHOUT ANY WARRANTY; without even the implied warranty of //
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13// GNU General Public License for more details. //
14// //
15// You should have received a copy of the GNU General Public License //
16// along with this program; if not, write to the Free Software //
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, //
18// Boston, MA 02110-1301 USA //
20
21#ifndef BSPLINE_BASE_H
22#define BSPLINE_BASE_H
23
24//#include "config.h"
25#include "local_definitions.h"
26
27#ifdef __cplusplus
28#include <complex>
29typedef std::complex<float> complex_float;
30typedef std::complex<double> complex_double;
31#else
32#include <complex.h>
33typedef complex float complex_float;
34typedef complex double complex_double;
35#endif
36
37// Conventions:
38// Postfixes:
39// s: single precision real
40// d: double precision real
41// c: single precision complex
42// z: double precision complex
43
49
57
58typedef struct
59{
60 bc_code lCode, rCode;
61 float lVal, rVal;
62} BCtype_s;
63
64typedef struct
65{
66 bc_code lCode, rCode;
67 double lVal, rVal;
68} BCtype_d;
69
70typedef struct
71{
72 bc_code lCode, rCode;
73 float lVal_r, lVal_i, rVal_r, rVal_i;
74} BCtype_c;
75
76typedef struct
77{
78 bc_code lCode, rCode;
79 double lVal_r, lVal_i, rVal_r, rVal_i;
80} BCtype_z;
81
82
83typedef struct
84{
85 double start, end;
86 int num;
87
88 // private
89 double delta, delta_inv;
90} Ugrid;
91
98
99#ifdef __cplusplus
100extern "C"
101#endif
102void
103destroy_Bspline (void *spline);
104
105#endif
complex float complex_float
type_code
@ DOUBLE_REAL
@ SINGLE_REAL
@ DOUBLE_COMPLEX
@ SINGLE_COMPLEX
complex double complex_double
bc_code
@ FLAT
@ NATURAL
@ DERIV1
@ ANTIPERIODIC
@ DERIV2
@ PERIODIC
spline_code
@ MULTI_NU1D
@ NU1D
@ MULTI_NU2D
@ U1D
@ NU2D
@ MULTI_U1D
@ MULTI_U2D
@ MULTI_U3D
@ MULTI_NU3D
@ U2D
@ U3D
@ NU3D
void destroy_Bspline(void *spline)
#define restrict
bc_code lCode
float lVal_i
double lVal
bc_code lCode
float lVal
bc_code lCode
double lVal_i
bc_code lCode
spline_code sp_code
void *restrict coefs
type_code t_code
double end
double delta
int num