Package kodkod.util.ints

Examples of kodkod.util.ints.IntSet.min()


        resolvents.add(i);
      }
    }
       
    final int axioms = length - resolvents.size();
    if (resolvents.min()<axioms) {
      final int[] position = new int[length];
      for(int i = 0, axiomIndex = 0, resolventIndex = axioms; i < length; i++) {
        if (resolvents.contains(i)) {
          position[i] = resolventIndex++;
          int[] resolvent = trace[i];
View Full Code Here


    refinePartitions(firstCol);
   
    int idenFactor = (1 - firstColFactor) / (1 - usize);
    for(ListIterator<IntSet> partsIter = parts.listIterator(); partsIter.hasNext(); ) {
      IntSet part = partsIter.next();
      if (firstCol.contains(part.min())) { // contains one, contains them all
        range2domain.clear();
        for(IntIterator atoms = part.iterator(); atoms.hasNext(); ) {
          int atom = atoms.next();
          IntSet atomRange = Ints.bestSet(firstColFactor);
          for(IntIterator rbIter = set.iterator(atom*firstColFactor, (atom+1)*firstColFactor - 1);
View Full Code Here

      TupleSet lower = bounds.lowerBound(r);
      IntSet indeces = Ints.bestSet(lower.capacity());
      indeces.addAll(lower.indexView());
      IntSet vars = primaryVarUsage.get(r);
      if (vars!=null) {
        int lit = vars.min();
        for(IntIterator iter = bounds.upperBound(r).indexView().iterator(); iter.hasNext();) {
          final int index = iter.next();
          if (!indeces.contains(index) && solver.valueOf(lit++))
            indeces.add(index);
        }
View Full Code Here

  private final Formula breakTotalOrder(RelationPredicate.TotalOrdering total, boolean aggressive) {
    final Relation first = total.first(), last = total.last(), ordered = total.ordered(), relation = total.relation();
    final IntSet domain = bounds.upperBound(ordered).indexView();   
 
    if (symmetricColumnPartitions(ordered)!=null &&
      bounds.upperBound(first).indexView().contains(domain.min()) &&
      bounds.upperBound(last).indexView().contains(domain.max())) {
     
      // construct the natural ordering that corresponds to the ordering of the atoms in the universe
      final IntSet ordering = Ints.bestSet(usize*usize);
      int prev = domain.min();
View Full Code Here

  private final IntSet[] symmetricColumnPartitions(Relation r) {
    final IntSet upper = bounds.upperBound(r).indexView();
    if (upper.isEmpty()) return null;
   
    final IntSet[] colParts = new IntSet[r.arity()];
    for(int i = r.arity()-1, min = upper.min(); i >= 0; i--, min /= usize) {
      for(IntSet part : symmetries) {
        if (part.contains(min%usize)) {
          colParts[i] = part;
          break;
        }
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.