ssdiff: move comparison engine into its own file.
[gnumeric.git] / src / collect.h
blob17f68d2dd9e109eeaa46f719577098a2bcd27aa4
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_COLLECT_H_
3 # define _GNM_COLLECT_H_
5 #include "numbers.h"
6 #include "gnumeric.h"
8 G_BEGIN_DECLS
10 typedef enum {
11 COLLECT_IGNORE_STRINGS = 0x01,
12 COLLECT_ZERO_STRINGS = 0x02,
13 COLLECT_COERCE_STRINGS = 0x04,
15 COLLECT_IGNORE_BOOLS = 0x10,
16 COLLECT_ZEROONE_BOOLS = 0x20,
18 COLLECT_IGNORE_ERRORS = 0x100,
19 COLLECT_ZERO_ERRORS = 0x200,
21 COLLECT_IGNORE_BLANKS = 0x1000,
22 COLLECT_ZERO_BLANKS = 0x2000,
24 COLLECT_IGNORE_SUBTOTAL = 0x4000,
26 COLLECT_SORT = 0x10000,
27 COLLECT_ORDER_IRRELEVANT = 0x20000,
29 /* Not for general usage. */
30 COLLECT_INFO = 0x1000000
31 } CollectFlags;
33 typedef int (*float_range_function_t) (gnm_float const *xs, int n, gnm_float *res);
34 typedef int (*float_range_function2_t) (gnm_float const *xs, gnm_float const *ys, int n, gnm_float *res);
35 typedef int (*float_range_function2d_t) (gnm_float const *xs, gnm_float const *ys, int n, gnm_float *res, gpointer data);
36 typedef int (*string_range_function_t) (GPtrArray *xs, char**res, gpointer user);
38 gnm_float *collect_floats_value (GnmValue const *val,
39 GnmEvalPos const *ep,
40 CollectFlags flags,
41 int *n, GnmValue **error);
42 gnm_float *collect_floats (int argc, GnmExprConstPtr const *argv,
43 GnmEvalPos const *ep, CollectFlags flags,
44 int *n, GnmValue **error, GSList **info,
45 gboolean *constp);
47 gnm_float *collect_floats_value_with_info (GnmValue const *val, GnmEvalPos const *ep,
48 CollectFlags flags, int *n, GSList **info,
49 GnmValue **error);
51 GnmValue *collect_float_pairs (GnmValue const *v0, GnmValue const *v1,
52 GnmEvalPos const *ep, CollectFlags flags,
53 gnm_float **xs0, gnm_float **xs1, int *n,
54 gboolean *constp);
56 GnmValue *float_range_function (int argc, GnmExprConstPtr const *argv,
57 GnmFuncEvalInfo *ei,
58 float_range_function_t func,
59 CollectFlags flags,
60 GnmStdError func_error);
62 GnmValue *float_range_function2 (GnmValue const *val0, GnmValue const *val1,
63 GnmFuncEvalInfo *ei,
64 float_range_function2_t func,
65 CollectFlags flags,
66 GnmStdError func_error);
68 GnmValue *float_range_function2d (GnmValue const *val0, GnmValue const *val1,
69 GnmFuncEvalInfo *ei,
70 float_range_function2d_t func,
71 CollectFlags flags,
72 GnmStdError func_error,
73 gpointer data);
75 GnmValue *string_range_function (int argc, GnmExprConstPtr const *argv,
76 GnmFuncEvalInfo *ei,
77 string_range_function_t func,
78 gpointer user,
79 CollectFlags flags,
80 GnmStdError func_error);
82 GSList *gnm_slist_sort_merge (GSList * list_1, GSList * list_2);
84 void gnm_strip_missing (gnm_float* data, int *p, GSList *missing);
87 G_END_DECLS
89 #endif /* _GNM_COLLECT_H_ */