Added MACS source
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / block / gsl_block_float.h
1 /* block/gsl_block_float.h
2  * 
3  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef __GSL_BLOCK_FLOAT_H__
21 #define __GSL_BLOCK_FLOAT_H__
22
23 #include <stdlib.h>
24 #include <gsl/gsl_errno.h>
25
26 #undef __BEGIN_DECLS
27 #undef __END_DECLS
28 #ifdef __cplusplus
29 # define __BEGIN_DECLS extern "C" {
30 # define __END_DECLS }
31 #else
32 # define __BEGIN_DECLS /* empty */
33 # define __END_DECLS /* empty */
34 #endif
35
36 __BEGIN_DECLS
37
38 struct gsl_block_float_struct
39 {
40   size_t size;
41   float *data;
42 };
43
44 typedef struct gsl_block_float_struct gsl_block_float;
45
46 gsl_block_float *gsl_block_float_alloc (const size_t n);
47 gsl_block_float *gsl_block_float_calloc (const size_t n);
48 void gsl_block_float_free (gsl_block_float * b);
49
50 int gsl_block_float_fread (FILE * stream, gsl_block_float * b);
51 int gsl_block_float_fwrite (FILE * stream, const gsl_block_float * b);
52 int gsl_block_float_fscanf (FILE * stream, gsl_block_float * b);
53 int gsl_block_float_fprintf (FILE * stream, const gsl_block_float * b, const char *format);
54
55 int gsl_block_float_raw_fread (FILE * stream, float * b, const size_t n, const size_t stride);
56 int gsl_block_float_raw_fwrite (FILE * stream, const float * b, const size_t n, const size_t stride);
57 int gsl_block_float_raw_fscanf (FILE * stream, float * b, const size_t n, const size_t stride);
58 int gsl_block_float_raw_fprintf (FILE * stream, const float * b, const size_t n, const size_t stride, const char *format);
59
60 size_t gsl_block_float_size (const gsl_block_float * b);
61 float * gsl_block_float_data (const gsl_block_float * b);
62
63 __END_DECLS
64
65 #endif /* __GSL_BLOCK_FLOAT_H__ */