File: optimiser.h

package info (click to toggle)
4store 1.1.6+20151109-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 82,388 kB
  • sloc: ansic: 65,689; sh: 2,916; perl: 2,245; makefile: 281; python: 213
file content (26 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef OPTIMISER_H
#define OPTIMISER_H

#include "query-datatypes.h"
#include "query-intl.h"

/* returns the number of values plus 1 for the expression, or INT_MAX if it's
 * unbound */
int fs_opt_num_vals(fs_binding *b, rasqal_literal *l);

/* returns true if the expression can be hashed */
int fs_opt_is_const(fs_binding *b, rasqal_literal *l);

/* sort a vector of triples into a good order to bind them, based on some
 * heuristics */
int fs_optimise_triple_pattern(fs_query_state *qs, fs_query *q, int block, rasqal_triple *patt[], int length, int start);

/* return an estimated number of results from a bind */
int fs_bind_freq(fs_query_state *qs, fs_query *q, int block, rasqal_triple *t);

/* dump the contents of the quad frequency cache to stdout */
void fs_optimiser_freq_print(fs_query_state *qs);

/* vi:set expandtab sts=4 sw=4: */

#endif