private RecordIterator getTriples(int subj, int pred, int obj, int context, int flags, int flagsMask) throws IOException { TripleIndex index = getBestIndex(subj, pred, obj, context); boolean doRangeSearch = index.getPatternScore(subj, pred, obj, context) > 0; return getTriplesUsingIndex(subj, pred, obj, context, flags, flagsMask, index, doRangeSearch); }
private RecordIterator getTriples(int subj, int pred, int obj, int context, int flags, int flagsMask) throws IOException { TripleIndex index = getBestIndex(subj, pred, obj, context); boolean doRangeSearch = index.getPatternScore(subj, pred, obj, context) > 0; return getTriplesUsingIndex(subj, pred, obj, context, flags, flagsMask, index, doRangeSearch); }
protected double cardinality(int subj, int pred, int obj, int context) throws IOException { TripleIndex index = getBestIndex(subj, pred, obj, context); BTree btree = index.btree; double rangeSize; if (index.getPatternScore(subj, pred, obj, context) == 0) { rangeSize = btree.getValueCountEstimate(); } else { byte[] minValue = getMinValue(subj, pred, obj, context); byte[] maxValue = getMaxValue(subj, pred, obj, context); rangeSize = btree.getValueCountEstimate(minValue, maxValue); } return rangeSize; }
protected double cardinality(int subj, int pred, int obj, int context) throws IOException { TripleIndex index = getBestIndex(subj, pred, obj, context); BTree btree = index.btree; double rangeSize; if (index.getPatternScore(subj, pred, obj, context) == 0) { rangeSize = btree.getValueCountEstimate(); } else { byte[] minValue = getMinValue(subj, pred, obj, context); byte[] maxValue = getMaxValue(subj, pred, obj, context); rangeSize = btree.getValueCountEstimate(minValue, maxValue); } return rangeSize; }