Package edu.brown.utils

Examples of edu.brown.utils.PartitionSet.addAll()


            predict_touchedPartitions = new PartitionSet();
            malloc = true;
            Collection<Integer> orig_touchedPartitions = orig_ts.getTouchedPartitions().values();
            while (true) {
                try {
                    predict_touchedPartitions.addAll(orig_touchedPartitions);
                } catch (ConcurrentModificationException ex) {
                    continue;
                }
                break;
            } // WHILE
View Full Code Here


                    // XXX: Since the MispredictionException isn't re-used, we can
                    //      probably reuse the PartitionSet
                    predict_touchedPartitions = new PartitionSet(predict_touchedPartitions);
                    malloc = true;
                }
                predict_touchedPartitions.addAll(partitions);
            }
            if (trace.val)
                LOG.trace(orig_ts + " Mispredicted Partitions: " + partitions);
        }
       
View Full Code Here

        assertFalse(path.contains(abort));
       
        // All of the vertices should only have the base partition in their partition set
        PartitionSet touched_partitions = new PartitionSet();
        for (MarkovVertex v : path) {
            touched_partitions.addAll(v.getPartitions());
        } // FOR
//        System.err.println("Expected Partitions: " + multip_partitions);
//        System.err.println("Touched Partitions:  " + touched_partitions);
//        System.err.println("MULTI-PARTITION PATH: " + path);
View Full Code Here

     * @return
     */
    public static PartitionSet getTouchedPartitions(List<MarkovVertex> path) {
        PartitionSet partitions = new PartitionSet();
        for (MarkovVertex v : path) {
            partitions.addAll(v.getPartitions());
        } // FOR
        return (partitions);
    }
   
    /**
 
View Full Code Here

                throw new InvalidGraphElementException(this, v0, String.format("Duplicate element id #%d: Vertex[%s] <-> %s",
                                                                 v0.getElementId(), v0, seen_ids.get(v0.getElementId())));
            }
            seen_ids.put(v0.getElementId(), v0);
           
            all_partitions.addAll(v0.partitions);
            all_partitions.addAll(v0.past_partitions);
           
            for (MarkovEdge e : outbound) {
                MarkovVertex v1 = this.getOpposite(v0, e);
               
View Full Code Here

                                                                 v0.getElementId(), v0, seen_ids.get(v0.getElementId())));
            }
            seen_ids.put(v0.getElementId(), v0);
           
            all_partitions.addAll(v0.partitions);
            all_partitions.addAll(v0.past_partitions);
           
            for (MarkovEdge e : outbound) {
                MarkovVertex v1 = this.getOpposite(v0, e);
               
                // Make sure that each vertex only has one edge to another vertex
View Full Code Here

                        }
                        this.penalties.add(ptype);
                        this.done_partitions.remove(p);
                    }
                } // FOR
                new_touched_partitions.addAll(v.getPartitions());

                // For each partition that we don't touch here, we want to
                // increase their idle counter
                this.idle_partition_ctrs.put(this.catalogContext.getAllPartitionIds());
            } // FOR
View Full Code Here

        Set<Integer> retain = (Set<Integer>)CollectionUtil.addAll(new HashSet<Integer>(), CollectionUtil.first(e_read_partitions));
        e_read_partitions.retainAll(retain);
       
        // Then add all of our partitions to the actual read partitions
        PartitionSet a_read_partitions = this.costmodel.getLastActualReadPartitions();
        a_read_partitions.addAll(catalogContext.getAllPartitionIds());
       
        double cost = this.costmodel.comparePathsFull(this.txn_state);
       
        List<Penalty> penalties = this.costmodel.getLastPenalties();
        assertNotNull(penalties);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.