File indexing completed on 2025-02-21 10:03:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef __GSL_SPMATRIX_COMPLEX_FLOAT_H__
0021 #define __GSL_SPMATRIX_COMPLEX_FLOAT_H__
0022
0023 #include <stdlib.h>
0024 #include <gsl/gsl_math.h>
0025 #include <gsl/gsl_bst.h>
0026 #include <gsl/gsl_vector_complex_float.h>
0027 #include <gsl/gsl_matrix_complex_float.h>
0028
0029 #undef __BEGIN_DECLS
0030 #undef __END_DECLS
0031 #ifdef __cplusplus
0032 # define __BEGIN_DECLS extern "C" {
0033 # define __END_DECLS }
0034 #else
0035 # define __BEGIN_DECLS
0036 # define __END_DECLS
0037 #endif
0038
0039 __BEGIN_DECLS
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065 typedef struct
0066 {
0067 size_t size1;
0068 size_t size2;
0069
0070
0071
0072
0073
0074
0075 int *i;
0076
0077 float *data;
0078
0079
0080
0081
0082
0083
0084 int *p;
0085
0086 size_t nzmax;
0087 size_t nz;
0088
0089 gsl_bst_workspace *tree;
0090 gsl_spmatrix_pool *pool;
0091 size_t node_size;
0092
0093
0094
0095
0096
0097 union
0098 {
0099 void *work_void;
0100 int *work_int;
0101 float *work_atomic;
0102 } work;
0103
0104 int sptype;
0105 size_t spflags;
0106 } gsl_spmatrix_complex_float;
0107
0108
0109
0110
0111
0112
0113
0114 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_alloc (const size_t n1, const size_t n2);
0115 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_alloc_nzmax (const size_t n1, const size_t n2,
0116 const size_t nzmax, const int sptype);
0117 void gsl_spmatrix_complex_float_free (gsl_spmatrix_complex_float * m);
0118 int gsl_spmatrix_complex_float_realloc (const size_t nzmax, gsl_spmatrix_complex_float * m);
0119 size_t gsl_spmatrix_complex_float_nnz (const gsl_spmatrix_complex_float * m);
0120 const char * gsl_spmatrix_complex_float_type (const gsl_spmatrix_complex_float * m);
0121 int gsl_spmatrix_complex_float_set_zero (gsl_spmatrix_complex_float * m);
0122 int gsl_spmatrix_complex_float_tree_rebuild (gsl_spmatrix_complex_float * m);
0123
0124
0125
0126 int gsl_spmatrix_complex_float_csc (gsl_spmatrix_complex_float * dest, const gsl_spmatrix_complex_float * src);
0127 int gsl_spmatrix_complex_float_csr (gsl_spmatrix_complex_float * dest, const gsl_spmatrix_complex_float * src);
0128 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_compress (const gsl_spmatrix_complex_float * src, const int sptype);
0129 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_compcol (const gsl_spmatrix_complex_float * src);
0130 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_ccs (const gsl_spmatrix_complex_float * src);
0131 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_crs (const gsl_spmatrix_complex_float * src);
0132
0133
0134
0135 int gsl_spmatrix_complex_float_memcpy (gsl_spmatrix_complex_float * dest, const gsl_spmatrix_complex_float * src);
0136
0137
0138
0139 int gsl_spmatrix_complex_float_fprintf (FILE * stream, const gsl_spmatrix_complex_float * m, const char * format);
0140 gsl_spmatrix_complex_float * gsl_spmatrix_complex_float_fscanf (FILE * stream);
0141 int gsl_spmatrix_complex_float_fwrite (FILE * stream, const gsl_spmatrix_complex_float * m);
0142 int gsl_spmatrix_complex_float_fread (FILE * stream, gsl_spmatrix_complex_float * m);
0143
0144
0145
0146 gsl_complex_float gsl_spmatrix_complex_float_get (const gsl_spmatrix_complex_float * m, const size_t i, const size_t j);
0147 int gsl_spmatrix_complex_float_set (gsl_spmatrix_complex_float * m, const size_t i, const size_t j, const gsl_complex_float x);
0148 gsl_complex_float * gsl_spmatrix_complex_float_ptr (const gsl_spmatrix_complex_float * m, const size_t i, const size_t j);
0149
0150
0151
0152 int gsl_spmatrix_complex_float_scale (gsl_spmatrix_complex_float * m, const gsl_complex_float x);
0153 int gsl_spmatrix_complex_float_scale_columns (gsl_spmatrix_complex_float * m, const gsl_vector_complex_float * x);
0154 int gsl_spmatrix_complex_float_scale_rows (gsl_spmatrix_complex_float * m, const gsl_vector_complex_float * x);
0155 int gsl_spmatrix_complex_float_add (gsl_spmatrix_complex_float * c, const gsl_spmatrix_complex_float * a, const gsl_spmatrix_complex_float * b);
0156 int gsl_spmatrix_complex_float_dense_add (gsl_matrix_complex_float * a, const gsl_spmatrix_complex_float * b);
0157 int gsl_spmatrix_complex_float_dense_sub (gsl_matrix_complex_float * a, const gsl_spmatrix_complex_float * b);
0158 int gsl_spmatrix_complex_float_d2sp (gsl_spmatrix_complex_float * T, const gsl_matrix_complex_float * A);
0159 int gsl_spmatrix_complex_float_sp2d (gsl_matrix_complex_float * A, const gsl_spmatrix_complex_float * S);
0160
0161 #ifndef GSL_DISABLE_DEPRECATED
0162
0163 int gsl_spmatrix_complex_float_add_to_dense (gsl_matrix_complex_float * a, const gsl_spmatrix_complex_float * b);
0164
0165 #endif
0166
0167
0168
0169 int gsl_spmatrix_complex_float_equal (const gsl_spmatrix_complex_float * a, const gsl_spmatrix_complex_float * b);
0170
0171
0172
0173 int gsl_spmatrix_complex_float_transpose (gsl_spmatrix_complex_float * m);
0174 int gsl_spmatrix_complex_float_transpose2 (gsl_spmatrix_complex_float * m);
0175 int gsl_spmatrix_complex_float_transpose_memcpy (gsl_spmatrix_complex_float * dest, const gsl_spmatrix_complex_float * src);
0176
0177 __END_DECLS
0178
0179 #endif