LAL 7.6.1.1-4859cae
DestroyIIRFilter.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Jolien Creighton, Teviet Creighton
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#include <lal/LALStdlib.h>
21#include <lal/AVFactories.h>
22#include <lal/IIRFilter.h>
23
24
25/**
26 * \addtogroup DestroyIIRFilter_c
27 * \author Creighton, T. D.
28 *
29 * \brief Destroys IIR filter objects.
30 *
31 * ### Description ###
32 *
33 * These functions destroy an object <tt>**input</tt> of type
34 * \c REAL4IIRFilter or \c REAL8IIRFilter, and set
35 * <tt>*input</tt> to \c NULL.
36 *
37 */
38/** @{ */
39
40/** \see See \ref DestroyIIRFilter_c for documentation */
42{
43 if ( filter )
44 {
48 LALFree( filter );
49 }
50 return;
51}
52
53/** \see See \ref DestroyIIRFilter_c for documentation */
55{
56 if ( filter )
57 {
61 LALFree( filter );
62 }
63 return;
64}
65
66/** \see See \ref DestroyIIRFilter_c for documentation */
68{
69 if ( filter )
70 {
74 LALFree( filter );
75 }
76 return;
77}
78
79/**
80 * Deprecated.
81 * \deprecated Use XLALDestroyREAL4IIRFilter() instead
82 */
83void
85 REAL4IIRFilter **input )
86{
87 INITSTATUS(stat);
88
89 /* Make sure handle is non-null, and points to a non-null pointer.
90 (The routine LALSDestroyVector will check that the data fields are
91 non-null.) */
92 ASSERT(input,stat,IIRFILTERH_ENUL,IIRFILTERH_MSGENUL);
93 ASSERT(*input,stat,IIRFILTERH_ENUL,IIRFILTERH_MSGENUL);
94
95 /* Free the filter, then point the handle to NULL. */
97 *input=NULL;
98
99 /* Normal exit */
100 RETURN(stat);
101}
102
103
104/**
105 * Deprecated.
106 * \deprecated Use XLALDestroyREAL8IIRFilter() instead
107 */
108void
110 REAL8IIRFilter **input )
111{
112 INITSTATUS(stat);
113
114 /* Make sure handle is non-null, and points to a non-null pointer.
115 (The routine LALDDestroyVector will check that the data fields are
116 non-null.) */
117 ASSERT(input,stat,IIRFILTERH_ENUL,IIRFILTERH_MSGENUL);
118 ASSERT(*input,stat,IIRFILTERH_ENUL,IIRFILTERH_MSGENUL);
119
120 /* Free the filter, then point the handle to NULL. */
122
123 /* Normal exit */
124 RETURN(stat);
125}
126
127/** @} */
#define LALFree(p)
Definition: LALMalloc.h:96
#define ASSERT(assertion, statusptr, code, mesg)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
void LALDestroyREAL4IIRFilter(LALStatus *stat, REAL4IIRFilter **input)
Deprecated.
void XLALDestroyREAL4IIRFilter(REAL4IIRFilter *filter)
void XLALDestroyCOMPLEX16IIRFilter(COMPLEX16IIRFilter *filter)
void XLALDestroyREAL8IIRFilter(REAL8IIRFilter *filter)
void LALDestroyREAL8IIRFilter(LALStatus *stat, REAL8IIRFilter **input)
Deprecated.
#define IIRFILTERH_ENUL
Unexpected null pointer in arguments.
Definition: IIRFilter.h:131
void XLALDestroyREAL4Vector(REAL4Vector *vector)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
void XLALDestroyCOMPLEX16Vector(COMPLEX16Vector *vector)
This structure stores the direct and recursive REAL8 filter coefficients, as well as the complex-valu...
Definition: IIRFilter.h:184
COMPLEX16Vector * history
The previous values of w.
Definition: IIRFilter.h:189
REAL8Vector * directCoef
The direct filter coefficients.
Definition: IIRFilter.h:187
REAL8Vector * recursCoef
The recursive filter coefficients.
Definition: IIRFilter.h:188
LAL status structure, see The LALStatus structure for more details.
Definition: LALDatatypes.h:947
This structure stores the direct and recursive REAL4 filter coefficients, as well as the history of t...
Definition: IIRFilter.h:152
REAL4Vector * history
The previous values of w.
Definition: IIRFilter.h:157
REAL4Vector * recursCoef
The recursive filter coefficients.
Definition: IIRFilter.h:156
REAL4Vector * directCoef
The direct filter coefficients.
Definition: IIRFilter.h:155
This structure stores the direct and recursive REAL8 filter coefficients, as well as the history of t...
Definition: IIRFilter.h:168
REAL8Vector * history
The previous values of w.
Definition: IIRFilter.h:173
REAL8Vector * recursCoef
The recursive filter coefficients.
Definition: IIRFilter.h:172
REAL8Vector * directCoef
The direct filter coefficients.
Definition: IIRFilter.h:171