Java Code Examples for it.unimi.dsi.fastutil.ints.Int2ObjectMap#values()

The following examples show how to use it.unimi.dsi.fastutil.ints.Int2ObjectMap#values() . 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: PositionListIndex.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
public PositionListIndex intersect(PositionListIndex otherPLI) {
	Int2IntOpenHashMap hashedPLI = otherPLI.asHashMap();
	Int2ObjectMap<Int2ObjectMap<IntArrayList>> intersectMap = this.buildIntersectMap(this, hashedPLI);
	
	List<IntArrayList> clusters = new ArrayList<>();
	for (Int2ObjectMap<IntArrayList> cluster1 : intersectMap.values())
		for (IntArrayList cluster2 : cluster1.values())
			if (cluster2.size() > 1)
				clusters.add(cluster2);
	
	return new PositionListIndex(-1, clusters);
}
 
Example 2
Source File: PositionListIndex.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
public PositionListIndex intersect(int[] otherPLI) {
	Int2ObjectMap<Int2ObjectMap<IntArrayList>> intersectMap = this.buildIntersectMap(otherPLI);
	
	List<IntArrayList> clusters = new ArrayList<>();
	for (Int2ObjectMap<IntArrayList> cluster1 : intersectMap.values())
		for (IntArrayList cluster2 : cluster1.values())
			if (cluster2.size() > 1)
				clusters.add(cluster2);
	
	return new PositionListIndex(-1, clusters);
}
 
Example 3
Source File: AgreeSetGenerator.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
private Set<IntList> mergeResult(Int2ObjectMap<Set<IntList>> maxSets) {

        Set<IntList> max = new HashSet<IntList>();
        for (Set<IntList> set : maxSets.values()) {
            max.addAll(set);
        }
        return max;
    }
 
Example 4
Source File: PositionListIndex.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
public PositionListIndex intersect(int[] otherPLI) {
	Int2ObjectMap<Int2ObjectMap<IntArrayList>> intersectMap = this.buildIntersectMap(otherPLI);
	
	List<IntArrayList> clusters = new ArrayList<>();
	for (Int2ObjectMap<IntArrayList> cluster1 : intersectMap.values())
		for (IntArrayList cluster2 : cluster1.values())
			if (cluster2.size() > 1)
				clusters.add(cluster2);
	
	return new PositionListIndex(-1, clusters);
}
 
Example 5
Source File: PositionListIndex.java    From metanome-algorithms with Apache License 2.0 5 votes vote down vote up
public PositionListIndex intersect(int[] otherPLI) {
	Int2ObjectMap<Int2ObjectMap<IntArrayList>> intersectMap = this.buildIntersectMap(otherPLI);
	
	List<IntArrayList> clusters = new ArrayList<>();
	for (Int2ObjectMap<IntArrayList> cluster1 : intersectMap.values())
		for (IntArrayList cluster2 : cluster1.values())
			if (cluster2.size() > 1)
				clusters.add(cluster2);
	
	return new PositionListIndex(-1, clusters);
}
 
Example 6
Source File: PositionListIndex.java    From winter with Apache License 2.0 5 votes vote down vote up
public PositionListIndex intersect(int[] otherPLI) {
	Int2ObjectMap<Int2ObjectMap<IntArrayList>> intersectMap = this.buildIntersectMap(otherPLI);
	
	List<IntArrayList> clusters = new ArrayList<>();
	for (Int2ObjectMap<IntArrayList> cluster1 : intersectMap.values())
		for (IntArrayList cluster2 : cluster1.values())
			if (cluster2.size() > 1)
				clusters.add(cluster2);
	
	return new PositionListIndex(-1, clusters);
}