it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap Java Examples

The following examples show how to use it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RequestScopedMdc.java    From armeria with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the {@link Map} of all request-scoped {@link MDC} properties bound to the specified
 * {@link RequestContext}.
 *
 * @param ctx the {@link RequestContext}
 *
 * @return the {@link Map} that contains all request-scoped {@link MDC} properties.
 *         An empty {@link Map} if there are no request-scoped {@link MDC} properties.
 */
public static Map<String, String> getAll(RequestContext ctx) {
    requireNonNull(ctx, "ctx");

    final Object2ObjectMap<String, String> map = getMap(ctx);
    final RequestContext rootCtx = ctx.root();
    if (rootCtx == null || rootCtx == ctx) {
        return map;
    }

    final Object2ObjectMap<String, String> rootMap = getMap(rootCtx);
    if (rootMap.isEmpty()) {
        return map;
    }

    if (map.isEmpty()) {
        return rootMap;
    }

    final Object2ObjectMap<String, String> merged =
            new Object2ObjectOpenHashMap<>(rootMap.size() + map.size());
    merged.putAll(rootMap);
    merged.putAll(map);
    return merged;
}
 
Example #2
Source File: RequestScopedMdc.java    From armeria with Apache License 2.0 6 votes vote down vote up
/**
 * Binds the specified request-scoped {@link MDC} property to the specified {@link RequestContext}.
 *
 * @param ctx   the {@link RequestContext}
 * @param key   the key of the request-scoped {@link MDC} property
 * @param value the value of the request-scoped {@link MDC} property
 */
public static void put(RequestContext ctx, String key, @Nullable String value) {
    requireNonNull(ctx, "ctx");
    requireNonNull(key, "key");

    synchronized (ctx) {
        final Object2ObjectMap<String, String> oldMap = getMap(ctx);
        final Object2ObjectMap<String, String> newMap;
        if (oldMap.isEmpty()) {
            newMap = Object2ObjectMaps.singleton(key, value);
        } else {
            final Object2ObjectMap<String, String> tmp =
                    new Object2ObjectOpenHashMap<>(oldMap.size() + 1);
            tmp.putAll(oldMap);
            tmp.put(key, value);
            newMap = Object2ObjectMaps.unmodifiable(tmp);
        }
        ctx.setAttr(MAP, newMap);
    }
}
 
Example #3
Source File: RequestScopedMdc.java    From armeria with Apache License 2.0 6 votes vote down vote up
/**
 * Binds the specified request-scoped {@link MDC} properties to the specified {@link RequestContext}.
 *
 * @param ctx the {@link RequestContext}
 * @param map the {@link Map} that contains the request-scoped {@link MDC} properties
 */
public static void putAll(RequestContext ctx, Map<String, String> map) {
    requireNonNull(ctx, "ctx");
    requireNonNull(map, "map");
    if (map.isEmpty()) {
        return;
    }

    synchronized (ctx) {
        final Object2ObjectMap<String, String> oldMap = getMap(ctx);
        final Object2ObjectMap<String, String> newMap;
        if (oldMap.isEmpty()) {
            newMap = new Object2ObjectOpenHashMap<>(map);
        } else {
            newMap = new Object2ObjectOpenHashMap<>(oldMap.size() + map.size());
            newMap.putAll(oldMap);
            newMap.putAll(map);
        }
        ctx.setAttr(MAP, Object2ObjectMaps.unmodifiable(newMap));
    }
}
 
Example #4
Source File: RequestScopedMdc.java    From armeria with Apache License 2.0 6 votes vote down vote up
/**
 * Unbinds the specified request-scoped {@link MDC} property from the specified {@link RequestContext}.
 *
 * @param ctx the {@link RequestContext}
 * @param key the key of the request-scoped {@link MDC} property to unbind
 */
public static void remove(RequestContext ctx, String key) {
    requireNonNull(ctx, "ctx");
    requireNonNull(key, "key");

    synchronized (ctx) {
        final Object2ObjectMap<String, String> oldMap = getMap(ctx);
        if (!oldMap.containsKey(key)) {
            return;
        }

        final Object2ObjectMap<String, String> newMap;
        if (oldMap.size() == 1) {
            newMap = Object2ObjectMaps.emptyMap();
        } else {
            final Object2ObjectOpenHashMap<String, String> tmp = new Object2ObjectOpenHashMap<>(oldMap);
            tmp.remove(key);
            newMap = Object2ObjectMaps.unmodifiable(tmp);
        }
        ctx.setAttr(MAP, newMap);
    }
}
 
Example #5
Source File: Strings.java    From systemsgenetics with GNU General Public License v3.0 5 votes vote down vote up
public synchronized static String cache(String s) {
    if (cache == null) {
        cache = new Object2ObjectOpenHashMap<>(1000000);
    }
    String output = cache.get(s);
    if (output == null) {

        cache.put(s, s);
        return s;

    } else {
        return output;
    }
}
 
Example #6
Source File: AbstractPredictionModel.java    From incubator-hivemall with Apache License 2.0 5 votes vote down vote up
@Override
public void configureMix(@Nonnull ModelUpdateHandler handler, boolean cancelMixRequest) {
    this.handler = handler;
    this.cancelMixRequest = cancelMixRequest;
    if (cancelMixRequest) {
        if (isDenseModel()) {
            this.mixedRequests_i = new Int2ObjectOpenHashMap<MixedWeight>(327680);
        } else {
            this.mixedRequests_o = new Object2ObjectOpenHashMap<Object, MixedWeight>(327680);
        }
    }
}
 
Example #7
Source File: ObjObjMapTest.java    From hashmapTest with The Unlicense 5 votes vote down vote up
@Override
public int test() {
    final Map<Integer, Integer> m_map = new Object2ObjectOpenHashMap<>( m_keys.length, m_fillFactor );
    for ( int i = 0; i < m_keys.length; ++i )
        m_map.put( m_keys[ i ], m_keys[ i ] );
    for ( int i = 0; i < m_keys2.length; ++i )
        m_map.put( m_keys2[ i ], m_keys2[ i ] );
    return m_map.size();
}
 
Example #8
Source File: ObjObjMapTest.java    From hashmapTest with The Unlicense 5 votes vote down vote up
@Override
public int test() {
    final Map<Integer, Integer> m_map = new Object2ObjectOpenHashMap<>( m_keys.length / 2 + 1, m_fillFactor );
    int add = 0, remove = 0;
    while ( add < m_keys.length )
    {
        m_map.put( m_keys[ add ], m_keys[ add ] );
        ++add;
        m_map.put( m_keys[ add ], m_keys[ add ] );
        ++add;
        m_map.remove( m_keys2[ remove++ ] );
    }
    return m_map.size();
}
 
Example #9
Source File: StartupConfiguration.java    From BUbiNG with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
	final Class<?> thisClass = getClass();
	final Map<String,Object> values = new Object2ObjectOpenHashMap<>();
	for (final Field f : thisClass.getDeclaredFields()) {
		if ((f.getModifiers() & Modifier.PUBLIC) == 0 || (f.getModifiers() & Modifier.STATIC) != 0) continue;
		try {
			values.put(f.getName(), f.get(this));
		} catch (final IllegalAccessException e) {
			values.put(f.getName(), "<THIS SHOULD NOT HAPPEN>");
		}
	}
	return values.toString();
}
 
Example #10
Source File: KNearestNeighbor.java    From StreamingRec with Apache License 2.0 5 votes vote down vote up
@Override
protected void trainInternal(List<Item> items, List<ClickData> clicks) {
	//iterate over sessions
	for (ClickData clickData : clicks) {
		//iterate over clicks in session
		for(Transaction click : clickData.session){
			//find possible maps where this session needs to be stored
			Object2ObjectOpenHashMap<Date,List<List<Transaction>>> itemMap = itemToSessionByTimeMap.get(click.item.id);
			if(itemMap == null){
				//if the map does not exist, create it
				itemMap = new Object2ObjectOpenHashMap<>();
				itemToSessionByTimeMap.put(click.item.id, itemMap);
			}
			List<List<Transaction>> possiblePreviousSessions 
				= itemMap.get(clickData.session.get(0).timestamp); 	//check for possible previous session by using 
																	//this session's first item's timestamp as an identifier
			if(possiblePreviousSessions==null){
				//if the list does not exist, create it
				possiblePreviousSessions = new ArrayList<>();
				itemMap.put(clickData.session.get(0).timestamp, possiblePreviousSessions);
			}
			
			for (Iterator<List<Transaction>> iterator = possiblePreviousSessions.iterator(); iterator.hasNext();) {
				List<Transaction> possiblePreviousSession = iterator.next();
				if(possiblePreviousSession.get(0).userId==click.userId){//user and time are the same as a previous session?
					iterator.remove(); //(part of) the session is known -> remove/deduplicate
					//this also keeps the session from being added twice because of duplicate items in one session.
				}
			}
			
			//add the current session to the appropriate item's map
			possiblePreviousSessions.add(clickData.session);
		}
	}
}
 
Example #11
Source File: TaneAlgorithmFilterTreeDirect.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
private void generateNextLevel() {
        // System.out.println("Start generateNextLevel");
        level0 = level1;
        level1 = null;
        System.gc();

        Object2ObjectOpenHashMap<BitSet, CombinationHelper> new_level = new Object2ObjectOpenHashMap<BitSet, CombinationHelper>();

        buildPrefixBlocks();

        for (ObjectArrayList<BitSet> prefix_block_list : prefix_blocks.values()) {

            // continue only, if the prefix_block contains at least 2 elements
            if (prefix_block_list.size() < 2) {
                continue;
            }

            ObjectArrayList<BitSet[]> combinations = getListCombinations(prefix_block_list);
            for (BitSet[] c : combinations) {
                BitSet X = (BitSet) c[0].clone();
                X.or(c[1]);

                if (checkSubsets(X)) {
                    StrippedPartition st = multiply(level0.get(c[0]).getPartition(), level0.get(c[1]).getPartition());
                    BitSet rhsCandidates = new BitSet();
//					 rhsCandidates.set(1, numberAttributes+1);

                    CombinationHelper ch = new CombinationHelper();
                    ch.setPartition(st);
                    ch.setRhsCandidates(rhsCandidates);

                    new_level.put(X, ch);
                }
            }
        }

        level1 = new_level;
//		System.out.println("Finished generateNextLevel");
    }
 
Example #12
Source File: FastUtilObjMapTest.java    From hashmapTest with The Unlicense 5 votes vote down vote up
@Override
public int test() {
    final Map<Integer, Integer> m_map = new Object2ObjectOpenHashMap<>( m_keys.length, m_fillFactor );
    for ( int i = 0; i < m_keys.length; ++i )
        m_map.put( m_keys[ i ], m_keys[ i ] );
    for ( int i = 0; i < m_keys2.length; ++i )
        m_map.put( m_keys2[ i ], m_keys2[ i ] );
    return m_map.size();
}
 
Example #13
Source File: StrippedPartition.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
/**
 * Create a StrippedPartition from a HashMap mapping the values to the tuple ids.
 *
 * @param partition
 */
public StrippedPartition(Object2ObjectOpenHashMap<Object, LongBigArrayBigList> partition) {
    this.strippedPartition = new ObjectBigArrayBigList<LongBigArrayBigList>();
    this.elementCount = 0;

    //create stripped partitions -> only use equivalence classes with size > 1.
    for (LongBigArrayBigList eqClass : partition.values()) {
        if (eqClass.size64() > 1) {
            strippedPartition.add(eqClass);
            elementCount += eqClass.size64();
        }
    }
    this.calculateError();
}
 
Example #14
Source File: StrippedPartition.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
/**
 * Create a StrippedPartition from a HashMap mapping the values to the tuple ids.
 *
 * @param partition
 */
public StrippedPartition(Object2ObjectOpenHashMap<Object, LongBigArrayBigList> partition) {
    this.strippedPartition = new ObjectBigArrayBigList<LongBigArrayBigList>();
    this.elementCount = 0;

    //create stripped partitions -> only use equivalence classes with size > 1.
    for (LongBigArrayBigList eqClass : partition.values()) {
        if (eqClass.size64() > 1) {
            strippedPartition.add(eqClass);
            elementCount += eqClass.size64();
        }
    }
    this.calculateError();
}
 
Example #15
Source File: FastUtilObjMapTest.java    From hashmapTest with The Unlicense 5 votes vote down vote up
@Override
public int test() {
    final Map<Integer, Integer> m_map = new Object2ObjectOpenHashMap<>( m_keys.length / 2 + 1, m_fillFactor );
    int add = 0, remove = 0;
    while ( add < m_keys.length )
    {
        m_map.put( m_keys[ add ], m_keys[ add ] );
        ++add;
        m_map.put( m_keys[ add ], m_keys[ add ] );
        ++add;
        m_map.remove( m_keys2[ remove++ ] );
    }
    return m_map.size();
}
 
Example #16
Source File: Dfa.java    From tcl-regex-java with Apache License 2.0 5 votes vote down vote up
Dfa(Runtime runtime, Cnfa cnfa) {
    this.runtime = runtime;
    this.cm = runtime.g.cm;
    this.cnfa = cnfa;
    /*
     * Note that this isn't a cache;
     * Benson believes that the maximum size here is proportional
     * to the complexity of the machine, not to the input.
     */
    stateSets = new Object2ObjectOpenHashMap<BitSet, StateSet>();
    nstates = cnfa.states.length;
    ncolors = cnfa.ncolors;
}
 
Example #17
Source File: TaneAlgorithmFilterTreeEnd.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
private void generateNextLevel() {
        // System.out.println("Start generateNextLevel");
        level0 = level1;
        level1 = null;
        System.gc();

        Object2ObjectOpenHashMap<BitSet, CombinationHelper> new_level = new Object2ObjectOpenHashMap<BitSet, CombinationHelper>();

        buildPrefixBlocks();

        for (ObjectArrayList<BitSet> prefix_block_list : prefix_blocks.values()) {

            // continue only, if the prefix_block contains at least 2 elements
            if (prefix_block_list.size() < 2) {
                continue;
            }

            ObjectArrayList<BitSet[]> combinations = getListCombinations(prefix_block_list);
            for (BitSet[] c : combinations) {
                BitSet X = (BitSet) c[0].clone();
                X.or(c[1]);

                if (checkSubsets(X)) {
                    StrippedPartition st = multiply(level0.get(c[0]).getPartition(), level0.get(c[1]).getPartition());
                    BitSet rhsCandidates = new BitSet();
//					 rhsCandidates.set(1, numberAttributes+1);

                    CombinationHelper ch = new CombinationHelper();
                    ch.setPartition(st);
                    ch.setRhsCandidates(rhsCandidates);

                    new_level.put(X, ch);
                }
            }
        }

        level1 = new_level;
    }
 
Example #18
Source File: MinHashSearch.java    From MHAP with Apache License 2.0 5 votes vote down vote up
public MinHashSearch(SequenceSketchStreamer data, int numHashes, int numMinMatches, int numThreads, 
		boolean storeResults, int minStoreLength, double maxShift, double acceptScore, boolean doReverseCompliment) throws IOException
{
	super(numThreads, storeResults);

	this.minStoreLength = minStoreLength;
	this.numMinMatches = numMinMatches;
	this.maxShift = maxShift;
	this.acceptScore = acceptScore;
	this.numberSequencesHit = new AtomicLong();
	this.numberSequencesFullyCompared = new AtomicLong();
	this.numberSequencesMinHashed = new AtomicLong();
	this.numberElementsProcessed = new AtomicLong();
	this.minhashSearchTime = new AtomicLong();
	this.sortMergeSearchTime = new AtomicLong();
	
	// enqueue full file, since have to know full size
	data.enqueueFullFile(false, this.numThreads);

	//this.sequenceVectorsHash = new HashMap<>(data.getNumberProcessed());
	this.sequenceVectorsHash = new Object2ObjectOpenHashMap<>(data.getNumberProcessed());

	this.hashes = new ArrayList<>(numHashes);
	for (int iter = 0; iter < numHashes; iter++)
	{
		//Map<Integer,ArrayList<SequenceId>> map = new HashMap<Integer, ArrayList<SequenceId>>(data.getNumberProcessed());			
		Map<Integer,ArrayList<SequenceId>> map = new Int2ObjectOpenHashMap<ArrayList<SequenceId>>(data.getNumberProcessed());
		
		this.hashes.add(map);
	}
	
	//store both forward andd reverse
	addData(data, doReverseCompliment);
	
	System.err.println("Stored "+this.sequenceVectorsHash.size()+" sequences in the index.");
}
 
Example #19
Source File: StrippedPartition.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
/**
 * Create a StrippedPartition from a HashMap mapping the values to the tuple ids.
 *
 * @param partition
 */
public StrippedPartition(Object2ObjectOpenHashMap<Object, LongBigArrayBigList> partition) {
    this.strippedPartition = new ObjectBigArrayBigList<LongBigArrayBigList>();
    this.elementCount = 0;

    //create stripped partitions -> only use equivalence classes with size > 1.
    for (LongBigArrayBigList eqClass : partition.values()) {
        if (eqClass.size64() > 1) {
            strippedPartition.add(eqClass);
            elementCount += eqClass.size64();
        }
    }
    this.calculateError();
}
 
Example #20
Source File: FastUtilObjMapTest.java    From hashmapTest with The Unlicense 4 votes vote down vote up
@Override
public void setup(final int[] keys, final float fillFactor, final int oneFailureOutOf ) {
    super.setup( keys, fillFactor, oneFailureOutOf );
    m_map = new Object2ObjectOpenHashMap<>( m_keys.length, fillFactor );
    for (Integer key : m_keys) m_map.put(new Integer( key % oneFailureOutOf == 0 ? key + 1 : key ), key);
}
 
Example #21
Source File: RequestScopedMdc.java    From armeria with Apache License 2.0 4 votes vote down vote up
private static Map<String, String> maybeCloneThreadLocalMap(Map<String, String> threadLocalMap) {
    // Copy only when we retrieved the thread local map from `getPropertyMap()`.
    return delegateGetPropertyMap != null ? new Object2ObjectOpenHashMap<>(threadLocalMap)
                                          : threadLocalMap;
}
 
Example #22
Source File: RequestScopedMdc.java    From armeria with Apache License 2.0 4 votes vote down vote up
@Override
public Map<String, String> getCopyOfContextMap() {
    final Map<String, String> threadLocalMap = getDelegateContextMap();
    final RequestContext ctx = RequestContext.currentOrNull();
    if (ctx == null) {
        // No context available
        if (threadLocalMap != null) {
            return maybeCloneThreadLocalMap(threadLocalMap);
        } else {
            return Object2ObjectMaps.emptyMap();
        }
    }

    // Retrieve the request-scoped properties.
    // Note that this map is 1) unmodifiable and shared 2) or modifiable yet unshared,
    // which means it's OK to return as it is or mutate it.
    final Map<String, String> requestScopedMap = getAll(ctx);
    if (threadLocalMap == null || threadLocalMap.isEmpty()) {
        // No thread-local map available
        return requestScopedMap;
    }

    // Thread-local map available
    if (requestScopedMap.isEmpty()) {
        // Only thread-local map available
        return maybeCloneThreadLocalMap(threadLocalMap);
    }

    // Both thread-local and request-scoped map available
    final Object2ObjectOpenHashMap<String, String> merged;
    if (requestScopedMap instanceof Object2ObjectOpenHashMap) {
        // Reuse the mutable copy returned by getAll() for less memory footprint.
        merged = (Object2ObjectOpenHashMap<String, String>) requestScopedMap;
        threadLocalMap.forEach(merged::putIfAbsent);
    } else {
        merged = new Object2ObjectOpenHashMap<>(threadLocalMap.size() + requestScopedMap.size());
        merged.putAll(threadLocalMap);
        merged.putAll(requestScopedMap);
    }
    return merged;
}
 
Example #23
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public RMSpropGraves(@Nonnegative int size, @Nonnull Map<String, String> options) {
    super(options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #24
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public AdagradRDA(@Nonnegative int size, @Nonnull Optimizer.AdaGrad optimizerImpl,
        @Nonnull Map<String, String> options) {
    super(optimizerImpl, options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #25
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public AdamHD(@Nonnegative int size, @Nonnull Map<String, String> options) {
    super(options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #26
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public Eve(@Nonnegative int size, @Nonnull Map<String, String> options) {
    super(options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #27
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public Nadam(@Nonnegative int size, @Nonnull Map<String, String> options) {
    super(options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #28
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public Adam(@Nonnegative int size, @Nonnull Map<String, String> options) {
    super(options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #29
Source File: SparseOptimizerFactory.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public AdaDelta(@Nonnegative int size, @Nonnull Map<String, String> options) {
    super(options);
    this.auxWeights = new Object2ObjectOpenHashMap<Object, IWeightValue>(size);
}
 
Example #30
Source File: GlobalVisitStats.java    From fasten with Apache License 2.0 4 votes vote down vote up
public static Result reaches(final KnowledgeBase kb, final long startSig, final int maxRevs, final ProgressLogger pl) {
	final LongOpenHashSet result = new LongOpenHashSet();
	final Object2ObjectOpenHashMap<String, IntOpenHashSet> product2Revs = new Object2ObjectOpenHashMap<>();
	final MutableLong totRevs = new MutableLong();

	// Visit queue
	final LongArrayFIFOQueue queue = new LongArrayFIFOQueue();
	queue.enqueue(startSig);
	result.add(startSig);

	String p = kb.callGraphs.get(index(startSig)).product;
	IntOpenHashSet revs = new IntOpenHashSet();
	revs.add(index(startSig));
	product2Revs.put(p, revs);
	totRevs.increment();


	pl.itemsName = "nodes";
	pl.info = new Object() {
		@Override
		public String toString() {
			return "[nodes: " + result.size() + " products: " + product2Revs.size() + " revisions: " + totRevs.getValue() + "]";
		}
	};

	pl.start("Visiting reachable nodes...");

	while (!queue.isEmpty()) {
		final long node = queue.dequeueLong();

		for (final long s : kb.successors(node)) if (!result.contains(s)) {
			p = kb.callGraphs.get(index(s)).product;
			final long gid = gid(s);
			if (badGIDs.contains(gid)) continue;
			final String targetNameSpace = kb.new Node(gid, index(s)).toFastenURI().getRawNamespace();
			if (targetNameSpace.startsWith("java.") || targetNameSpace.startsWith("javax.") || targetNameSpace.startsWith("jdk.")) {
				badGIDs.add(gid);
				continue;
			}
			revs = product2Revs.get(p);
			if (revs == null) product2Revs.put(p, revs = new IntOpenHashSet());
			if (revs.contains(index(s)) || revs.size() < maxRevs) {
				queue.enqueue(s);
				result.add(s);
				//System.out.println(kb.new Node(gid(node), index(node)).toFastenURI() + " -> " + kb.new Node(gid(s), index(s)).toFastenURI());
				if (revs.add(index(s))) totRevs.increment();
			}
		}
		pl.lightUpdate();
	}

	pl.done();
	return new Result(result, product2Revs.size(), totRevs.getValue().longValue());
}