private void MergeCounts(LongArray destination, LongArray part)
        {
            long length = destination.length();

            for (long i = 0; i < length; i++)
            {
                destination.Set(i, destination.Get(i) + part.Get(i));
            }
        }
        public RelationshipCountsProcessor(NodeLabelsCache nodeLabelCache, int highLabelId, int highRelationshipTypeId, Org.Neo4j.Kernel.Impl.Api.CountsAccessor_Updater countsUpdater, NumberArrayFactory cacheFactory)
        {
            this._nodeLabelCache = nodeLabelCache;
            this._client         = nodeLabelCache.NewClient();
            this._countsUpdater  = countsUpdater;

            // Make room for high id + 1 since we need that extra slot for the ANY counts
            this._anyLabel            = highLabelId;
            this._anyRelationshipType = highRelationshipTypeId;
            this._itemsPerType        = _anyLabel + 1;
            this._itemsPerLabel       = _anyRelationshipType + 1;
            this._labelsCounts        = cacheFactory.NewLongArray(SideSize() * SIDES, 0);
            this._wildcardCounts      = cacheFactory.NewLongArray(_anyRelationshipType + 1, 0);
        }
 private void Increment(LongArray counts, long index)
 {
     Counts.set(index, Counts.get(index) + 1);
 }
        private void Increment(LongArray counts, long labelId, long relationshipTypeId, long side)
        {
            long index = ArrayIndex(labelId, relationshipTypeId, side);

            Increment(counts, index);
        }