Browse files

Removed gsl

  • Loading branch information...
1 parent f5040a6 commit 1aa5f92829ba22218a92894cdbf2d90226ad56e7 @laurentbartholdi committed Oct 17, 2012
Showing with 28 additions and 458 deletions.
  1. +1 −4 cnf/Makefile.in
  2. +4 −12 gap/triangulations.g
  3. +0 −331 src/findrat.c
  4. +23 −111 src/fr_dll.c
View
5 cnf/Makefile.in
@@ -63,10 +63,7 @@ $(LOCALBIN)/p1.o: src/p1.c src/cpoly.C src/fr_dll.h
$(LOCALBIN)/fr_dll.o: src/fr_dll.c src/cpoly.C src/fr_dll.h
$(CC) -c $< -o $@ -DCONFIG_H
-$(LOCALBIN)/findrat.o: src/findrat.c src/fr_dll.h
- $(CC) -c $< -o $@ -DCONFIG_H
-
-$(LOCALBIN)/fr_dll.so: $(LOCALBIN)/fr_dll.o $(LOCALBIN)/findrat.o $(LOCALBIN)/rpoly.o $(LOCALBIN)/p1.o
+$(LOCALBIN)/fr_dll.so: $(LOCALBIN)/fr_dll.o $(LOCALBIN)/rpoly.o $(LOCALBIN)/p1.o
$(GAC) -d -o $@ $+ @GACFLAGS@
java/javaplot.class: src/javaplot.java
View
16 gap/triangulations.g
@@ -1704,20 +1704,12 @@ BindGlobal("NORMALIZINGMAP@", function(points,oldpoints)
fi;
fi;
- prec := 1.e-10_l; # no sense in seeking more precision; maybe less?
+ prec := 1.e-10_l; # field is currently ignored
start := [0._l,0._l,0._l];
rpoints := List(points,p->List(SphereP1(p),x->NewFloat(IsIEEE754FloatRep,x)));
- while true do
- barycenter := FIND_BARYCENTER(rpoints,start,100,prec);
- if IsString(barycenter) then
- prec := 2._l*prec;
- while prec>0.001_l do # this is hopeless. we got stuck.
- Error("FIND_BARYCENTER returned '",barycenter,"'. Repent.");
- od;
- else
- break;
- fi;
- od;
+ barycenter := FIND_BARYCENTER(rpoints,start,100,prec);
+ Info(InfoFR,3,"Barycenter returned ",barycenter[2]," in ",barycenter[3]," iterations");
+
barycenter := List(barycenter[1],x->NewFloat(@.isr,x));
dilate := Sqrt(barycenter^2);
View
331 src/findrat.c
@@ -1,331 +0,0 @@
-/****************************************************************************
- *
- * findrat.c Laurent Bartholdi
- *
- * @(#)$Id$
- *
- * Copyright (C) 2010, Laurent Bartholdi
- *
- ****************************************************************************
- *
- * find a rational function, and its critical points, that map to given
- * critical values with given degrees
- *
- ****************************************************************************/
-
-#undef DEBUG_FINDRAT
-
-#ifdef DEBUG_FINDRAT
-#include <stdlib.h>
-#include <stdio.h>
-#endif
-#include "fr_dll.h"
-
-/****************************************************************
- * complex polynomials
- ****************************************************************/
-gsl_complex poly_eval (polynomial *p, gsl_complex z)
-{
- gsl_complex u = p->data[p->degree];
- int i;
-
- for (i = p->degree-1; i >= 0; i--)
- u = gsl_complex_add (gsl_complex_mul(u, z), p->data[i]);
- return u;
-}
-
-void poly_mul_lin (polynomial *p, gsl_complex c) /* multiply by (z-c) */
-{
- size_t i = p->degree++;
-
- p->data[i+1] = p->data[i];
- for (; i > 0; i--)
- p->data[i] = gsl_complex_sub (p->data[i-1], gsl_complex_mul (p->data[i], c));
- p->data[0] = gsl_complex_negative(gsl_complex_mul (p->data[0], c));
-}
-
-#ifdef DEBUG_FINDRAT
-void poly_print (FILE *f, polynomial *p)
-{
- int i;
- for (i = 0; i <= p->degree; i++)
- fprintf(f, "%s(%g+I*(%g))*z^%d", i ? "+" : "", GSL_REAL(p->data[i]), GSL_IMAG(p->data[i]), i);
-}
-#endif
-
-/****************************************************************
- * we look for critical points, and a rational map num/den of
- * given degree;
- * it has s critical points, with critical values v[0]...v[s-1].
- * it is normalized 0->0, 1->1, 8->8.
- * by convention, v[s-3]=1, v[s-2]=0, v[s-1]=8.
- ****************************************************************/
-typedef struct {
- size_t degree, s;
- size_t *d;
- gsl_complex *v;
- polynomial *num, *den;
- size_t max_iter;
- double eps1, eps2;
-} hurwitz_param;
-#define hparam_degree (((hurwitz_param *) param)->degree)
-#define hparam_s (((hurwitz_param *) param)->s)
-#define hparam_v (((hurwitz_param *) param)->v)
-#define hparam_d (((hurwitz_param *) param)->d)
-#define hparam_num (((hurwitz_param *) param)->num)
-#define hparam_den (((hurwitz_param *) param)->den)
-#define hparam_max_iter (((hurwitz_param *) param)->max_iter)
-#define hparam_eps1 (((hurwitz_param *) param)->eps1)
-#define hparam_eps2 (((hurwitz_param *) param)->eps2)
-
-/****************************************************************
- * we look for a normalized rational map num/den of degree degree;
- * the degrees at 0,8 are respectively d0, d8.
- * furthermore num'*den - num*den' = diff*z^(d0-1).
- ****************************************************************/
-typedef struct {
- size_t degree, d0, d8;
- polynomial diff;
-} rat_param;
-#define rparam_degree (((rat_param *) param)->degree)
-#define rparam_d0 (((rat_param *) param)->d0)
-#define rparam_d8 (((rat_param *) param)->d8)
-#define rparam_diff (((rat_param *) param)->diff)
-
-/****************************************************************
- * debug
- ****************************************************************/
-#ifdef DEBUG_FINDRAT
-void print_state (size_t iter, gsl_multiroot_fsolver *solver)
-{
- size_t i;
-
- printf("iter = %u\tx =", (unsigned) iter);
- for (i = 0; i < solver->function->n; i += 2)
- printf(" %f+I*%f", gsl_vector_get(solver->x, i), gsl_vector_get (solver->x, i+1));
- printf("\tf =");
- for (i = 0; i < solver->function->n; i += 2)
- printf(" %.2e+I*%.2e", gsl_vector_get(solver->f, i), gsl_vector_get(solver->f, i+1));
- printf("\n");
-}
-#endif
-
-/****************************************************************
- * find normalized rational function with given critical values
- ****************************************************************/
-int rat_iter (const gsl_vector *coeff_real, void *param, gsl_vector *delta_real)
-{
- size_t degree = rparam_degree, d0 = rparam_d0, d8 = rparam_d8;
- gsl_vector_complex *coeff = (gsl_vector_complex *) coeff_real,
- *delta = (gsl_vector_complex *) delta_real;
- int i, j, k;
-
- /* compute leading coefficient of denominator */
- gsl_complex lden = {{0.0, 0.0}};
- for (i = 0; i <= degree-d0; i++)
- lden = gsl_complex_add (lden, gsl_vector_complex_get (coeff, i));
- for (i = degree-d0+1; i < 2*degree-d0-d8+1; i++)
- lden = gsl_complex_sub (lden, gsl_vector_complex_get (coeff, i));
-
- /* compute num'*den - den'*num */
- for (k = d0; k <= 2*degree-d8; k++) {
- gsl_complex c = {{0.0, 0.0}};
- for (j = 0; j <= k; j++) {
- i = k-j;
- if (i < d0 || i > degree || j > degree-d8)
- continue;
- c = gsl_complex_add (c, gsl_complex_mul_real (gsl_complex_mul (gsl_vector_complex_get (coeff, i-d0), j == degree-d8 ? lden : gsl_vector_complex_get (coeff, degree+1-d0+j)), i-j));
- }
- gsl_vector_complex_set (delta, k-d0, gsl_complex_sub (c, rparam_diff.data[k-d0]));
- }
- return GSL_SUCCESS;
-}
-
-int solve_rat (const size_t degree, const size_t s, const size_t d[], const gsl_vector_complex *c,
- polynomial *num, polynomial *den, size_t max_iter, double eps1, double eps2)
-{
- const gsl_complex complex_one = {{1.0, 0.0}};
- gsl_complex diffdata[degree];
- rat_param param = { degree, d[s-2], d[s-1], { 0, diffdata } };
- int i, j, iter = 0, status, dim = 2*degree - d[s-2] - d[s-1] + 1;
-
- /* compute param.diff = prod((z-c[i])^(d[i]-1)) */
- param.diff.data[0] = complex_one;
- for (i = 0; i < s-3; i++)
- for (j = 1; j < d[i]; j++)
- poly_mul_lin (&param.diff, gsl_vector_complex_get (c, i));
- for (j = 1; j < d[s-3]; j++)
- poly_mul_lin (&param.diff, complex_one);
-
- /* initial vector */
- gsl_vector *rat_real = gsl_vector_alloc (2*dim);
- for (i = param.d0; i <= degree; i++)
- gsl_vector_complex_set ((gsl_vector_complex *) rat_real, i-param.d0, num->data[i]);
- for (i = 0; i < degree-param.d8; i++)
- gsl_vector_complex_set ((gsl_vector_complex *) rat_real, i+degree+1-param.d0, den->data[i]);
-
- /* solver */
- const gsl_multiroot_fsolver_type *T = gsl_multiroot_fsolver_hybrids;
- gsl_multiroot_function f = { &rat_iter, 2*dim, &param };
- gsl_multiroot_fsolver *solver = gsl_multiroot_fsolver_alloc (T, f.n);
- gsl_multiroot_fsolver_set (solver, &f, rat_real);
-
- do {
-#ifdef DEBUG_FINDRAT
- print_state (iter, solver);
-#endif
- iter++;
- status = gsl_multiroot_fsolver_iterate (solver);
-
- if (status) /* check if solver is stuck */
- break;
-
- status = gsl_multiroot_test_delta (solver->dx, solver->x, eps1, eps2);
- } while (status == GSL_CONTINUE && iter < max_iter);
-
-#ifdef DEBUG_FINDRAT
- if (status != GSL_SUCCESS)
- printf("solve_rat status = %s\n", gsl_strerror(status));
-#endif
-
- gsl_complex sum = {{0.0, 0.0}};
- num->degree = degree;
- for (i = 0; i < param.d0; i++)
- GSL_SET_COMPLEX (&num->data[i], 0.0, 0.0);
- for (i = param.d0; i <= degree; i++) {
- num->data[i] = gsl_vector_complex_get ((gsl_vector_complex *) solver->x, i-param.d0);
- sum = gsl_complex_add (sum, num->data[i]);
- }
- den->degree = degree - param.d8;
- for (i = 0; i < degree-param.d8; i++) {
- den->data[i] = gsl_vector_complex_get ((gsl_vector_complex *) solver->x, i+degree+1-param.d0);
- sum = gsl_complex_sub (sum, den->data[i]);
- }
- den->data[degree-param.d8] = sum;
- gsl_multiroot_fsolver_free (solver);
- gsl_vector_free (rat_real);
-
- return status;
-}
-
-/****************************************************************
- * find rational function, and critical points, given hurwitz data
- ****************************************************************/
-int hurwitz_iter (const gsl_vector *c_real, void *param, gsl_vector *v_real)
-{
- size_t s = hparam_s;
- gsl_vector_complex *c = (gsl_vector_complex *) c_real,
- *v = (gsl_vector_complex *) v_real;
- int i;
-
- /* get rational function f with critical points c of multiplicities d */
- i = solve_rat (hparam_degree, hparam_s, hparam_d, c, hparam_num, hparam_den, hparam_max_iter, hparam_eps1, hparam_eps2);
-
- if (i != GSL_SUCCESS)
- return i;
-
- for (i = 0; i < s-3; i++) {
- /* compute (f(c_i) - paramv_i)) / (1+|paramv_i|^2) */
- gsl_complex n = poly_eval (hparam_num, gsl_vector_complex_get(c,i)),
- d = poly_eval (hparam_den, gsl_vector_complex_get(c,i));
- n = gsl_complex_sub(gsl_complex_div (n, d), hparam_v[i]);
- gsl_vector_complex_set (v, i, gsl_complex_div_real (n, gsl_complex_abs2 (hparam_v[i])+1.0));
- }
- return GSL_SUCCESS;
-}
-
-int solve_hurwitz (const size_t degree, const size_t s, const size_t d[], const gsl_complex v[],
- gsl_complex c[], polynomial *num, polynomial *den, size_t max_iter, double eps1, double eps2)
-{
- hurwitz_param param = { degree, s, (size_t *) d, (gsl_complex *) v,
- num, den, max_iter, eps1, eps2 };
- int i, iter = 0, status, dim = s-3;
- for (i = 0; i < s; i++)
- iter += d[i]-1;
-
- if (iter != 2*degree-2)
- return -1;
-
- /* initial vector */
- gsl_vector *c_real = gsl_vector_alloc (2*dim);
- for (i = 0; i < dim; i++)
- gsl_vector_complex_set ((gsl_vector_complex *) c_real, i, c[i]);
-
- /* solver */
- const gsl_multiroot_fsolver_type *T = gsl_multiroot_fsolver_hybrids;
- gsl_multiroot_function f = { &hurwitz_iter, 2*dim, &param };
- gsl_multiroot_fsolver *solver = gsl_multiroot_fsolver_alloc (T, f.n);
- gsl_multiroot_fsolver_set (solver, &f, c_real);
-
- do {
-#ifdef DEBUG_FINDRAT
- print_state (iter, solver);
-#endif
- iter++;
- status = gsl_multiroot_fsolver_iterate (solver);
-
- if (status) /* check if solver is stuck */
- break;
-
- status = gsl_multiroot_test_delta (solver->dx, solver->x, eps1, eps2);
- } while (status == GSL_CONTINUE && iter < max_iter);
-
-#ifdef DEBUG_FINDRAT
- if (status != GSL_SUCCESS)
- printf("solve_hurwitz status = %s\n", gsl_strerror(status));
-#endif
-
- for (i = 0; i < dim; i++)
- c[i] = gsl_vector_complex_get ((gsl_vector_complex *) solver->x, i);
-
- gsl_multiroot_fsolver_free (solver);
- gsl_vector_free (c_real);
-
- return status;
-}
-
-#ifdef MAIN_FINDRAT
-/****************************************************************
- * tester
- ****************************************************************/
-int main (int argc, char *argv[])
-{
- const size_t degree = 4, s = 4;
- const size_t d[] = { 2, 3, 3, 2 };
- const gsl_complex v[] = { {{0.0,1.0}}, {{1.0,0.0}}, {{0.0,0.0}}, {{HUGE_VAL,HUGE_VAL}} };
- gsl_complex c[s-3];
- GSL_SET_COMPLEX (&c[0], -0.302, 0.405);
- polynomial num, den;
- int i;
-
- num.degree = den.degree = degree;
- for (i = 0; i <= degree; i++) {
- GSL_SET_COMPLEX(&num.data[i], i+0.5, 1.0);
- GSL_SET_COMPLEX(&den.data[i], i+0.5, 2.0);
- }
- GSL_SET_COMPLEX(&num.data[0], 0.0,0.0);
- GSL_SET_COMPLEX(&num.data[1], 0.0,0.0);
- GSL_SET_COMPLEX(&num.data[2], 0.0,0.0);
- GSL_SET_COMPLEX(&num.data[3], 0.06, 1.2);
- GSL_SET_COMPLEX(&num.data[4],-0.05,-0.4);
- den.degree = 2;
- GSL_SET_COMPLEX(&den.data[0],-0.1,-0.08);
- GSL_SET_COMPLEX(&den.data[1], 0.2,-0.2);
- GSL_SET_COMPLEX(&den.data[2],-0.1, 1.0);
-
- solve_hurwitz (degree, s, d, v, c, &num, &den);
-
- printf("p := [x$i=1..%d,1,0,infinity]:", s-3);
- for (i = 0; i < s-3; i++)
- printf(" p[%d] := %g+I*(%g);", i+1, GSL_REAL(c[i]), GSL_IMAG(c[i]));
- printf("\n");
- printf("f := ("); poly_print (stdout, &num); printf(") / ("); poly_print (stdout, &den); printf(");\n");
-
- printf("fsolve(numer(diff(f,z)));\n");
- printf("seq(limit(f,z=p[i]),i=1..nops(p));\n");
-
- return 0;
-}
-#endif
-
-/* findrat.c . . . . . . . . . . . . . . . . . . . . . . . . . . .ends here */
View
134 src/fr_dll.c
@@ -275,9 +275,7 @@ my_free_hook (void *ptr, const void *caller)
}
#endif
-#define bpoints (((bparams *) param)->points)
-
-static int barycenter (const gsl_vector *x, void *param, gsl_vector *f)
+static void barycenter (const double x[], double y[], int m, int n, const bparams *param)
{
/* x is a "shifting" parameter; it is a vector in R^3, and
describes the M\"obius transformation with north-south dynamics.
@@ -288,29 +286,26 @@ static int barycenter (const gsl_vector *x, void *param, gsl_vector *f)
The M\"obius transformation is
*/
int i, j;
- const int n = ((bparams *) param)->n;
- long double v[3];
+ long double v[3]; /* a little extra precision */
- for (i = 0; i < 3; i++) v[i] = gsl_vector_get (x, i);
+ for (i = 0; i < 3; i++) v[i] = x[i];
long double t = sqrtl(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
long double sum[3] = { 0.0, 0.0, 0.0 };
- for (j = 0; j < n; j++) {
+ for (j = 0; j < param->n; j++) {
long double x[3], z = 0.0;
for (i = 0; i < 3; i++) /* z = v*P */
- z += bpoints[j][i] * v[i];
+ z += param->points[j][i] * v[i];
long double d = 1.0 + (1.0-t)*(1.0-t) + (2.0 - t)*z;
for (i = 0; i < 3; i++)
- x[i] = (2.0*(1.0-t)*bpoints[j][i] + (2.0-t+z)*v[i]) / d;
+ x[i] = (2.0*(1.0-t)*param->points[j][i] + (2.0-t+z)*v[i]) / d;
for (i = 0; i < 3; i++) sum[i] += x[i];
}
- for (i = 0; i < 3; i++) gsl_vector_set (f, i, sum[i] / n);
-
- return GSL_SUCCESS;
+ for (i = 0; i < 3; i++) y[i] = sum[i] / param->n;
}
/* given a set of points on S^2 \subset R^3, there is, up to rotations
@@ -352,6 +347,8 @@ static int barycenter (const gsl_vector *x, void *param, gsl_vector *f)
This is also proven in <Cite Ref="MR2121737">.
*/
+#include <levmar.h>
+
static Obj FIND_BARYCENTER (Obj self, Obj gap_points, Obj gap_init, Obj gap_iter, Obj gap_tol)
{
#ifdef MALLOC_HACK
@@ -364,54 +361,31 @@ static Obj FIND_BARYCENTER (Obj self, Obj gap_points, Obj gap_init, Obj gap_iter
UInt i, j, n = LEN_PLIST(gap_points);
Double __points[n][3];
- bparams bparam = { n, __points };
+ bparams param = { n, __points };
for (i = 0; i < n; i++)
for (j = 0; j < 3; j++)
- bparam.points[i][j] = VAL_FLOAT(ELM_PLIST(ELM_PLIST(gap_points,i+1),j+1));
+ param.points[i][j] = VAL_FLOAT(ELM_PLIST(ELM_PLIST(gap_points,i+1),j+1));
- const gsl_multiroot_fsolver_type *T;
- gsl_multiroot_fsolver *s;
-
- int status;
- size_t iter = 0, max_iter = INT_INTOBJ(gap_iter);
+ int iter, max_iter = INT_INTOBJ(gap_iter);
double precision = VAL_FLOAT(gap_tol);
+ double info[LM_INFO_SZ];
- gsl_multiroot_function f = {&barycenter, 3, &bparam};
- gsl_vector *x = gsl_vector_alloc (3);
-
- for (i = 0; i < 3; i++) gsl_vector_set (x, i, VAL_FLOAT(ELM_PLIST(gap_init,i+1)));
-
- T = gsl_multiroot_fsolver_hybrids;
- s = gsl_multiroot_fsolver_alloc (T, 3);
- gsl_multiroot_fsolver_set (s, &f, x);
+ Double x[3];
- do {
- iter++;
- status = gsl_multiroot_fsolver_iterate (s);
+ for (i = 0; i < 3; i++) x[i] = VAL_FLOAT(ELM_PLIST(gap_init,i+1));
- if (status) /* check if solver is stuck */
- break;
+ iter = dlevmar_dif ((void (*)(double*, double*, int, int, void*)) barycenter,
+ (double*) x, NULL, 3, 3, max_iter, NULL, info, NULL, NULL, (void *) &param);
- status = gsl_multiroot_test_residual (s->f, precision);
- }
- while (status == GSL_CONTINUE && iter < max_iter);
-
- Obj result = ALLOC_PLIST(2);
+ Obj result = ALLOC_PLIST(3);
Obj list = ALLOC_PLIST(3); set_elm_plist(result, 1, list);
for (i = 0; i < 3; i++)
- set_elm_plist(list, i+1, NEW_FLOAT(gsl_vector_get (s->x, i)));
- list = ALLOC_PLIST(3); set_elm_plist(result, 2, list);
- for (i = 0; i < 3; i++)
- set_elm_plist(list, i+1, NEW_FLOAT(gsl_vector_get (s->f, i)));
-
- gsl_multiroot_fsolver_free (s);
- gsl_vector_free (x);
-
- if (status != 0) {
- const char *s = gsl_strerror (status);
- C_NEW_STRING(result, strlen(s), s);
- }
+ set_elm_plist(list, i+1, NEW_FLOAT(x[i]));
+ list = ALLOC_PLIST(LM_INFO_SZ); set_elm_plist(result, 2, list);
+ for (i = 0; i < LM_INFO_SZ; i++)
+ set_elm_plist(list, i+1, NEW_FLOAT(info[i]));
+ set_elm_plist(result, 3, INTOBJ_INT(iter));
#ifdef MALLOC_HACK
__malloc_hook = old_malloc_hook;
@@ -421,67 +395,6 @@ static Obj FIND_BARYCENTER (Obj self, Obj gap_points, Obj gap_init, Obj gap_iter
}
/****************************************************************************
- * FIND_RATIONALFUNCTION solves the Hurwitz problem
- ****************************************************************************/
-static Obj FIND_RATIONALFUNCTION (Obj self, Obj gap_degrees, Obj gap_values, Obj gap_c, Obj gap_num, Obj gap_den, Obj params)
-{
- size_t degree = 2, s;
-
- s = LEN_PLIST(gap_degrees);
-
- if (s != LEN_PLIST(gap_values)+3 || s != LEN_PLIST(gap_c)+3)
- return Fail;
-
- size_t d[s], i;
- gsl_complex c[s-3], v[s];
-
- for (i = 0; i < s; i++) {
- d[i] = INT_INTOBJ(ELM_PLIST(gap_degrees,i+1));
- degree += d[i]-1;
- if (i < s-3) {
- v[i] = VAL_GSL_COMPLEX(ELM_PLIST(gap_values,i+1));
- c[i] = VAL_GSL_COMPLEX(ELM_PLIST(gap_c,i+1));
- } else if (i == s-3)
- GSL_SET_COMPLEX(v+i, 1.0, 0.0);
- else if (i == s-2)
- GSL_SET_COMPLEX(v+i, 0.0, 0.0);
- else if (i == s-1)
- GSL_SET_COMPLEX(v+i, HUGE_VAL, HUGE_VAL);
- }
- degree /= 2;
-
- gsl_complex num_data[degree+1], den_data[degree+1];
- polynomial num = { LEN_PLIST(gap_num)-1, num_data },
- den = { LEN_PLIST(gap_den)-1, den_data };
-
- for (i = 0; i <= num.degree; i++)
- num.data[i] = VAL_GSL_COMPLEX(ELM_PLIST(gap_num,i+1));
- for (i = 0; i <= den.degree; i++)
- den.data[i] = VAL_GSL_COMPLEX(ELM_PLIST(gap_den,i+1));
-
- int status = solve_hurwitz (degree, s, d, v, c, &num, &den,
- INT_INTOBJ(ELM_PLIST(params,1)), VAL_FLOAT(ELM_PLIST(params,2)), VAL_FLOAT(ELM_PLIST(params,3)));
-
- if (status != GSL_SUCCESS)
- return INTOBJ_INT(status);
-
- for (i = 0; i < s-3; i++)
- set_elm_plist(gap_c,i+1, NEW_COMPLEX_GSL(c+i));
-
- GROW_PLIST(gap_num, num.degree+1);
- SET_LEN_PLIST(gap_num, num.degree+1);
- for (i = 0; i <= num.degree; i++)
- set_elm_plist(gap_num,i+1, NEW_COMPLEX_GSL(num.data+i));
-
- GROW_PLIST(gap_den, den.degree+1);
- SET_LEN_PLIST(gap_den, den.degree+1);
- for (i = 0; i <= den.degree; i++)
- set_elm_plist(gap_den,i+1, NEW_COMPLEX_GSL(den.data+i));
-
- return INTOBJ_INT(status);
-}
-
-/****************************************************************************
* other
****************************************************************************/
@@ -493,7 +406,6 @@ static StructGVarFunc GVarFuncs [] = {
{ "REAL_ROOTS_FR", 1, "coeffs", REAL_ROOTS, "fr_dll.c:REAL_ROOTS" },
{ "NFFUNCTION_FR", 3, "rel, dir, word", NFFUNCTION, "fr_dll.c:NFFUNCTION" },
{ "FIND_BARYCENTER", 4, "points, init, iter, tol", FIND_BARYCENTER, "fr_dll.c:FIND_BARYCENTER" },
- { "FIND_RATIONALFUNCTION", 6, "degrees, values, points, num, den, params", FIND_RATIONALFUNCTION, "fr_dll.c:FIND_RATIONALFUNCTION" },
{ 0 }
};

0 comments on commit 1aa5f92

Please sign in to comment.