ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
filter.hpp
Go to the documentation of this file.
1/*
2 * $Id$
3 * Copyright (C) 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_FILTER_HPP
21#define CCGSL_FILTER_HPP
22
23#include<gsl/gsl_filter.h>
24#include"vector.hpp"
25#include"vector_int.hpp"
26
27namespace gsl {
31 namespace filter {
36 public:
41 ccgsl_pointer = 0;
42 count = 0; // initially nullptr will do
43 }
44 // Refines random access container
45 // Refines assignable
49 explicit gaussian_workspace( size_t const K ){
50 ccgsl_pointer = gsl_filter_gaussian_alloc( K );
51 // just plausibly we could allocate gaussian_impulse_workspace but not count
52 try { count = new size_t; } catch( std::bad_alloc& e ){
53 // try to tidy up before rethrowing
54 gsl_filter_gaussian_free( ccgsl_pointer );
55 throw e;
56 }
57 *count = 1; // initially there is just one reference to ccgsl_pointer
58 }
65 explicit gaussian_workspace( gsl_filter_gaussian_workspace* v ){
66 ccgsl_pointer = v;
67 // just plausibly we could fail to allocate count: no further action needed.
68 count = new size_t;
69 *count = 1; // initially there is just one reference to ccgsl_pointer
70 }
71 // copy constructor
77 count = v.count; if( count != 0 ) ++*count; }
78 // assignment operator
84 // first, possibly delete anything pointed to by this
85 if( count == 0 or --*count == 0 ){
86 if( ccgsl_pointer != 0 ) gsl_filter_gaussian_free( ccgsl_pointer );
87 delete count;
88 } // Then copy
89 ccgsl_pointer = v.ccgsl_pointer; count = v.count; if( count != 0 ) ++*count; return *this;
90 }
91 // destructor
96 if( count == 0 or --*count == 0 ){
97 // could have allocated null pointer
98 if( ccgsl_pointer != 0 ) gsl_filter_gaussian_free( ccgsl_pointer );
99 delete count;
100 }
101 }
102#ifdef __GXX_EXPERIMENTAL_CXX0X__
108 std::swap( count, v.count );
109 v.ccgsl_pointer = nullptr;
110 }
117 gaussian_workspace( std::move( v ) ).swap( *this );
118 return *this;
119 }
120#endif
121 // Refines equality comparable
122 // == operator
129 bool operator==( gaussian_workspace const& v ) const { return ccgsl_pointer == v.ccgsl_pointer; }
130 // != operator
137 bool operator!=( gaussian_workspace const& v ) const { return not operator==( v ); }
138 // Refines forward container
139 // Refines less than comparable
140 // operator<
149 bool operator<( gaussian_workspace const& v ) const { return ccgsl_pointer < v.ccgsl_pointer; }
150 // operator>
159 bool operator>( gaussian_workspace const& v ) const { return ccgsl_pointer > v.ccgsl_pointer; }
160 // operator<=
169 bool operator<=( gaussian_workspace const& v ) const { return ccgsl_pointer <= v.ccgsl_pointer; }
170 // operator>=
179 bool operator>=( gaussian_workspace const& v ) const { return ccgsl_pointer >= v.ccgsl_pointer; }
184 bool empty() const { return ccgsl_pointer == 0; }
185 // swap() --- should work even if sizes don't match
192 std::swap( ccgsl_pointer, v.ccgsl_pointer );
193 std::swap( count, v.count );
194 }
195 private:
199 gsl_filter_gaussian_workspace* ccgsl_pointer;
203 size_t* count;
204 public:
205 // shared reference functions
210 gsl_filter_gaussian_workspace* get() const { return ccgsl_pointer; }
216 bool unique() const { return count != 0 and *count == 1; }
221 size_t use_count() const { return count == 0 ? 0 : *count; }
227#ifdef __GXX_EXPERIMENTAL_CXX0X__
228 explicit
229#endif
230 operator bool() const { return ccgsl_pointer != 0; }
231 };
242 inline int gaussian( gsl_filter_end_t const endtype, double const alpha, size_t const order,
243 vector const& x, vector& y, gaussian_workspace& w ){
244 return gsl_filter_gaussian( endtype, alpha, order, x.get(), y.get(), w.get() ); }
253 inline int gaussian_kernel( double const alpha, size_t const order, int const normalize,
254 vector& kernel ){
255 return gsl_filter_gaussian_kernel( alpha, order, normalize, kernel.get() ); }
260 public:
265 ccgsl_pointer = 0;
266 count = 0; // initially nullptr will do
267 }
268 // Refines random access container
269 // Refines assignable
273 explicit median_workspace( size_t const K ){
274 ccgsl_pointer = gsl_filter_median_alloc( K );
275 // just plausibly we could allocate filter_median but not count
276 try { count = new size_t; } catch( std::bad_alloc& e ){
277 // try to tidy up before rethrowing
278 gsl_filter_median_free( ccgsl_pointer );
279 throw e;
280 }
281 *count = 1; // initially there is just one reference to ccgsl_pointer
282 }
289 explicit median_workspace( gsl_filter_median_workspace* v ){
290 ccgsl_pointer = v;
291 // just plausibly we could fail to allocate count: no further action needed.
292 count = new size_t;
293 *count = 1; // initially there is just one reference to ccgsl_pointer
294 }
295 // copy constructor
301 count = v.count; if( count != 0 ) ++*count; }
302 // assignment operator
308 // first, possibly delete anything pointed to by this
309 if( count == 0 or --*count == 0 ){
310 if( ccgsl_pointer != 0 ) gsl_filter_median_free( ccgsl_pointer );
311 delete count;
312 } // Then copy
313 ccgsl_pointer = v.ccgsl_pointer; count = v.count; if( count != 0 ) ++*count;
314 return *this;
315 }
316 // destructor
321 if( count == 0 or --*count == 0 ){
322 // could have allocated null pointer
323 if( ccgsl_pointer != 0 ) gsl_filter_median_free( ccgsl_pointer );
324 delete count;
325 }
326 }
327#ifdef __GXX_EXPERIMENTAL_CXX0X__
333 count( nullptr ){
334 std::swap( count, v.count );
335 v.ccgsl_pointer = nullptr;
336 }
343 median_workspace( std::move( v ) ).swap( *this );
344 return *this;
345 }
346#endif
347 // Refines equality comparable
348 // == operator
355 bool operator==( median_workspace const& v ) const {
356 return ccgsl_pointer == v.ccgsl_pointer; }
357 // != operator
364 bool operator!=( median_workspace const& v ) const { return not operator==( v ); }
365 // Refines forward container
366 // Refines less than comparable
367 // operator<
376 bool operator<( median_workspace const& v ) const {
377 return ccgsl_pointer < v.ccgsl_pointer; }
378 // operator>
387 bool operator>( median_workspace const& v ) const {
388 return ccgsl_pointer > v.ccgsl_pointer; }
389 // operator<=
398 bool operator<=( median_workspace const& v ) const {
399 return ccgsl_pointer <= v.ccgsl_pointer; }
400 // operator>=
409 bool operator>=( median_workspace const& v ) const {
410 return ccgsl_pointer >= v.ccgsl_pointer; }
415 bool empty() const { return ccgsl_pointer == 0; }
416 // swap() --- should work even if sizes don't match
423 std::swap( ccgsl_pointer, v.ccgsl_pointer );
424 std::swap( count, v.count );
425 }
426 private:
430 gsl_filter_median_workspace* ccgsl_pointer;
434 size_t* count;
435 public:
436 // shared reference functions
441 gsl_filter_median_workspace* get() const { return ccgsl_pointer; }
447 bool unique() const { return count != 0 and *count == 1; }
452 size_t use_count() const { return count == 0 ? 0 : *count; }
458#ifdef __GXX_EXPERIMENTAL_CXX0X__
459 explicit
460#endif
461 operator bool() const { return ccgsl_pointer != 0; }
462 };
471 inline int median( gsl_filter_end_t const endtype, vector const& x, vector& y,
472 median_workspace& w ){
473 return gsl_filter_median( endtype, x.get(), y.get(), w.get() ); }
478 public:
483 ccgsl_pointer = 0;
484 count = 0; // initially nullptr will do
485 }
486 // Refines random access container
487 // Refines assignable
491 explicit rmedian_workspace( size_t const K ){
492 ccgsl_pointer = gsl_filter_rmedian_alloc( K );
493 // just plausibly we could allocate filter_gaussian_workspace but not count
494 try { count = new size_t; } catch( std::bad_alloc& e ){
495 // try to tidy up before rethrowing
496 gsl_filter_rmedian_free( ccgsl_pointer );
497 throw e;
498 }
499 *count = 1; // initially there is just one reference to ccgsl_pointer
500 }
507 explicit rmedian_workspace( gsl_filter_rmedian_workspace* v ){
508 ccgsl_pointer = v;
509 // just plausibly we could fail to allocate count: no further action needed.
510 count = new size_t;
511 *count = 1; // initially there is just one reference to ccgsl_pointer
512 }
513 // copy constructor
519 count = v.count; if( count != 0 ) ++*count; }
520 // assignment operator
526 // first, possibly delete anything pointed to by this
527 if( count == 0 or --*count == 0 ){
528 if( ccgsl_pointer != 0 ) gsl_filter_rmedian_free( ccgsl_pointer );
529 delete count;
530 } // Then copy
531 ccgsl_pointer = v.ccgsl_pointer; count = v.count; if( count != 0 ) ++*count;
532 return *this;
533 }
534 // destructor
539 if( count == 0 or --*count == 0 ){
540 // could have allocated null pointer
541 if( ccgsl_pointer != 0 ) gsl_filter_rmedian_free( ccgsl_pointer );
542 delete count;
543 }
544 }
545#ifdef __GXX_EXPERIMENTAL_CXX0X__
551 count( nullptr ){
552 std::swap( count, v.count );
553 v.ccgsl_pointer = nullptr;
554 }
561 rmedian_workspace( std::move( v ) ).swap( *this );
562 return *this;
563 }
564#endif
565 // Refines equality comparable
566 // == operator
573 bool operator==( rmedian_workspace const& v ) const {
574 return ccgsl_pointer == v.ccgsl_pointer; }
575 // != operator
582 bool operator!=( rmedian_workspace const& v ) const { return not operator==( v ); }
583 // Refines forward container
584 // Refines less than comparable
585 // operator<
594 bool operator<( rmedian_workspace const& v ) const {
595 return ccgsl_pointer < v.ccgsl_pointer; }
596 // operator>
605 bool operator>( rmedian_workspace const& v ) const {
606 return ccgsl_pointer > v.ccgsl_pointer; }
607 // operator<=
616 bool operator<=( rmedian_workspace const& v ) const {
617 return ccgsl_pointer <= v.ccgsl_pointer; }
618 // operator>=
627 bool operator>=( rmedian_workspace const& v ) const {
628 return ccgsl_pointer >= v.ccgsl_pointer; }
633 bool empty() const { return ccgsl_pointer == 0; }
634 // swap() --- should work even if sizes don't match
641 std::swap( ccgsl_pointer, v.ccgsl_pointer );
642 std::swap( count, v.count );
643 }
644 private:
648 gsl_filter_rmedian_workspace* ccgsl_pointer;
652 size_t* count;
653 public:
654 // shared reference functions
659 gsl_filter_rmedian_workspace* get() const { return ccgsl_pointer; }
665 bool unique() const { return count != 0 and *count == 1; }
670 size_t use_count() const { return count == 0 ? 0 : *count; }
676#ifdef __GXX_EXPERIMENTAL_CXX0X__
677 explicit
678#endif
679 operator bool() const { return ccgsl_pointer != 0; }
680 };
689 inline int rmedian( gsl_filter_end_t const endtype, vector const& x, vector& y,
691 return gsl_filter_rmedian( endtype, x.get(), y.get(), w.get() ); }
696 public:
701 ccgsl_pointer = 0;
702 count = 0; // initially nullptr will do
703 }
704 // Refines random access container
705 // Refines assignable
709 explicit impulse_workspace( size_t const K ){
710 ccgsl_pointer = gsl_filter_impulse_alloc( K );
711 // just plausibly we could allocate filter_impulse_workspace but not count
712 try { count = new size_t; } catch( std::bad_alloc& e ){
713 // try to tidy up before rethrowing
714 gsl_filter_impulse_free( ccgsl_pointer );
715 throw e;
716 }
717 *count = 1; // initially there is just one reference to ccgsl_pointer
718 }
725 explicit impulse_workspace( gsl_filter_impulse_workspace* v ){
726 ccgsl_pointer = v;
727 // just plausibly we could fail to allocate count: no further action needed.
728 count = new size_t;
729 *count = 1; // initially there is just one reference to ccgsl_pointer
730 }
731 // copy constructor
737 count = v.count; if( count != 0 ) ++*count; }
738 // assignment operator
744 // first, possibly delete anything pointed to by this
745 if( count == 0 or --*count == 0 ){
746 if( ccgsl_pointer != 0 ) gsl_filter_impulse_free( ccgsl_pointer );
747 delete count;
748 } // Then copy
749 ccgsl_pointer = v.ccgsl_pointer; count = v.count; if( count != 0 ) ++*count;
750 return *this;
751 }
752 // destructor
757 if( count == 0 or --*count == 0 ){
758 // could have allocated null pointer
759 if( ccgsl_pointer != 0 ) gsl_filter_impulse_free( ccgsl_pointer );
760 delete count;
761 }
762 }
763#ifdef __GXX_EXPERIMENTAL_CXX0X__
769 count( nullptr ){
770 std::swap( count, v.count );
771 v.ccgsl_pointer = nullptr;
772 }
779 impulse_workspace( std::move( v ) ).swap( *this );
780 return *this;
781 }
782#endif
783 // Refines equality comparable
784 // == operator
791 bool operator==( impulse_workspace const& v ) const {
792 return ccgsl_pointer == v.ccgsl_pointer; }
793 // != operator
800 bool operator!=( impulse_workspace const& v ) const { return not operator==( v ); }
801 // Refines forward container
802 // Refines less than comparable
803 // operator<
812 bool operator<( impulse_workspace const& v ) const {
813 return ccgsl_pointer < v.ccgsl_pointer; }
814 // operator>
823 bool operator>( impulse_workspace const& v ) const {
824 return ccgsl_pointer > v.ccgsl_pointer; }
825 // operator<=
834 bool operator<=( impulse_workspace const& v ) const {
835 return ccgsl_pointer <= v.ccgsl_pointer; }
836 // operator>=
845 bool operator>=( impulse_workspace const& v ) const {
846 return ccgsl_pointer >= v.ccgsl_pointer; }
851 bool empty() const { return ccgsl_pointer == 0; }
852 // swap() --- should work even if sizes don't match
859 std::swap( ccgsl_pointer, v.ccgsl_pointer );
860 std::swap( count, v.count );
861 }
862 private:
866 gsl_filter_impulse_workspace* ccgsl_pointer;
870 size_t* count;
871 public:
872 // shared reference functions
877 gsl_filter_impulse_workspace* get() const { return ccgsl_pointer; }
883 bool unique() const { return count != 0 and *count == 1; }
888 size_t use_count() const { return count == 0 ? 0 : *count; }
894#ifdef __GXX_EXPERIMENTAL_CXX0X__
895 explicit
896#endif
897 operator bool() const { return ccgsl_pointer != 0; }
898 };
913 inline int impulse( gsl_filter_end_t const endtype, gsl_filter_scale_t const scale_type,
914 double const t, vector const& x, vector& y, vector& xmedian,
915 vector& xsigma, size_t& noutlier, vector_int& ioutlier,
917 return gsl_filter_impulse( endtype, scale_type, t, x.get(), y.get(), xmedian.get(),
918 xsigma.get(), &noutlier, ioutlier.get(), w.get() ); }
919 }
920}
921#endif
Gaussian workspace.
Definition: filter.hpp:35
bool unique() const
Find if this is the only object sharing the gsl_filter_gaussian_workspace.
Definition: filter.hpp:216
gaussian_workspace & operator=(gaussian_workspace const &v)
The assignment operator.
Definition: filter.hpp:83
gsl_filter_gaussian_workspace * get() const
Get the gsl_filter_gaussian_workspace.
Definition: filter.hpp:210
bool operator==(gaussian_workspace const &v) const
Two workspace are identically equal if their elements are identical.
Definition: filter.hpp:129
gsl_filter_gaussian_workspace * ccgsl_pointer
The shared pointer.
Definition: filter.hpp:199
bool operator>(gaussian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:159
bool operator>=(gaussian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:179
gaussian_workspace(gaussian_workspace &&v)
Move constructor.
Definition: filter.hpp:107
gaussian_workspace(size_t const K)
Definition: filter.hpp:49
bool operator<=(gaussian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:169
~gaussian_workspace()
The destructor only deletes the pointers if count reaches zero.
Definition: filter.hpp:95
gaussian_workspace(gaussian_workspace const &v)
The copy constructor.
Definition: filter.hpp:76
gaussian_workspace & operator=(gaussian_workspace &&v)
Move operator.
Definition: filter.hpp:116
bool operator<(gaussian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:149
bool operator!=(gaussian_workspace const &v) const
Two workspace are different if their elements are not identical.
Definition: filter.hpp:137
void swap(gaussian_workspace &v)
Swap two workspace objects.
Definition: filter.hpp:191
gaussian_workspace(gsl_filter_gaussian_workspace *v)
Could construct from a gsl_filter_gaussian_workspace.
Definition: filter.hpp:65
bool empty() const
Find if the workspace is empty.
Definition: filter.hpp:184
size_t * count
The shared reference count.
Definition: filter.hpp:203
size_t use_count() const
Find how many workspace objects share this pointer.
Definition: filter.hpp:221
gaussian_workspace()
The default constructor is only really useful for assigning to.
Definition: filter.hpp:40
Impulse workspace.
Definition: filter.hpp:695
bool operator>(impulse_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:823
bool operator<(impulse_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:812
impulse_workspace()
The default constructor is only really useful for assigning to.
Definition: filter.hpp:700
bool operator>=(impulse_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:845
gsl_filter_impulse_workspace * ccgsl_pointer
The shared pointer.
Definition: filter.hpp:866
bool unique() const
Find if this is the only object sharing the gsl_filter_impulse_workspace.
Definition: filter.hpp:883
impulse_workspace(gsl_filter_impulse_workspace *v)
Could construct from a gsl_filter_impulse_workspace.
Definition: filter.hpp:725
impulse_workspace & operator=(impulse_workspace &&v)
Move operator.
Definition: filter.hpp:778
impulse_workspace & operator=(impulse_workspace const &v)
The assignment operator.
Definition: filter.hpp:743
void swap(impulse_workspace &v)
Swap two workspace objects.
Definition: filter.hpp:858
bool operator==(impulse_workspace const &v) const
Two workspace are identically equal if their elements are identical.
Definition: filter.hpp:791
gsl_filter_impulse_workspace * get() const
Get the gsl_filter_impulse_workspace.
Definition: filter.hpp:877
size_t use_count() const
Find how many workspace objects share this pointer.
Definition: filter.hpp:888
~impulse_workspace()
The destructor only deletes the pointers if count reaches zero.
Definition: filter.hpp:756
bool operator<=(impulse_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:834
bool empty() const
Find if the workspace is empty.
Definition: filter.hpp:851
impulse_workspace(size_t const K)
Definition: filter.hpp:709
impulse_workspace(impulse_workspace &&v)
Move constructor.
Definition: filter.hpp:768
bool operator!=(impulse_workspace const &v) const
Two workspace are different if their elements are not identical.
Definition: filter.hpp:800
impulse_workspace(impulse_workspace const &v)
The copy constructor.
Definition: filter.hpp:736
size_t * count
The shared reference count.
Definition: filter.hpp:870
Median workspace.
Definition: filter.hpp:259
median_workspace(size_t const K)
Definition: filter.hpp:273
median_workspace(median_workspace const &v)
The copy constructor.
Definition: filter.hpp:300
~median_workspace()
The destructor only deletes the pointers if count reaches zero.
Definition: filter.hpp:320
median_workspace & operator=(median_workspace &&v)
Move operator.
Definition: filter.hpp:342
size_t use_count() const
Find how many workspace objects share this pointer.
Definition: filter.hpp:452
bool operator!=(median_workspace const &v) const
Two workspace are different if their elements are not identical.
Definition: filter.hpp:364
median_workspace()
The default constructor is only really useful for assigning to.
Definition: filter.hpp:264
median_workspace & operator=(median_workspace const &v)
The assignment operator.
Definition: filter.hpp:307
bool operator==(median_workspace const &v) const
Two workspace are identically equal if their elements are identical.
Definition: filter.hpp:355
bool unique() const
Find if this is the only object sharing the gsl_filter_median_workspace.
Definition: filter.hpp:447
median_workspace(median_workspace &&v)
Move constructor.
Definition: filter.hpp:332
bool operator<(median_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:376
gsl_filter_median_workspace * get() const
Get the gsl_filter_median_workspace.
Definition: filter.hpp:441
bool empty() const
Find if the workspace is empty.
Definition: filter.hpp:415
void swap(median_workspace &v)
Swap two workspace objects.
Definition: filter.hpp:422
size_t * count
The shared reference count.
Definition: filter.hpp:434
bool operator>(median_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:387
median_workspace(gsl_filter_median_workspace *v)
Could construct from a gsl_filter_median_workspace.
Definition: filter.hpp:289
bool operator<=(median_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:398
gsl_filter_median_workspace * ccgsl_pointer
The shared pointer.
Definition: filter.hpp:430
bool operator>=(median_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:409
Rmedian workspace.
Definition: filter.hpp:477
bool operator>=(rmedian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:627
rmedian_workspace(rmedian_workspace const &v)
The copy constructor.
Definition: filter.hpp:518
bool operator<(rmedian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:594
void swap(rmedian_workspace &v)
Swap two workspace objects.
Definition: filter.hpp:640
bool operator<=(rmedian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:616
size_t * count
The shared reference count.
Definition: filter.hpp:652
rmedian_workspace(gsl_filter_rmedian_workspace *v)
Could construct from a gsl_filter_rmedian_workspace.
Definition: filter.hpp:507
~rmedian_workspace()
The destructor only deletes the pointers if count reaches zero.
Definition: filter.hpp:538
rmedian_workspace(size_t const K)
Definition: filter.hpp:491
bool operator==(rmedian_workspace const &v) const
Two workspace are identically equal if their elements are identical.
Definition: filter.hpp:573
size_t use_count() const
Find how many workspace objects share this pointer.
Definition: filter.hpp:670
bool operator>(rmedian_workspace const &v) const
A container needs to define an ordering for sorting.
Definition: filter.hpp:605
gsl_filter_rmedian_workspace * ccgsl_pointer
The shared pointer.
Definition: filter.hpp:648
rmedian_workspace & operator=(rmedian_workspace const &v)
The assignment operator.
Definition: filter.hpp:525
gsl_filter_rmedian_workspace * get() const
Get the gsl_filter_rmedian_workspace.
Definition: filter.hpp:659
bool empty() const
Find if the workspace is empty.
Definition: filter.hpp:633
rmedian_workspace()
The default constructor is only really useful for assigning to.
Definition: filter.hpp:482
bool unique() const
Find if this is the only object sharing the gsl_filter_median_workspace.
Definition: filter.hpp:665
rmedian_workspace & operator=(rmedian_workspace &&v)
Move operator.
Definition: filter.hpp:560
bool operator!=(rmedian_workspace const &v) const
Two workspace are different if their elements are not identical.
Definition: filter.hpp:582
rmedian_workspace(rmedian_workspace &&v)
Move constructor.
Definition: filter.hpp:550
This class handles vector_int objects as shared handles.
Definition: vector_int.hpp:45
gsl_vector_int * get()
Get the gsl_vector_int.
This class handles vector objects as shared handles.
Definition: vector.hpp:74
gsl_vector * get()
Get the gsl_vector.
Definition: vector.hpp:1320
size_t order(workspace &w)
C++ version of gsl_bspline_order().
Definition: bspline.hpp:255
int impulse(gsl_filter_end_t const endtype, gsl_filter_scale_t const scale_type, double const t, vector const &x, vector &y, vector &xmedian, vector &xsigma, size_t &noutlier, vector_int &ioutlier, impulse_workspace &w)
C++ version of gsl_filter_impulse().
Definition: filter.hpp:913
int gaussian(gsl_filter_end_t const endtype, double const alpha, size_t const order, vector const &x, vector &y, gaussian_workspace &w)
C++ version of gsl_filter_gaussian().
Definition: filter.hpp:242
int gaussian_kernel(double const alpha, size_t const order, int const normalize, vector &kernel)
C++ version of gsl_filter_gaussian_kernel().
Definition: filter.hpp:253
int median(gsl_filter_end_t const endtype, vector const &x, vector &y, median_workspace &w)
C++ version of gsl_filter_median().
Definition: filter.hpp:471
int rmedian(gsl_filter_end_t const endtype, vector const &x, vector &y, rmedian_workspace &w)
C++ version of gsl_filter_rmedian().
Definition: filter.hpp:689
The gsl package creates an interface to the GNU Scientific Library for C++.
Definition: blas.hpp:34