Debian Codegraph @

external/gsl/gsl_multifit__work.c

raw symbols SCIP
1 /* multifit/work.c
2 *
3 * Copyright (C) 2000, 2007 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 #include "gsl__config.h"cxx . . $ `<file>/external/gsl/gsl__config.h`/
21 #include "gsl_errno.h"cxx . . $ `<file>/external/gsl/gsl_errno.h`/
22 #include "gsl_multifit.h"cxx . . $ `<file>/external/gsl/gsl_multifit.h`/
23
24 gsl_multifit_linear_workspacecxx . . $ gsl_multifit_linear_workspace# *
25 gsl_multifit_linear_alloccxx . . $ gsl_multifit_linear_alloc(32814f78467e28d). (size_tcxx . . $ size_t# n, size_tcxx . . $ size_t# p)
26 {
27 gsl_multifit_linear_workspacecxx . . $ gsl_multifit_linear_workspace# *w;
28
29 w = (gsl_multifit_linear_workspacecxx . . $ gsl_multifit_linear_workspace# *)
30 malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (sizeof (gsl_multifit_linear_workspacecxx . . $ gsl_multifit_linear_workspace#));
31
32 if (w == 0)
33 {
34 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for multifit_linear struct",
35 GSL_ENOMEM, 0);
36 }
37
38 w->ncxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#n. = n; /* number of observations */
39 w->pcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#p. = p; /* number of parameters */
40
41 w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A. = gsl_matrix_alloccxx . . $ gsl_matrix_alloc(5a4d020b4836594). (n, p);
42
43 if (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A. == 0)
44 {
45 freecxx . . $ free(5d22bdacc48458e8). (w);
46 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for A", GSL_ENOMEM, 0);
47 }
48
49 w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q. = gsl_matrix_alloccxx . . $ gsl_matrix_alloc(5a4d020b4836594). (p, p);
50
51 if (w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q. == 0)
52 {
53 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
54 freecxx . . $ free(5d22bdacc48458e8). (w);
55 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for Q", GSL_ENOMEM, 0);
56 }
57
58 w->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI. = gsl_matrix_alloccxx . . $ gsl_matrix_alloc(5a4d020b4836594). (p, p);
59
60 if (w->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI. == 0)
61 {
62 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q.);
63 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
64 freecxx . . $ free(5d22bdacc48458e8). (w);
65 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for QSI", GSL_ENOMEM, 0);
66 }
67
68 w->Scxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#S. = gsl_vector_alloccxx . . $ gsl_vector_alloc(71d9e095f27e8ea9). (p);
69
70 if (w->Scxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#S. == 0)
71 {
72 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI.);
73 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q.);
74 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
75 freecxx . . $ free(5d22bdacc48458e8). (w);
76 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for S", GSL_ENOMEM, 0);
77 }
78
79 w->tcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#t. = gsl_vector_alloccxx . . $ gsl_vector_alloc(71d9e095f27e8ea9). (n);
80
81 if (w->tcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#t. == 0)
82 {
83 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (w->Scxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#S.);
84 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI.);
85 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q.);
86 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
87 freecxx . . $ free(5d22bdacc48458e8). (w);
88 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for t", GSL_ENOMEM, 0);
89 }
90
91 w->xtcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#xt. = gsl_vector_calloccxx . . $ gsl_vector_calloc(71d9e095f27e8ea9). (p);
92
93 if (w->xtcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#xt. == 0)
94 {
95 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (w->tcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#t.);
96 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (w->Scxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#S.);
97 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI.);
98 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q.);
99 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
100 freecxx . . $ free(5d22bdacc48458e8). (w);
101 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for xt", GSL_ENOMEM, 0);
102 }
103
104 w->Dcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#D. = gsl_vector_calloccxx . . $ gsl_vector_calloc(71d9e095f27e8ea9). (p);
105
106 if (w->Dcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#D. == 0)
107 {
108 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (w->Dcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#D.);
109 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (w->tcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#t.);
110 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (w->Scxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#S.);
111 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI.);
112 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q.);
113 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (w->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
114 freecxx . . $ free(5d22bdacc48458e8). (w);
115 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for xt", GSL_ENOMEM, 0);
116 }
117
118 return w;
119 }
120
121 void
122 gsl_multifit_linear_freecxx . . $ gsl_multifit_linear_free(f4b35c1efe45bf18). (gsl_multifit_linear_workspacecxx . . $ gsl_multifit_linear_workspace# * work)
123 {
124 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (work->Acxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#A.);
125 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (work->Qcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#Q.);
126 gsl_matrix_freecxx . . $ gsl_matrix_free(ab29a617cccd3636). (work->QSIcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#QSI.);
127 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (work->Scxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#S.);
128 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (work->tcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#t.);
129 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (work->xtcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#xt.);
130 gsl_vector_freecxx . . $ gsl_vector_free(5d65852ca0326259). (work->Dcxx . . $ $anonymous_type_d33a18e1d59ca0ff_0#D.);
131 freecxx . . $ free(5d22bdacc48458e8). (work);
132 }
133