ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
fft_complex_float.hpp
Go to the documentation of this file.
1/*
2 * $Id: fft_complex_float.hpp 283 2012-08-26 15:36:43Z jdl3 $
3 * Copyright (C) 2012, 2019 John D Lamb
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 (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#ifndef CCGSL_FFT_COMPLEX_FLOAT_HPP
21#define CCGSL_FFT_COMPLEX_FLOAT_HPP
22
23#include <gsl/gsl_fft_complex_float.h>
24#include "complex_float.hpp"
26#include "fft.hpp"
27
28namespace gsl {
29 namespace fft {
33 namespace complex_float {
37 namespace radix2 {
45 inline int forward( gsl::complex_packed_array_float data, size_t const stride, size_t const n ){
46 return gsl_fft_complex_float_radix2_forward( data, stride, n ); }
47
55 inline int backward( gsl::complex_packed_array_float data, size_t const stride, size_t const n ){
56 return gsl_fft_complex_float_radix2_backward( data, stride, n ); }
57
65 inline int inverse( gsl::complex_packed_array_float data, size_t const stride, size_t const n ){
66 return gsl_fft_complex_float_radix2_inverse( data, stride, n ); }
67
76 inline int transform( gsl::complex_packed_array_float data, size_t const stride, size_t const n,
77 fft::direction const sign ){
78 return gsl_fft_complex_float_radix2_transform( data, stride, n, sign ); }
79
87 inline int dif_forward( gsl::complex_packed_array_float data, size_t const stride, size_t const n ){
88 return gsl_fft_complex_float_radix2_dif_forward( data, stride, n ); }
89
97 inline int dif_backward( gsl::complex_packed_array_float data, size_t const stride, size_t const n ){
98 return gsl_fft_complex_float_radix2_dif_backward( data, stride, n ); }
99
107 inline int dif_inverse( gsl::complex_packed_array_float data, size_t const stride, size_t const n ){
108 return gsl_fft_complex_float_radix2_dif_inverse( data, stride, n ); }
109
118 inline int dif_transform( gsl::complex_packed_array_float data, size_t const stride, size_t const n,
119 fft::direction const sign ){
120 return gsl_fft_complex_float_radix2_dif_transform( data, stride, n, sign ); }
121
122 // Version swithout stride argument
129 inline int forward( gsl::complex_packed_array_float data, size_t const n ){
130 return gsl_fft_complex_float_radix2_forward( data, 1, n ); }
131
138 inline int backward( gsl::complex_packed_array_float data, size_t const n ){
139 return gsl_fft_complex_float_radix2_backward( data, 1, n ); }
140
147 inline int inverse( gsl::complex_packed_array_float data, size_t const n ){
148 return gsl_fft_complex_float_radix2_inverse( data, 1, n ); }
149
157 inline int transform( gsl::complex_packed_array_float data, size_t const n,
158 fft::direction const sign ){
159 return gsl_fft_complex_float_radix2_transform( data, 1, n, sign ); }
160
167 inline int dif_forward( gsl::complex_packed_array_float data, size_t const n ){
168 return gsl_fft_complex_float_radix2_dif_forward( data, 1, n ); }
169
176 inline int dif_backward( gsl::complex_packed_array_float data, size_t const n ){
177 return gsl_fft_complex_float_radix2_dif_backward( data, 1, n ); }
178
185 inline int dif_inverse( gsl::complex_packed_array_float data, size_t const n ){
186 return gsl_fft_complex_float_radix2_dif_inverse( data, 1, n ); }
187
195 inline int dif_transform( gsl::complex_packed_array_float data, size_t const n,
196 fft::direction const sign ){
197 return gsl_fft_complex_float_radix2_dif_transform( data, 1, n, sign ); }
198
206 template<typename DATA>
207 inline int forward( DATA& data, size_t const stride = 1 ){
208 return gsl_fft_complex_float_radix2_forward( data.data(), stride, data.size() / (2 * stride) ); }
209
217 template<typename DATA>
218 inline int backward( DATA& data, size_t const stride = 1 ){
219 return gsl_fft_complex_float_radix2_backward( data.data(), stride, data.size() / (2 * stride) ); }
220
228 template<typename DATA>
229 inline int inverse( DATA& data, size_t const stride = 1 ){
230 return gsl_fft_complex_float_radix2_inverse( data.data(), stride, data.size() / (2 * stride) ); }
231
240 template<typename DATA>
241 inline int transform( DATA& data, size_t const stride, fft::direction const sign ){
242 return gsl_fft_complex_float_radix2_transform( data.data(), stride,
243 data.size() / (2 * stride), sign ); }
251 template<typename DATA>
252 inline int transform( DATA& data, fft::direction const sign ){
253 return gsl_fft_complex_float_radix2_transform( data.data(), 1, data.size() / 2, sign ); }
254
262 template<typename DATA>
263 inline int dif_forward( DATA& data, size_t const stride = 1 ){
264 return gsl_fft_complex_float_radix2_dif_forward( data.data(), stride, data.size() / (2 * stride) ); }
265
273 template<typename DATA>
274 inline int dif_backward( DATA& data, size_t const stride = 1 ){
275 return gsl_fft_complex_float_radix2_dif_backward( data.data(), stride, data.size() / (2 * stride) ); }
276
284 template<typename DATA>
285 inline int dif_inverse( DATA& data, size_t const stride = 1 ){
286 return gsl_fft_complex_float_radix2_dif_inverse( data.data(), stride, data.size() / (2 * stride) ); }
287
296 template<typename DATA>
297 inline int dif_transform( DATA& data, size_t const stride, fft::direction const sign ){
298 return gsl_fft_complex_float_radix2_dif_transform( data.data(), stride,
299 data.size() / (2 * stride), sign ); }
307 template<typename DATA>
308 inline int dif_transform( DATA& data, fft::direction const sign ){
309 return gsl_fft_complex_float_radix2_dif_transform( data.data(), 1, data.size() / 2, sign ); }
316 template<>
317 inline int forward( gsl::vector_complex_float& data, size_t const stride ){
318 return gsl_fft_complex_float_radix2_forward( data.data(), stride, data.size() / stride ); }
319
326 template<>
327 inline int backward( gsl::vector_complex_float& data, size_t const stride ){
328 return gsl_fft_complex_float_radix2_backward( data.data(), stride, data.size() / stride ); }
329
336 template<>
337 inline int inverse( gsl::vector_complex_float& data, size_t const stride ){
338 return gsl_fft_complex_float_radix2_inverse( data.data(), stride, data.size() / stride ); }
339
347 template<>
348 inline int transform( gsl::vector_complex_float& data, size_t const stride, fft::direction const sign ){
349 return gsl_fft_complex_float_radix2_transform( data.data(), stride, data.size() / stride, sign ); }
350
351 // stride-free versions
352
359 return gsl_fft_complex_float_radix2_forward( data.data(), 1, data.size() ); }
360
367 return gsl_fft_complex_float_radix2_backward( data.data(), 1, data.size() ); }
368
375 return gsl_fft_complex_float_radix2_inverse( data.data(), 1, data.size() ); }
376
384 return gsl_fft_complex_float_radix2_transform( data.data(), 1,
385 data.size(), sign ); }
386
393 return gsl_fft_complex_float_radix2_dif_forward( data.data(), 1, data.size() ); }
394
401 return gsl_fft_complex_float_radix2_dif_backward( data.data(), 1, data.size() ); }
402
409 return gsl_fft_complex_float_radix2_dif_inverse( data.data(), 1, data.size() ); }
410
418 return gsl_fft_complex_float_radix2_dif_transform( data.data(), 1,
419 data.size(), sign ); }
420 }
421
425 class wavetable {
426 public:
431 ccgsl_pointer = 0;
432 count = 0; // initially nullptr will do
433 }
434 // Refines random access container
435 // Refines assignable
440 explicit wavetable( size_t const n ){
441 ccgsl_pointer = gsl_fft_complex_wavetable_float_alloc( n );
442 // just plausibly we could allocate wavetable but not count
443 try { count = new size_t; } catch( std::bad_alloc& e ){
444 // try to tidy up before rethrowing
445 gsl_fft_complex_wavetable_float_free( ccgsl_pointer );
446 throw e;
447 }
448 *count = 1; // initially there is just one reference to ccgsl_pointer
449 }
456 explicit wavetable( gsl_fft_complex_wavetable_float* v ){
457 ccgsl_pointer = v;
458 // just plausibly we could fail to allocate count: no further action needed.
459 count = new size_t;
460 *count = 1; // initially there is just one reference to ccgsl_pointer
461 }
462 // copy constructor
468 count = v.count; if( count != 0 ) ++*count; }
469 // assignment operator
475 // first, possibly delete anything pointed to by this
476 if( count == 0 or --*count == 0 ){
477 if( ccgsl_pointer != 0 ) gsl_fft_complex_wavetable_float_free( ccgsl_pointer );
478 delete count;
479 } // Then copy
480 ccgsl_pointer = v.ccgsl_pointer; count = v.count; if( count != 0 ) ++*count; return *this;
481 }
482 // clone()
488 wavetable clone() const {
489 wavetable copy( ccgsl_pointer->n );
490 // Now copy
491 if( gsl_fft_complex_float_memcpy( copy.ccgsl_pointer, ccgsl_pointer ) != GSL_SUCCESS )
492 throw( std::bad_alloc() );
493 // return new object
494 return copy;
495 }
496
497 // destructor
502 if( count == 0 or --*count == 0 ){
503 // could have allocated null pointer
504 if( ccgsl_pointer != 0 ) gsl_fft_complex_wavetable_float_free( ccgsl_pointer );
505 delete count;
506 }
507 }
508#ifdef __GXX_EXPERIMENTAL_CXX0X__
514 std::swap( count, v.count );
515 v.ccgsl_pointer = nullptr;
516 }
523 wavetable( std::move( v ) ).swap( *this );
524 return *this;
525 }
526#endif
527 // Refines equality comparable
528 // == operator
535 bool operator==( wavetable const& v ) const { return ccgsl_pointer == v.ccgsl_pointer; }
536 // != operator
543 bool operator!=( wavetable const& v ) const { return not operator==( v ); }
544 // Refines forward container
545 // Refines less than comparable
546 // operator<
555 bool operator<( wavetable const& v ) const { return ccgsl_pointer < v.ccgsl_pointer; }
556 // operator>
565 bool operator>( wavetable const& v ) const { return ccgsl_pointer > v.ccgsl_pointer; }
566 // operator<=
575 bool operator<=( wavetable const& v ) const { return ccgsl_pointer <= v.ccgsl_pointer; }
576 // operator>=
585 bool operator>=( wavetable const& v ) const { return ccgsl_pointer >= v.ccgsl_pointer; }
590 bool empty() const { return ccgsl_pointer == 0; }
591 // swap() --- should work even if sizes don't match
597 void swap( wavetable& v ){
598 std::swap( ccgsl_pointer, v.ccgsl_pointer );
599 std::swap( count, v.count );
600 }
601 private:
605 gsl_fft_complex_wavetable_float* ccgsl_pointer;
609 size_t* count;
610 public:
611 // shared reference functions
616 gsl_fft_complex_wavetable_float* get() const { return ccgsl_pointer; }
622 bool unique() const { return count != 0 and *count == 1; }
627 size_t use_count() const { return count == 0 ? 0 : *count; }
633#ifdef __GXX_EXPERIMENTAL_CXX0X__
634 explicit
635#endif
636 operator bool() const { return ccgsl_pointer != 0; }
637 };
638
642 class workspace {
643 public:
648 ccgsl_pointer = 0;
649 count = 0; // initially nullptr will do
650 }
651 // Refines random access container
652 // Refines assignable
657 explicit workspace( size_t const n ){
658 ccgsl_pointer = gsl_fft_complex_workspace_float_alloc( n );
659 // just plausibly we could allocate workspace but not count
660 try { count = new size_t; } catch( std::bad_alloc& e ){
661 // try to tidy up before rethrowing
662 gsl_fft_complex_workspace_float_free( ccgsl_pointer );
663 throw e;
664 }
665 *count = 1; // initially there is just one reference to ccgsl_pointer
666 }
673 explicit workspace( gsl_fft_complex_workspace_float* v ){
674 ccgsl_pointer = v;
675 // just plausibly we could fail to allocate count: no further action needed.
676 count = new size_t;
677 *count = 1; // initially there is just one reference to ccgsl_pointer
678 }
679 // copy constructor
685 count = v.count; if( count != 0 ) ++*count; }
686 // assignment operator
692 // first, possibly delete anything pointed to by this
693 if( count == 0 or --*count == 0 ){
694 if( ccgsl_pointer != 0 ) gsl_fft_complex_workspace_float_free( ccgsl_pointer );
695 delete count;
696 } // Then copy
697 ccgsl_pointer = v.ccgsl_pointer; count = v.count; if( count != 0 ) ++*count; return *this;
698 }
699 // destructor
704 if( count == 0 or --*count == 0 ){
705 // could have allocated null pointer
706 if( ccgsl_pointer != 0 ) gsl_fft_complex_workspace_float_free( ccgsl_pointer );
707 delete count;
708 }
709 }
710#ifdef __GXX_EXPERIMENTAL_CXX0X__
716 std::swap( count, v.count );
717 v.ccgsl_pointer = nullptr;
718 }
725 workspace( std::move( v ) ).swap( *this );
726 return *this;
727 }
728#endif
729 // Refines equality comparable
730 // == operator
737 bool operator==( workspace const& v ) const { return ccgsl_pointer == v.ccgsl_pointer; }
738 // != operator
745 bool operator!=( workspace const& v ) const { return not operator==( v ); }
746 // Refines forward container
747 // Refines less than comparable
748 // operator<
757 bool operator<( workspace const& v ) const { return ccgsl_pointer < v.ccgsl_pointer; }
758 // operator>
767 bool operator>( workspace const& v ) const { return ccgsl_pointer > v.ccgsl_pointer; }
768 // operator<=
777 bool operator<=( workspace const& v ) const { return ccgsl_pointer <= v.ccgsl_pointer; }
778 // operator>=
787 bool operator>=( workspace const& v ) const { return ccgsl_pointer >= v.ccgsl_pointer; }
792 bool empty() const { return ccgsl_pointer == 0; }
793 // swap() --- should work even if sizes don't match
799 void swap( workspace& v ){
800 std::swap( ccgsl_pointer, v.ccgsl_pointer );
801 std::swap( count, v.count );
802 }
803 private:
807 gsl_fft_complex_workspace_float* ccgsl_pointer;
811 size_t* count;
812 public:
813 // shared reference functions
818 gsl_fft_complex_workspace_float* get() const { return ccgsl_pointer; }
824 bool unique() const { return count != 0 and *count == 1; }
829 size_t use_count() const { return count == 0 ? 0 : *count; }
835#ifdef __GXX_EXPERIMENTAL_CXX0X__
836 explicit
837#endif
838 operator bool() const { return ccgsl_pointer != 0; }
839 };
840
850 inline int forward( gsl::complex_packed_array_float data, size_t const stride, size_t const n,
851 wavetable const& wavetable, workspace& work ){
852 return gsl_fft_complex_float_forward( data, stride, n, wavetable.get(), work.get() ); }
853
863 inline int backward( gsl::complex_packed_array_float data, size_t const stride, size_t const n,
864 wavetable const& wavetable, workspace& work ){
865 return gsl_fft_complex_float_backward( data, stride, n, wavetable.get(), work.get() ); }
866
876 inline int inverse( gsl::complex_packed_array_float data, size_t const stride, size_t const n,
877 wavetable const& wavetable, workspace& work ){
878 return gsl_fft_complex_float_inverse( data, stride, n, wavetable.get(), work.get() ); }
879
890 inline int transform( gsl::complex_packed_array_float data, size_t const stride, size_t const n,
891 wavetable const& wavetable, workspace& work, fft::direction const sign ){
892 return gsl_fft_complex_float_transform( data, stride, n, wavetable.get(), work.get(), sign ); }
893
894 // stride-free versions
895
904 inline int forward( gsl::complex_packed_array_float data, size_t const n,
905 wavetable const& wavetable, workspace& work ){
906 return gsl_fft_complex_float_forward( data, 1, n, wavetable.get(), work.get() ); }
907
916 inline int backward( gsl::complex_packed_array_float data, size_t const n,
917 wavetable const& wavetable, workspace& work ){
918 return gsl_fft_complex_float_backward( data, 1, n, wavetable.get(), work.get() ); }
919
928 inline int inverse( gsl::complex_packed_array_float data, size_t const n,
929 wavetable const& wavetable, workspace& work ){
930 return gsl_fft_complex_float_inverse( data, 1, n, wavetable.get(), work.get() ); }
931
941 inline int transform( gsl::complex_packed_array_float data, size_t const n,
942 wavetable const& wavetable, workspace& work, fft::direction const sign ){
943 return gsl_fft_complex_float_transform( data, 1, n, wavetable.get(), work.get(), sign ); }
944
945 // template versions
946
956 template<typename DATA>
957 inline int forward( DATA& data, size_t const stride, wavetable const& wavetable, workspace& work ){
958 return gsl_fft_complex_float_forward( data.data(), stride, data.size() / (2 * stride),
959 wavetable.get(), work.get() ); }
960
970 template<typename DATA>
971 inline int backward(DATA& data, size_t const stride, wavetable const& wavetable, workspace& work ){
972 return gsl_fft_complex_float_backward( data.data(), stride, data.size() / (2 * stride),
973 wavetable.get(), work.get() ); }
974
984 template<typename DATA>
985 inline int inverse( DATA& data, size_t const stride, wavetable const& wavetable, workspace& work ){
986 return gsl_fft_complex_float_inverse( data.data(), stride, data.size() / (2 * stride),
987 wavetable.get(), work.get() ); }
988
999 template<typename DATA>
1000 inline int transform( DATA& data, size_t const stride,
1001 wavetable const& wavetable, workspace& work, fft::direction const sign ){
1002 return gsl_fft_complex_float_transform( data.data(), stride, data.size() / (2 * stride),
1003 wavetable.get(), work.get(), sign ); }
1012 template<>
1013 inline int forward( gsl::vector_complex_float& data, size_t const stride,
1014 wavetable const& wavetable, workspace& work ){
1015 return gsl_fft_complex_float_forward( data.data(), stride, data.size() / stride,
1016 wavetable.get(), work.get() ); }
1017
1026 template<>
1027 inline int backward( gsl::vector_complex_float& data, size_t const stride,
1028 wavetable const& wavetable, workspace& work ){
1029 return gsl_fft_complex_float_backward( data.data(), stride, data.size() / stride,
1030 wavetable.get(), work.get() ); }
1031
1040 template<>
1041 inline int inverse( gsl::vector_complex_float& data, size_t const stride,
1042 wavetable const& wavetable, workspace& work ){
1043 return gsl_fft_complex_float_inverse( data.data(), stride, data.size() / stride,
1044 wavetable.get(), work.get() ); }
1045
1055 template<>
1056 inline int transform( gsl::vector_complex_float& data, size_t const stride,
1057 wavetable const& wavetable, workspace& work, fft::direction const sign ){
1058 return gsl_fft_complex_float_transform( data.data(), stride, data.size() / stride,
1059 wavetable.get(), work.get(), sign ); }
1060
1061 // stride-free versions
1062
1071 template<typename DATA>
1072 inline int forward( DATA& data, wavetable const& wavetable, workspace& work ){
1073 return gsl_fft_complex_float_forward( data.data(), 1, data.size() / 2,
1074 wavetable.get(), work.get() ); }
1075
1084 template<typename DATA>
1085 inline int backward(DATA& data, wavetable const& wavetable, workspace& work ){
1086 return gsl_fft_complex_float_backward( data.data(), 1, data.size() / 2,
1087 wavetable.get(), work.get() ); }
1088
1097 template<typename DATA>
1098 inline int inverse( DATA& data, wavetable const& wavetable, workspace& work ){
1099 return gsl_fft_complex_float_inverse( data.data(), 1, data.size() / 2,
1100 wavetable.get(), work.get() ); }
1101
1111 template<typename DATA>
1112 inline int transform( DATA& data,
1113 wavetable const& wavetable, workspace& work, fft::direction const sign ){
1114 return gsl_fft_complex_float_transform( data.data(), 1, data.size() / 2,
1115 wavetable.get(), work.get(), sign ); }
1123 template<>
1125 wavetable const& wavetable, workspace& work ){
1126 return gsl_fft_complex_float_forward( data.data(), 1, data.size(),
1127 wavetable.get(), work.get() ); }
1128
1136 template<>
1138 wavetable const& wavetable, workspace& work ){
1139 return gsl_fft_complex_float_backward( data.data(), 1, data.size(),
1140 wavetable.get(), work.get() ); }
1141
1149 template<>
1151 wavetable const& wavetable, workspace& work ){
1152 return gsl_fft_complex_float_inverse( data.data(), 1, data.size(),
1153 wavetable.get(), work.get() ); }
1154
1163 template<>
1165 wavetable const& wavetable, workspace& work, fft::direction const sign ){
1166 return gsl_fft_complex_float_transform( data.data(), 1, data.size(),
1167 wavetable.get(), work.get(), sign ); }
1168 }
1169 }
1170}
1171
1172#endif
This class handles complex_float numbers.
C++ version of gsl_fft_complex_wavetable_float functions.
void swap(wavetable &v)
Swap two wavetable.
wavetable(wavetable const &v)
The copy constructor.
gsl_fft_complex_wavetable_float * get() const
Get the gsl_fft_complex_wavetable_float.
bool operator<(wavetable const &v) const
A container needs to define an ordering for sorting.
bool operator==(wavetable const &v) const
Two wavetable are identically equal if their elements are identical.
size_t use_count() const
Find how many workspace objects share this pointer.
~wavetable()
The destructor only deletes the pointers if count reaches zero.
bool operator>=(wavetable const &v) const
A container needs to define an ordering for sorting.
wavetable()
The default constructor is only really useful for assigning to.
wavetable clone() const
The clone function.
bool operator!=(wavetable const &v) const
Two wavetable are different equal if their elements are not identical.
wavetable(gsl_fft_complex_wavetable_float *v)
Could construct from a gsl_fft_complex_wavetable_float.
wavetable(size_t const n)
The default constructor creates a new workspace of size n.
bool operator>(wavetable const &v) const
A container needs to define an ordering for sorting.
size_t * count
The shared reference count.
wavetable & operator=(wavetable &&v)
Move operator.
gsl_fft_complex_wavetable_float * ccgsl_pointer
The shared pointer.
bool empty() const
Find if the wavetable is empty.
bool operator<=(wavetable const &v) const
A container needs to define an ordering for sorting.
wavetable & operator=(wavetable const &v)
The assignment operator.
bool unique() const
Find if this is the only object sharing the gsl_fft_complex_wavetable_float.
wavetable(wavetable &&v)
Move constructor.
Workspace for complex_float fast fourier transforms.
bool operator<=(workspace const &v) const
A container needs to define an ordering for sorting.
workspace & operator=(workspace const &v)
The assignment operator.
bool empty() const
Find if the workspace is empty.
workspace(gsl_fft_complex_workspace_float *v)
Could construct from a gsl_fft_complex_workspace_float.
void swap(workspace &v)
Swap two workspace.
size_t * count
The shared reference count.
workspace & operator=(workspace &&v)
Move operator.
size_t use_count() const
Find how many workspace objects share this pointer.
bool operator==(workspace const &v) const
Two workspace are identically equal if their elements are identical.
bool operator>(workspace const &v) const
A container needs to define an ordering for sorting.
workspace()
The default constructor is only really useful for assigning to.
~workspace()
The destructor only deletes the pointers if count reaches zero.
workspace(workspace &&v)
Move constructor.
bool operator<(workspace const &v) const
A container needs to define an ordering for sorting.
bool operator>=(workspace const &v) const
A container needs to define an ordering for sorting.
gsl_fft_complex_workspace_float * get() const
Get the gsl_fft_complex_workspace_float.
workspace(workspace const &v)
The copy constructor.
workspace(size_t const n)
The default constructor creates a new workspace of size n.
bool unique() const
Find if this is the only object sharing the gsl_fft_complex_workspace_float.
bool operator!=(workspace const &v) const
Two workspace are different equal if their elements are not identical.
gsl_fft_complex_workspace_float * ccgsl_pointer
The shared pointer.
This class handles vector_complex_float objects as shared handles.
size_type size() const
The size (number of elements) of the vector_complex_float.
float * data()
Give access to the data block.
int dif_transform(gsl::complex_packed_array_float data, size_t const stride, size_t const n, fft::direction const sign)
C++ version of gsl_fft_complex_float_radix2_dif_transform().
int dif_inverse(gsl::complex_packed_array_float data, size_t const stride, size_t const n)
C++ version of gsl_fft_complex_float_radix2_dif_inverse().
int dif_backward(gsl::complex_packed_array_float data, size_t const stride, size_t const n)
C++ version of gsl_fft_complex_float_radix2_dif_backward().
int backward(gsl::complex_packed_array_float data, size_t const stride, size_t const n)
C++ version of gsl_fft_complex_float_radix2_backward().
int dif_forward(gsl::complex_packed_array_float data, size_t const stride, size_t const n)
C++ version of gsl_fft_complex_float_radix2_dif_forward().
int inverse(gsl::complex_packed_array_float data, size_t const stride, size_t const n)
C++ version of gsl_fft_complex_float_radix2_inverse().
int forward(gsl::complex_packed_array_float data, size_t const stride, size_t const n)
C++ version of gsl_fft_complex_float_radix2_forward().
int transform(gsl::complex_packed_array_float data, size_t const stride, size_t const n, fft::direction const sign)
C++ version of gsl_fft_complex_float_radix2_transform().
int inverse(gsl::complex_packed_array_float data, size_t const stride, size_t const n, wavetable const &wavetable, workspace &work)
C++ version of gsl_fft_complex_float_inverse().
int transform(gsl::complex_packed_array_float data, size_t const stride, size_t const n, wavetable const &wavetable, workspace &work, fft::direction const sign)
C++ version of gsl_fft_complex_float_transform().
int backward(gsl::complex_packed_array_float data, size_t const stride, size_t const n, wavetable const &wavetable, workspace &work)
C++ version of gsl_fft_complex_float_backward().
int forward(gsl::complex_packed_array_float data, size_t const stride, size_t const n, wavetable const &wavetable, workspace &work)
C++ version of gsl_fft_complex_float_forward().
gsl_fft_direction direction
Typedef for fft::direction.
Definition: fft.hpp:33
size_t n(workspace const &w)
C++ version of gsl_rstat_n().
Definition: rstat.hpp:299
The gsl package creates an interface to the GNU Scientific Library for C++.
Definition: blas.hpp:34
gsl_complex_packed_array_float complex_packed_array_float
Typedef.
short sign(T const &x)
Find the sign of x: returns +1 for a value of zero to be consistent with GNU Scientific Library.
Definition: math.hpp:127