Commit 04da87b5 authored by Morten Welinder's avatar Morten Welinder

Compilation: don't compile tools separately.

This makes more code available to introspection and allows more parallel
compilation.
parent e3ac43da
......@@ -1191,7 +1191,6 @@ icons/256x256/Makefile
icons/256x256/apps/Makefile
introspection/Makefile
src/Makefile
src/tools/Makefile
doc/Makefile
plugins/Makefile
plugins/fn-christian-date/Makefile
......
......@@ -140,7 +140,7 @@ typedef struct {
gnm_float traffic, circuits;
} gnumeric_offtraf_t;
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_offtraf_f (gnm_float off_traffic, gnm_float *y, void *user_data)
{
gnumeric_offtraf_t *pudata = user_data;
......@@ -157,8 +157,8 @@ gnumeric_offtraf (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
gnm_float traffic = value_get_as_float (argv[0]);
gnm_float circuits = value_get_as_float (argv[1]);
gnm_float traffic0;
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
gnumeric_offtraf_t udata;
if (circuits < 1 || traffic < 0)
......@@ -237,7 +237,7 @@ typedef struct {
gnm_float circuits, des_gos;
} gnumeric_offcap_t;
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_offcap_f (gnm_float traffic, gnm_float *y, void *user_data)
{
gnumeric_offcap_t *pudata = user_data;
......@@ -254,8 +254,8 @@ gnumeric_offcap (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
gnm_float circuits = value_get_as_float (argv[0]);
gnm_float des_gos = value_get_as_float (argv[1]);
gnm_float traffic0;
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
gnumeric_offcap_t udata;
if (des_gos >= 1 || des_gos <= 0)
......
......@@ -1209,7 +1209,7 @@ typedef struct {
gnm_float nper, pv, fv, pmt;
} gnumeric_rate_t;
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_rate_f (gnm_float rate, gnm_float *y, void *user_data)
{
if (rate > -1.0 && rate != 0) {
......@@ -1225,7 +1225,7 @@ gnumeric_rate_f (gnm_float rate, gnm_float *y, void *user_data)
}
/* The derivative of the above function with respect to rate. */
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_rate_df (gnm_float rate, gnm_float *y, void *user_data)
{
if (rate > -1.0 && rate != 0.0) {
......@@ -1243,8 +1243,8 @@ gnumeric_rate_df (gnm_float rate, gnm_float *y, void *user_data)
static GnmValue *
gnumeric_rate (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
gnumeric_rate_t udata;
gnm_float rate0;
......@@ -1353,7 +1353,7 @@ typedef struct {
gnm_float *values;
} gnumeric_irr_t;
static GoalSeekStatus
static GnmGoalSeekStatus
irr_npv (gnm_float rate, gnm_float *y, void *user_data)
{
const gnumeric_irr_t *p = user_data;
......@@ -1373,7 +1373,7 @@ irr_npv (gnm_float rate, gnm_float *y, void *user_data)
return gnm_finite (sum) ? GOAL_SEEK_OK : GOAL_SEEK_ERROR;
}
static GoalSeekStatus
static GnmGoalSeekStatus
irr_npv_df (gnm_float rate, gnm_float *y, void *user_data)
{
const gnumeric_irr_t *p = user_data;
......@@ -1396,8 +1396,8 @@ irr_npv_df (gnm_float rate, gnm_float *y, void *user_data)
static GnmValue *
gnumeric_irr (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
GnmValue *result = NULL;
gnumeric_irr_t p;
gnm_float rate0;
......@@ -1611,7 +1611,7 @@ typedef struct {
const gnm_float *dates;
} gnumeric_xirr_t;
static GoalSeekStatus
static GnmGoalSeekStatus
xirr_npv (gnm_float rate, gnm_float *y, void *user_data)
{
const gnumeric_xirr_t *p = user_data;
......@@ -1636,8 +1636,8 @@ gnm_range_xirr (gnm_float const *xs, const gnm_float *ys,
{
gnumeric_xirr_t p;
gnm_float rate0 = *(gnm_float *)user;
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
p.dates = ys;
p.values = xs;
......@@ -2323,7 +2323,7 @@ typedef struct {
GoCouponConvention conv;
} gnumeric_yield_t;
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_yield_f (gnm_float yield, gnm_float *y, void *user_data)
{
gnumeric_yield_t *data = user_data;
......@@ -2380,8 +2380,8 @@ gnumeric_yield (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
return value_new_float (num / den * coeff);
} else {
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
gnm_float yield0 = 0.1;
goal_seek_initialize (&data);
......@@ -2668,7 +2668,7 @@ struct gnumeric_oddyield_f {
GoCouponConvention conv;
};
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_oddyield_f (gnm_float yield, gnm_float *y, void *user_data)
{
struct gnumeric_oddyield_f *data = user_data;
......@@ -2685,8 +2685,8 @@ static GnmValue *
gnumeric_oddfyield (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
{
struct gnumeric_oddyield_f udata;
GoalSeekData data;
GoalSeekStatus status;
GnmGoalSeekData data;
GnmGoalSeekStatus status;
gnm_float yield0 = 0.1;
udata.rate = value_get_as_float (argv[4]);
......
......@@ -14,8 +14,6 @@ INTROSPECTION_COMPILER_ARGS = \
--includedir=. \
--includedir="${INTROSPECTION_GIRDIR}"
SUBDIRS = tools
EXTRA_DIST =
lib_LTLIBRARIES = libspreadsheet.la
......@@ -259,6 +257,63 @@ widgets_headers = \
widgets/gnumeric-lazy-list.h \
widgets/gnumeric-text-view.h
tools_sources = \
tools/analysis-anova.c \
tools/analysis-auto-expression.c \
tools/analysis-chi-squared.c \
tools/analysis-exp-smoothing.c \
tools/analysis-frequency.c \
tools/analysis-histogram.c \
tools/analysis-kaplan-meier.c \
tools/analysis-normality.c \
tools/analysis-one-mean-test.c \
tools/analysis-principal-components.c \
tools/analysis-sign-test.c \
tools/analysis-signed-rank-test.c \
tools/analysis-tools.c \
tools/analysis-wilcoxon-mann-whitney.c \
tools/auto-correct.c \
tools/dao.c \
tools/data-shuffling.c \
tools/fill-series.c \
tools/filter.c \
tools/gnm-solver.c \
tools/goal-seek.c \
tools/random-generator-cor.c \
tools/random-generator.c \
tools/scenarios.c \
tools/simulation.c \
tools/tabulate.c
tools_headers = \
tools/analysis-anova.h \
tools/analysis-auto-expression.h \
tools/analysis-chi-squared.h \
tools/analysis-exp-smoothing.h \
tools/analysis-frequency.h \
tools/analysis-histogram.h \
tools/analysis-kaplan-meier.h \
tools/analysis-normality.h \
tools/analysis-one-mean-test.h \
tools/analysis-principal-components.h \
tools/analysis-sign-test.h \
tools/analysis-signed-rank-test.h \
tools/analysis-tools.h \
tools/analysis-wilcoxon-mann-whitney.h \
tools/auto-correct.h \
tools/dao.h \
tools/data-shuffling.h \
tools/fill-series.h \
tools/filter.h \
tools/gnm-solver.h \
tools/goal-seek.h \
tools/random-generator-cor.h \
tools/random-generator.h \
tools/scenarios.h \
tools/simulation.h \
tools/tabulate.h \
tools/tools.h
# Another hint, see bugs #172211 and #172212:
non-intermediate: gnm-marshalers.c gnmresources.c
......@@ -279,7 +334,6 @@ CLEANFILES = $(BUILT_SOURCES) \
libspreadsheet_la_CPPFLAGS = $(AM_CPPFLAGS) -DGNUMERIC_INTERNAL
libspreadsheet_la_LDFLAGS = -release $(VERSION)
libspreadsheet_la_LIBADD = \
$(gnumeric_app_libs) \
$(GNUMERIC_LIBS) \
$(INTLLIBS)
......@@ -427,7 +481,8 @@ libspreadsheet_la_SOURCES = \
workbook.c \
xml-sax-read.c \
xml-sax-write.c \
$(dialogs_sources)
$(dialogs_sources) \
$(tools_sources)
if WITH_GTK
libspreadsheet_la_SOURCES += $(widgets_sources)
......@@ -575,6 +630,7 @@ libspreadsheet_include_HEADERS = \
xml-io-version.h \
xml-sax.h \
$(dialogs_headers) \
$(tools_headers) \
$(widgets_headers)
gnumeric_SOURCES = \
......@@ -650,9 +706,6 @@ stamp-local.def: $(libspreadsheet_include_HEADERS) Makefile $(top_srcdir)/tools/
endif
gnumeric_app_libs = \
tools/libtools.la
# Rules for the marshalers code:
GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=gnm_
......@@ -761,14 +814,7 @@ Gnm_@GNUMERIC_API_VER_@_gir_CFLAGS = $(AM_CPPFLAGS)
Gnm_@GNUMERIC_API_VER_@_gir_LIBS = libspreadsheet.la
Gnm_@GNUMERIC_API_VER_@_gir_FILES = \
$(libspreadsheet_la_SOURCES) \
$(libspreadsheet_include_HEADERS) \
tools/dao.c \
tools/dao.h \
tools/scenarios.c \
tools/scenarios.h \
tools/gnm-solver.c \
tools/gnm-solver.h \
tools/tools.h
$(libspreadsheet_include_HEADERS)
girdir = $(GIRDIR)
......
......@@ -95,7 +95,7 @@ typedef struct {
gboolean update_ui;
} GoalEvalData;
static GoalSeekStatus
static GnmGoalSeekStatus
goal_seek_eval (gnm_float x, gnm_float *y, void *vevaldata)
{
GoalEvalData const *evaldata = vevaldata;
......@@ -119,12 +119,12 @@ goal_seek_eval (gnm_float x, gnm_float *y, void *vevaldata)
}
static GoalSeekStatus
static GnmGoalSeekStatus
gnumeric_goal_seek (GoalSeekState *state)
{
GoalSeekData seekdata;
GnmGoalSeekData seekdata;
GoalEvalData evaldata;
GoalSeekStatus status;
GnmGoalSeekStatus status;
gboolean hadold;
gnm_float oldx;
......@@ -312,7 +312,7 @@ cb_dialog_apply_clicked (G_GNUC_UNUSED GtkWidget *button,
GoalSeekState *state)
{
char *status_str;
GoalSeekStatus status;
GnmGoalSeekStatus status;
GnmValue *target;
GnmRangeRef const *r;
GOFormat const *format;
......@@ -604,7 +604,7 @@ dialog_goal_seek_test (Sheet *sheet, const GnmRange *range)
GoalSeekState state;
GnmCell *cell;
int r, c;
GoalSeekStatus status;
GnmGoalSeekStatus status;
g_return_if_fail (range->start.row == range->end.row);
g_return_if_fail (range->start.col + 4 == range->end.col);
......
Makefile
Makefile.in
# Nothing, right now
#
# Gnumeric's Tools Makefile.
# Author: Jukka-Pekka Iivonen (jiivonen@hutcs.cs.hut.fi)
AM_CPPFLAGS = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/tools \
-I$(top_srcdir)/src/dialogs \
-I$(top_builddir)/src \
-DGNUMERIC_INTERNAL \
$(GNUMERIC_CFLAGS)
noinst_LTLIBRARIES = libtools.la
libtools_la_SOURCES = \
analysis-anova.c \
analysis-anova.h \
analysis-auto-expression.c \
analysis-auto-expression.h \
analysis-chi-squared.c \
analysis-chi-squared.h \
analysis-exp-smoothing.c \
analysis-exp-smoothing.h \
analysis-frequency.c \
analysis-frequency.h \
analysis-histogram.c \
analysis-histogram.h \
analysis-kaplan-meier.c \
analysis-kaplan-meier.h \
analysis-normality.c \
analysis-normality.h \
analysis-one-mean-test.c \
analysis-one-mean-test.h \
analysis-principal-components.c \
analysis-principal-components.h \
analysis-sign-test.c \
analysis-sign-test.h \
analysis-signed-rank-test.c \
analysis-signed-rank-test.h \
analysis-tools.c \
analysis-tools.h \
analysis-wilcoxon-mann-whitney.c \
analysis-wilcoxon-mann-whitney.h \
random-generator.c \
random-generator.h \
random-generator-cor.c \
random-generator-cor.h \
dao.c \
data-shuffling.c \
data-shuffling.h \
auto-correct.c \
auto-correct.h \
fill-series.c \
fill-series.h \
filter.h \
filter.c \
gnm-solver.c \
goal-seek.c \
goal-seek.h \
scenarios.c \
scenarios.h \
simulation.c \
simulation.h \
tabulate.c \
tabulate.h
libtools_la_includedir = $(includedir)/libspreadsheet-@GNUMERIC_API_VER@/spreadsheet/tools
libtools_la_include_HEADERS = \
dao.h \
gnm-solver.h \
tools.h
......@@ -356,11 +356,10 @@ cb_cut_into_rows (gpointer data, gpointer user_data)
}
/*
/**
* prepare_input_range:
* @input_range:
* @input_range: (inout) (element-type GnmRange) (transfer full):
* @group_by:
*
*/
void
prepare_input_range (GSList **input_range, group_by_t group_by)
......
......@@ -278,6 +278,9 @@ run_shuffling_tool (data_shuffling_t *st)
}
}
/**
* data_shuffling: (skip)
*/
data_shuffling_t *
data_shuffling (WorkbookControl *wbc,
data_analysis_output_t *dao,
......
......@@ -23,7 +23,7 @@
static gboolean
update_data (gnm_float x, gnm_float y, GoalSeekData *data)
update_data (gnm_float x, gnm_float y, GnmGoalSeekData *data)
{
if (!gnm_finite (y))
return FALSE;
......@@ -89,12 +89,12 @@ update_data (gnm_float x, gnm_float y, GoalSeekData *data)
* Calculate a reasonable approximation to the derivative of a function
* in a single point.
*/
static GoalSeekStatus
fake_df (GoalSeekFunction f, gnm_float x, gnm_float *dfx, gnm_float xstep,
GoalSeekData *data, void *user_data)
static GnmGoalSeekStatus
fake_df (GnmGoalSeekFunction f, gnm_float x, gnm_float *dfx, gnm_float xstep,
GnmGoalSeekData *data, void *user_data)
{
gnm_float xl, xr, yl, yr;
GoalSeekStatus status;
GnmGoalSeekStatus status;
#ifdef DEBUG_GOAL_SEEK
g_print ("fake_df (x=%.20" GNM_FORMAT_g ", xstep=%.20" GNM_FORMAT_g ")\n",
......@@ -148,7 +148,7 @@ fake_df (GoalSeekFunction f, gnm_float x, gnm_float *dfx, gnm_float xstep,
}
void
goal_seek_initialize (GoalSeekData *data)
goal_seek_initialize (GnmGoalSeekData *data)
{
data->havexpos = data->havexneg = data->have_root = FALSE;
data->xpos = data->xneg = data->root = gnm_nan;
......@@ -159,14 +159,22 @@ goal_seek_initialize (GoalSeekData *data)
}
/*
/**
* goal_seek_point:
* @f: (scope call): object function
* @data: #GnmGoalSeekData state
* @user_data: user data for @f
* @x0: root guess
*
* Seek a goal using a single point.
*
* Returns:
*/
GoalSeekStatus
goal_seek_point (GoalSeekFunction f, GoalSeekData *data,
GnmGoalSeekStatus
goal_seek_point (GnmGoalSeekFunction f, GnmGoalSeekData *data,
void *user_data, gnm_float x0)
{
GoalSeekStatus status;
GnmGoalSeekStatus status;
gnm_float y0;
if (data->have_root)
......@@ -190,9 +198,9 @@ goal_seek_point (GoalSeekFunction f, GoalSeekData *data,
}
static GoalSeekStatus
goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
GoalSeekData *data, void *user_data,
static GnmGoalSeekStatus
goal_seek_newton_polish (GnmGoalSeekFunction f, GnmGoalSeekFunction df,
GnmGoalSeekData *data, void *user_data,
gnm_float x0, gnm_float y0)
{
int iterations;
......@@ -208,7 +216,7 @@ goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
if (try_square) {
gnm_float x1 = x0 * gnm_abs (x0);
gnm_float y1, r;
GoalSeekStatus status = f (x1, &y1, user_data);
GnmGoalSeekStatus status = f (x1, &y1, user_data);
if (status != GOAL_SEEK_OK)
goto nomore_square;
......@@ -235,7 +243,7 @@ goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
if (try_newton) {
gnm_float df0, r, x1, y1;
GoalSeekStatus status = df
GnmGoalSeekStatus status = df
? df (x0, &df0, user_data)
: fake_df (f, x0, &df0, gnm_abs (x0) / 1e6, data, user_data);
if (status != GOAL_SEEK_OK || df0 == 0)
......@@ -285,11 +293,18 @@ goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
}
/*
/**
* goal_seek_newton:
* @f: (scope call): object function
* @df: (scope call) (nullable): object function derivative
* @data: #GnmGoalSeekData state
* @user_data: user data for @f and @df
* @x0: root guess
*
* Seek a goal (root) using Newton's iterative method.
*
* The supplied function must (should) be continously differentiable in
* the supplied interval. If NULL is used for `df', this function will
* the supplied interval. If @df is %NULL, this function will
* estimate the derivative.
*
* This method will find a root rapidly provided the initial guess, x0,
......@@ -297,9 +312,9 @@ goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
* (asympotically) goes like i^2 unless the root is a multiple root in
* which case it is only like c*i.)
*/
GoalSeekStatus
goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
GoalSeekData *data, void *user_data, gnm_float x0)
GnmGoalSeekStatus
goal_seek_newton (GnmGoalSeekFunction f, GnmGoalSeekFunction df,
GnmGoalSeekData *data, void *user_data, gnm_float x0)
{
int iterations;
gnm_float precision = data->precision / 2;
......@@ -315,7 +330,7 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
for (iterations = 0; iterations < 100; iterations++) {
gnm_float x1, y0, df0, stepsize;
GoalSeekStatus status;
GnmGoalSeekStatus status;
gboolean flat;
#ifdef DEBUG_GOAL_SEEK
......@@ -416,7 +431,12 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
return GOAL_SEEK_ERROR;
}
/*
/**
* goal_seek_bisection:
* @f: (scope call): object function
* @data: #GnmGoalSeekData state.
* @user_data: user data for @f.
*
* Seek a goal (root) using bisection methods.
*
* The supplied function must (should) be continous over the interval.
......@@ -431,9 +451,9 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
* nowhere), and Ridder's Method (usually fast, harder to fool than
* the secant method).
*/
GoalSeekStatus
goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data)
GnmGoalSeekStatus
goal_seek_bisection (GnmGoalSeekFunction f, GnmGoalSeekData *data,
void *user_data)
{
int iterations;
gnm_float stepsize;
......@@ -455,7 +475,7 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data)
/* log_2 (10) = 3.3219 < 4. */
for (iterations = 0; iterations < 100 + GNM_DIG * 4; iterations++) {
gnm_float xmid, ymid;
GoalSeekStatus status;
GnmGoalSeekStatus status;
enum { M_SECANT, M_RIDDER, M_NEWTON, M_MIDPOINT } method;
method = (iterations % 4 == 0)
......@@ -594,9 +614,18 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data)
#undef SECANT_P
#undef RIDDER_P
GoalSeekStatus
goal_seek_trawl_uniformly (GoalSeekFunction f,
GoalSeekData *data, void *user_data,
/**
* goal_seek_trawl_uniformly:
* @f: (scope call): object function
* @data: #GnmGoalSeekData state
* @user_data: user data for @f
* @xmin: lower search bound
* @xmax: upper search bound
* @points: number of points to try.
*/
GnmGoalSeekStatus
goal_seek_trawl_uniformly (GnmGoalSeekFunction f,
GnmGoalSeekData *data, void *user_data,
gnm_float xmin, gnm_float xmax,
int points)
{
......@@ -614,7 +643,7 @@ goal_seek_trawl_uniformly (GoalSeekFunction f,
for (i = 0; i < points; i++) {
gnm_float x, y;
GoalSeekStatus status;
GnmGoalSeekStatus status;
if (data->havexpos && data->havexneg)
break;
......@@ -639,9 +668,18 @@ goal_seek_trawl_uniformly (GoalSeekFunction f,
return GOAL_SEEK_ERROR;
}
GoalSeekStatus
goal_seek_trawl_normally (GoalSeekFunction f,
GoalSeekData *data, void *user_data,
/**
* goal_seek_trawl_normally:
* @f: (scope call): object function
* @data: #GnmGoalSeekData state
* @user_data: user data for @f
* @mu: search mean
* @sigma: search standard deviation
* @points: number of points to try.
*/
GnmGoalSeekStatus
goal_seek_trawl_normally (GnmGoalSeekFunction f,
GnmGoalSeekData *data, void *user_data,
gnm_float mu, gnm_float sigma,
int points)
{
......@@ -659,7 +697,7 @@ goal_seek_trawl_normally (GoalSeekFunction f,
for (i = 0; i < points; i++) {
gnm_float x, y;
GoalSeekStatus status;
GnmGoalSeekStatus status;
if (data->havexpos && data->havexneg)
break;
......@@ -688,14 +726,14 @@ goal_seek_trawl_normally (GoalSeekFunction f,
}
#ifdef STANDALONE
static GoalSeekStatus
static GnmGoalSeekStatus
f (gnm_float x, gnm_float *y, void *user_data)
{
*y = x * x - 2;
return GOAL_SEEK_OK;
}
static GoalSeekStatus
static GnmGoalSeekStatus
df (gnm_float x, gnm_float *y, void *user_data)
{
*y = 2 * x;
......@@ -706,7 +744,7 @@ df (gnm_float x, gnm_float *y, void *user_data)
int
main ()
{
GoalSeekData data;
GnmGoalSeekData data;
goal_seek_initialize (&data);
data.xmin = -100;
......
......@@ -19,37 +19,37 @@ typedef struct {
gboolean have_root; /* Do we have a valid root? */
gnm_float root; /* Value for which f(root) == 0. */
} GoalSeekData;
} GnmGoalSeekData;
typedef enum { GOAL_SEEK_OK, GOAL_SEEK_ERROR } GoalSeekStatus;
typedef enum { GOAL_SEEK_OK, GOAL_SEEK_ERROR } GnmGoalSeekStatus;
typedef GoalSeekStatus (*GoalSeekFunction) (gnm_float x, gnm_float *y, void *user_data);
typedef GnmGoalSeekStatus (*GnmGoalSeekFunction) (gnm_float x, gnm_float *y, void *user_data);
void goal_seek_initialize (GoalSeekData *data);
void goal_seek_initialize (GnmGoalSeekData *data);
GoalSeekStatus goal_seek_point (GoalSeekFunction f,
GoalSeekData *data,
GnmGoalSeekStatus goal_seek_point (GnmGoalSeekFunction f,
GnmGoalSeekData *data,
void *user_data,
gnm_float x0);
GoalSeekStatus goal_seek_newton (GoalSeekFunction f,
GoalSeekFunction df,
GoalSeekData *data,
GnmGoalSeekStatus goal_seek_newton (GnmGoalSeekFunction f,
GnmGoalSeekFunction df,
GnmGoalSeekData *data,
void *user_data,
gnm_float x0);
GoalSeekStatus goal_seek_bisection (GoalSeekFunction f,
GoalSeekData *data,
GnmGoalSeekStatus goal_seek_bisection (GnmGoalSeekFunction f,
GnmGoalSeekData *data,
void *user_data);
GoalSeekStatus goal_seek_trawl_uniformly (GoalSeekFunction f,
GoalSeekData *data,
GnmGoalSeekStatus goal_seek_trawl_uniformly (GnmGoalSeekFunction f,
GnmGoalSeekData *data,
void *user_data,
gnm_float xmin, gnm_float xmax,
int points);
GoalSeekStatus goal_seek_trawl_normally (GoalSeekFunction f,
GoalSeekData *data,
GnmGoalSeekStatus goal_seek_trawl_normally (GnmGoalSeekFunction f,
GnmGoalSeekData *data,
void *user_data,
gnm_float mu, gnm_float sigma,
int points);
......
......@@ -74,6 +74,13 @@ my_get_format (GnmCell const *cell)
return format;
}
/**
* do_tabulation:
* @wbc: control
* @data:
*
* Returns: (transfer full) (element-type int):
*/
GSList *
do_tabulation (WorkbookControl *wbc,
GnmTabulateInfo *data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment