Debian Codegraph @

external/gsl/gsl_roots__fdfsolver.c

raw symbols SCIP
1 /* roots/fdfsolver.c
2 *
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Reid Priedhorsky, 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 <stdlib.h>
22 #include <string.h>
23 #include "gsl_errno.h"cxx . . $ `<file>/external/gsl/gsl_errno.h`/
24 #include "gsl_roots.h"cxx . . $ `<file>/external/gsl/gsl_roots.h`/
25
26 gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# *
27 gsl_root_fdfsolver_alloccxx . . $ gsl_root_fdfsolver_alloc(3a036ca8b967bea5). (const gsl_root_fdfsolver_typecxx . . $ gsl_root_fdfsolver_type# * T)
28 {
29
30 gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# * s = (gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (sizeof (gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver#));
31
32 if (s == 0)
33 {
34 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for root solver struct",
35 GSL_ENOMEM, 0);
36 };
37
38 s->statecxx . . $ $anonymous_type_e6d985e34a433613_3#state. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64). (T->sizecxx . . $ $anonymous_type_e6d985e34a433613_2#size.);
39
40 if (s->statecxx . . $ $anonymous_type_e6d985e34a433613_3#state. == 0)
41 {
42 freecxx . . $ free(5d22bdacc48458e8). (s); /* exception in constructor, avoid memory leak */
43
44 GSL_ERROR_VALcxx . . $ `external/gsl/gsl_errno.h:112:9`! ("failed to allocate space for root solver state",
45 GSL_ENOMEM, 0);
46 };
47
48 s->typecxx . . $ $anonymous_type_e6d985e34a433613_3#type. = T ;
49 s->fdfcxx . . $ $anonymous_type_e6d985e34a433613_3#fdf. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
50
51 return s;
52 }
53
54 int
55 gsl_root_fdfsolver_setcxx . . $ gsl_root_fdfsolver_set(9e219c66c6445b9a). (gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# * s, gsl_function_fdfcxx . . $ gsl_function_fdf# * f, double root)
56 {
57 s->fdfcxx . . $ $anonymous_type_e6d985e34a433613_3#fdf. = f;
58 s->rootcxx . . $ $anonymous_type_e6d985e34a433613_3#root. = root;
59
60 return (s->typecxx . . $ $anonymous_type_e6d985e34a433613_3#type.->setcxx . . $ $anonymous_type_e6d985e34a433613_2#set.) (s->statecxx . . $ $anonymous_type_e6d985e34a433613_3#state., s->fdfcxx . . $ $anonymous_type_e6d985e34a433613_3#fdf., &(s->rootcxx . . $ $anonymous_type_e6d985e34a433613_3#root.));
61 }
62
63 int
64 gsl_root_fdfsolver_iteratecxx . . $ gsl_root_fdfsolver_iterate(ea9cfa11395260e8). (gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# * s)
65 {
66 return (s->typecxx . . $ $anonymous_type_e6d985e34a433613_3#type.->iteratecxx . . $ $anonymous_type_e6d985e34a433613_2#iterate.) (s->statecxx . . $ $anonymous_type_e6d985e34a433613_3#state., s->fdfcxx . . $ $anonymous_type_e6d985e34a433613_3#fdf., &(s->rootcxx . . $ $anonymous_type_e6d985e34a433613_3#root.));
67 }
68
69 void
70 gsl_root_fdfsolver_freecxx . . $ gsl_root_fdfsolver_free(c3153b95eb084790). (gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# * s)
71 {
72 freecxx . . $ free(5d22bdacc48458e8). (s->statecxx . . $ $anonymous_type_e6d985e34a433613_3#state.);
73 freecxx . . $ free(5d22bdacc48458e8). (s);
74 }
75
76 const char *
77 gsl_root_fdfsolver_namecxx . . $ gsl_root_fdfsolver_name(5365278d9c56f6cd). (const gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# * s)
78 {
79 return s->typecxx . . $ $anonymous_type_e6d985e34a433613_3#type.->namecxx . . $ $anonymous_type_e6d985e34a433613_2#name.;
80 }
81
82 double
83 gsl_root_fdfsolver_rootcxx . . $ gsl_root_fdfsolver_root(f118bdddb609029a). (const gsl_root_fdfsolvercxx . . $ gsl_root_fdfsolver# * s)
84 {
85 return s->rootcxx . . $ $anonymous_type_e6d985e34a433613_3#root.;
86 }
87
88