public override bool HasLabel(int label) { //Get labels from store and put in intSet, unfortunately we get longs back long[] longs = NodeLabelsField.get(this, _read); foreach (long labelToken in longs) { if (labelToken == label) { assert(int) labelToken == labelToken : "value too big to be represented as and int"; return(true); } } return(false); }
public override bool Process(NodeRecord node) { long[] labels = NodeLabelsField.get(node, _nodeStore); if (labels.Length > 0) { foreach (long labelId in labels) { _labelCounts[( int )labelId]++; } _cache.put(node.Id, labels); } _labelCounts[_anyLabel]++; _progressReporter.progress(1); // No need to update the store, we're just reading things here return(false); }
public override long[] Labels() { return(NodeLabelsField.get(this, _read)); }