public boolean apply(long key) { list.add(get(key)); return true; } }
public boolean apply(int key) { list.add(get(key)); return true; } }
public boolean apply(long key) { list.add(get(key)); return true; } }
public boolean apply(long key) { list.add(get(key)); return true; } });
public boolean apply(int key) { list.add(get(key)); return true; } }
/** * Adds the cycle <TT>c</TT> to the list of all cycles. * This method is used by subclass constructors to fill up the list of cycles. * */ protected void addCycle (AbstractList c) { // Adds the cycle \texttt{c} to the list of all cycles. // Used by subclass constructors to fill up the list of cycles. cycles.add (c); numCycles++; numPoints += c.size(); }
public boolean apply(int key) { list.add(get(key)); return true; } });
public boolean apply(long key, Object value) { if (condition.apply(key,value)) { keyList.add(key); valueList.add(value); } return true; } }
public boolean apply(int key, Object value) { if (condition.apply(key, value)) { keyList.add(key); valueList.add(value); } return true; } });
public boolean apply(long key, Object value) { if (condition.apply(key,value)) { keyList.add(key); valueList.add(value); } return true; } }
public boolean apply(int key, Object value) { if (condition.apply(key,value)) { keyList.add(key); valueList.add(value); } return true; } }
public boolean apply(long key, Object value) { if (condition.apply(key, value)) { keyList.add(key); valueList.add(value); } return true; } });
public boolean apply(int key, Object value) { if (condition.apply(key,value)) { keyList.add(key); valueList.add(value); } return true; } }
void addTier(ITier tier) { tiers.add(tier); tiersHash3.put(tier.canonicalHashCode(), tier); }
private void addTiersHash2(ITier tier, int varName1, int varName2) { long key = varName1 < varName2 ? (long)varName1 << 21 | varName2 : (long)varName2 << 21 | varName1; ObjectArrayList tiers = (ObjectArrayList) tiersHash2.get(key); if (tiers == null) { tiersHash2.put(key, new ObjectArrayList(new ITier[] {tier})); } else { tiers.add(tier); } }
private void addTiersHash1(ITier tier, int varName) { int key = varName; // List of ITier ObjectArrayList tiers = (ObjectArrayList) tiersHash1.get(key); if (tiers == null) { tiersHash1.put(key, new ObjectArrayList(new ITier[] {tier})); } else { tiers.add(tier); } }
public void release(int key, Object object) { ObjectArrayList objects = (ObjectArrayList) map.get(key); if (objects == null) { objects = new ObjectArrayList(); map.put(key, objects); } objects.add(object); count++; if (count > maxCount) { maxCount = count; } } }
/** * * @param ct List of {@link ITabularFormula}. * @return */ public static ObjectArrayList cloneStructures(ObjectArrayList ct) { ObjectArrayList ctf = new ObjectArrayList(); for (int i = 0; i < ct.size(); i++) { ctf.add(((ITabularFormula) ct.get(i)).clone()); } return ctf; }
public void addVertex(int tierSize, IVertex vertex) { int tierIndex = vertex.getTierIndex(); OpenIntObjectHashMap edges; if (tierIndex == tiers.size()) { edges = new OpenIntObjectHashMap(tierSize); tiers.add(edges); } else { edges = (OpenIntObjectHashMap) tiers.get(tierIndex); } edges.put(vertex.getTripletValue().getTierKey(), vertex); ((SimpleVertex)vertex).setHyperStructure(this); } }
private static void fillVerticesFromLastTier(ObjectArrayList hss, ObjectArrayList structures, OpenIntObjectHashMap verticesFromLastTiers) { IHyperStructure basicGraph = (IHyperStructure) hss.get(0); int tiersCount = basicGraph.getTiers().size(); // Pick any vertex from the last tier of each HS (with the same index for each HS) for(int h = 0; h < hss.size(); h++) { IHyperStructure hs = (IHyperStructure) hss.get(h); IVertex vertexFromTheLastTier = (IVertex) ((OpenIntObjectHashMap) hs.getTiers().get(tiersCount - 1)).values().get(0); verticesFromLastTiers.put(h, vertexFromTheLastTier); ICompactTripletsStructure structure = ((IVertex) verticesFromLastTiers.get(h)).getCTS(); structures.add(structure); } }