Debian Codegraph @

lib/grn_rset.h

raw symbols SCIP
1 /*
2 Copyright (C) 2009-2016 Brazil
3 Copyright (C) 2020-2022 Sutou Kouhei <[email protected]>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #pragma once
21
22 #include "grn.h"cxx . . $ `<file>/lib/grn.h`/
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* rset is result set */
29
30 typedef structcxx . . $ $anonymous_type_cc21d51c44e8310a_0# {
31 double scorecxx . . $ $anonymous_type_cc21d51c44e8310a_0#score.;
32 uint32_tcxx . . $ uint32_t# n_subrecscxx . . $ $anonymous_type_cc21d51c44e8310a_0#n_subrecs.;
33 int subrecscxx . . $ $anonymous_type_cc21d51c44e8310a_0#subrecs.[1];
34 } grn_rset_recinfocxx . . $ grn_rset_recinfo#;
35
36 typedef structcxx . . $ $anonymous_type_cc21d51c44e8310a_1# {
37 grn_idcxx . . $ grn_id# ridcxx . . $ $anonymous_type_cc21d51c44e8310a_1#rid.;
38 uint32_tcxx . . $ uint32_t# sidcxx . . $ $anonymous_type_cc21d51c44e8310a_1#sid.;
39 uint32_tcxx . . $ uint32_t# poscxx . . $ $anonymous_type_cc21d51c44e8310a_1#pos.;
40 } grn_rset_posinfocxx . . $ grn_rset_posinfo#;
41
42 #define GRN_RSET_UTIL_BITcxx . . $ `lib/grn_rset.h:42:9`! (0x80000000)
43
44 typedef unioncxx . . $ $anonymous_type_cc21d51c44e8310a_2# {
45 int64_tcxx . . $ int64_t# value_int64cxx . . $ $anonymous_type_cc21d51c44e8310a_2#value_int64.;
46 double value_doublecxx . . $ $anonymous_type_cc21d51c44e8310a_2#value_double.;
47 } grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value#;
48
49 #define GRN_RSET_N_SUBRECS_SIZEcxx . . $ `lib/grn_rset.h:49:9`! (sizeof(int))
50 #define GRN_RSET_MAX_SIZEcxx . . $ `lib/grn_rset.h:50:9`! (sizeof(grn_rset_aggregated_value))
51 #define GRN_RSET_MIN_SIZEcxx . . $ `lib/grn_rset.h:51:9`! (sizeof(grn_rset_aggregated_value))
52 #define GRN_RSET_SUM_SIZEcxx . . $ `lib/grn_rset.h:52:9`! (sizeof(grn_rset_aggregated_value))
53 #define GRN_RSET_MEAN_SIZEcxx . . $ `lib/grn_rset.h:53:9`! (sizeof(double) + sizeof(uint64_t))
54
55 #define GRN_RSET_SCORE_SIZEcxx . . $ `lib/grn_rset.h:55:9`! (sizeof(double))
56
57 #define GRN_RSET_N_SUBRECScxx . . $ `lib/grn_rset.h:57:9`!(ri) ((ri)->n_subrecs & ~GRN_RSET_UTIL_BIT)
58
59 #define GRN_RSET_SUBREC_SIZEcxx . . $ `lib/grn_rset.h:59:9`!(subrec_size) \
60 (GRN_RSET_SCORE_SIZE + (subrec_size))
61 #define GRN_RSET_SUBRECS_CMPcxx . . $ `lib/grn_rset.h:61:9`!(a,b,dir) (((a) - (b))*(dir))
62 #define GRN_RSET_SUBRECS_NTHcxx . . $ `lib/grn_rset.h:62:9`!(subrecs,size,n) \
63 ((double *)((byte *)subrecs + n * GRN_RSET_SUBREC_SIZE(size)))
64 #define GRN_RSET_SUBRECS_COPYcxx . . $ `lib/grn_rset.h:64:9`!(subrecs,size,n,src) \
65 (grn_memcpy(GRN_RSET_SUBRECS_NTH(subrecs, size, n), src, GRN_RSET_SUBREC_SIZE(size)))
66 #define GRN_RSET_SUBRECS_SIZEcxx . . $ `lib/grn_rset.h:66:9`!(subrec_size,n) \
67 (GRN_RSET_SUBREC_SIZE(subrec_size) * n)
68
69 void grn_rset_add_subreccxx . . $ grn_rset_add_subrec(90901368b7cc1474).(grn_ctxcxx . . $ grn_ctx# *ctx,
70 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
71 grn_objcxx . . $ grn_obj# *table,
72 double score,
73 grn_rset_posinfocxx . . $ grn_rset_posinfo# *pi,
74 int dir);
75
76 uint32_tcxx . . $ uint32_t# grn_rset_recinfo_calc_values_sizecxx . . $ grn_rset_recinfo_calc_values_size(30f4e46071c8b3c9).(grn_ctxcxx . . $ grn_ctx# *ctx,
77 grn_table_group_flagscxx . . $ grn_table_group_flags# flags);
78
79 void grn_rset_recinfo_update_calc_valuescxx . . $ grn_rset_recinfo_update_calc_values(d160979e3161d1e5).(grn_ctxcxx . . $ grn_ctx# *ctx,
80 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
81 grn_objcxx . . $ grn_obj# *table,
82 grn_objcxx . . $ grn_obj# *value);
83
84 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value# *
85 grn_rset_recinfo_get_max_cxx . . $ grn_rset_recinfo_get_max_(29d30f31e781d407).(grn_ctxcxx . . $ grn_ctx# *ctx,
86 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
87 grn_objcxx . . $ grn_obj# *table);
88 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value#
89 grn_rset_recinfo_get_maxcxx . . $ grn_rset_recinfo_get_max(4d5d00189b196bd0).(grn_ctxcxx . . $ grn_ctx# *ctx,
90 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
91 grn_objcxx . . $ grn_obj# *table);
92 void
93 grn_rset_recinfo_set_maxcxx . . $ grn_rset_recinfo_set_max(8ce3fda028077970).(grn_ctxcxx . . $ grn_ctx# *ctx,
94 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
95 grn_objcxx . . $ grn_obj# *table,
96 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value# max);
97
98 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value# *
99 grn_rset_recinfo_get_min_cxx . . $ grn_rset_recinfo_get_min_(29d30f31e781d407).(grn_ctxcxx . . $ grn_ctx# *ctx,
100 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
101 grn_objcxx . . $ grn_obj# *table);
102 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value#
103 grn_rset_recinfo_get_mincxx . . $ grn_rset_recinfo_get_min(4d5d00189b196bd0).(grn_ctxcxx . . $ grn_ctx# *ctx,
104 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
105 grn_objcxx . . $ grn_obj# *table);
106 void
107 grn_rset_recinfo_set_mincxx . . $ grn_rset_recinfo_set_min(8ce3fda028077970).(grn_ctxcxx . . $ grn_ctx# *ctx,
108 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
109 grn_objcxx . . $ grn_obj# *table,
110 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value# min);
111
112 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value# *
113 grn_rset_recinfo_get_sum_cxx . . $ grn_rset_recinfo_get_sum_(29d30f31e781d407).(grn_ctxcxx . . $ grn_ctx# *ctx,
114 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
115 grn_objcxx . . $ grn_obj# *table);
116 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value#
117 grn_rset_recinfo_get_sumcxx . . $ grn_rset_recinfo_get_sum(4d5d00189b196bd0).(grn_ctxcxx . . $ grn_ctx# *ctx,
118 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
119 grn_objcxx . . $ grn_obj# *table);
120 void
121 grn_rset_recinfo_set_sumcxx . . $ grn_rset_recinfo_set_sum(8ce3fda028077970).(grn_ctxcxx . . $ grn_ctx# *ctx,
122 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
123 grn_objcxx . . $ grn_obj# *table,
124 grn_rset_aggregated_valuecxx . . $ grn_rset_aggregated_value# sum);
125
126 double *grn_rset_recinfo_get_mean_cxx . . $ grn_rset_recinfo_get_mean_(91a0039b47361b06).(grn_ctxcxx . . $ grn_ctx# *ctx,
127 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
128 grn_objcxx . . $ grn_obj# *table);
129 double grn_rset_recinfo_get_meancxx . . $ grn_rset_recinfo_get_mean(6fa2d70f23f65159).(grn_ctxcxx . . $ grn_ctx# *ctx,
130 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
131 grn_objcxx . . $ grn_obj# *table);
132 void grn_rset_recinfo_set_meancxx . . $ grn_rset_recinfo_set_mean(5607c5dbd568d2ff).(grn_ctxcxx . . $ grn_ctx# *ctx,
133 grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri,
134 grn_objcxx . . $ grn_obj# *table,
135 double avg);
136
137 #ifdef __cplusplus
138 }
139 #endif