Examples of THashSet


Examples of com.dotcms.repackage.gnu.trove.THashSet

    }
  }

  public static Set getHashSet() {
    if (TROVE) {
      return new THashSet();
    }
    else {
      return new HashSet();
    }
  }
View Full Code Here

Examples of com.dotcms.repackage.gnu.trove.THashSet

    }
  }

  public static Set getHashSet(int capacity) {
    if (TROVE) {
      return new THashSet(capacity);
    }
    else {
      return new HashSet(capacity);
    }
  }
View Full Code Here

Examples of gnu.trove.THashSet

    return newMdl;
  }

  private static void addSlicedPotentials (FactorGraph fromMdl, FactorGraph toMdl, Assignment assn, Map toSlicedMap)
  {
    Set inputVars = new THashSet (Arrays.asList (assn.getVars ()));
    Set remainingVars = new THashSet (fromMdl.variablesSet ());
    remainingVars.removeAll (inputVars);
    for (Iterator it = fromMdl.factorsIterator (); it.hasNext ();) {
      Factor ptl = (Factor) it.next ();
      Set theseVars = new THashSet (ptl.varSet ());
      theseVars.retainAll (remainingVars);
      Factor slicedPtl = ptl.slice (assn);
      toMdl.addFactor (slicedPtl);
      if (toSlicedMap != null) {
        toSlicedMap.put (ptl, slicedPtl);
      }
View Full Code Here

Examples of gnu.trove.THashSet

    }
  }

  private static Collection varsForFactors (List factors)
  {
    Set vars = new THashSet ();
    for (Iterator it = factors.iterator (); it.hasNext ();) {
      Factor ptl = (Factor) it.next ();
      vars.addAll (ptl.varSet ());
    }
    return vars;
  }
View Full Code Here

Examples of gnu.trove.THashSet

    isRoot = true;
    index = -1;
  }
  Region (Variable var) {
    this ();
    factors = new THashSet ();
    vars = new ArrayList (1);
    vars.add (var);
  }
View Full Code Here

Examples of gnu.trove.THashSet

    vars.add (var);
  }

  Region (Factor ptl) {
    this ();
    factors = new THashSet ();
    factors.add (ptl);
    vars = new ArrayList (ptl.varSet ());
  }
View Full Code Here

Examples of gnu.trove.THashSet

  }

  Region (Variable[] vars, Factor[] factors)
  {
    this();
    this.factors = new THashSet (Arrays.asList (factors));
    this.vars = new ArrayList (Arrays.asList (vars));
  }
View Full Code Here

Examples of gnu.trove.THashSet

  }

  Region (Collection vars, Collection factors)
  {
    this();
    this.factors = new THashSet (factors);
    this.vars = new ArrayList (vars);
  }
View Full Code Here

Examples of gnu.trove.THashSet

  Region (Collection vars)
  {
    this();
    this.vars = new ArrayList (vars);
    factors = new THashSet ();
  }
View Full Code Here

Examples of gnu.trove.THashSet

  }

  /** Computes a nondestructive intersection of two collections. */
  public static Collection intersection (Collection c1, Collection c2)
  {
    Set set = new THashSet (c1);
    set.retainAll (c2);
    return set;
  }
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.