Package cc.mallet.grmm.types

Examples of cc.mallet.grmm.types.HashVarSet


    Variable[] vars = new Variable [4];
    for (int i = 0; i < vars.length; i++) {
      vars[i] = new Variable(3);
    }

    HashVarSet c1 = new HashVarSet (vars);
    HashVarSet c2 = new HashVarSet (vars);

    assertTrue(c1.equals (c2));
    assertTrue(c2.equals (c1));
    assertEquals (c1.hashCode(), c2.hashCode ());
  }
View Full Code Here


  public void testAddAllOrdering ()
  {
    for (int rep = 0; rep < 1000; rep++) {
      Variable[] vars = new Variable[] { new Variable(2), new Variable (2) };
      HashVarSet vs = new HashVarSet (vars);
      checkOrdering (vs, vars);
    }
  }
View Full Code Here

  public void testAddAllOrdering2 ()
  {
    for (int rep = 0; rep < 1000; rep++) {
      Variable[] vars = new Variable[] { new Variable(2), new Variable (2) };
      HashVarSet vs = new HashVarSet ();
      vs.addAll (Arrays.asList (vars));
      checkOrdering (vs, vars);
    }
  }
View Full Code Here

  public void testAddAllOrdering3 ()
  {
    for (int rep = 0; rep < 1000; rep++) {
      Variable[] vars = new Variable[] { new Variable(2), new Variable (2) };
      HashVarSet vsOld = new HashVarSet (vars);
      HashVarSet vs = new HashVarSet (vsOld);
      checkOrdering (vs, vars);
    }
  }
View Full Code Here

    if (logger.isLoggable (Level.FINER)) {
      logger.finer ("Lookup jt marginal: var " + var + " cluster " + parent);
      logger.finest (" cpf " + cpf);
    }

    Factor marginal = strategy.extractBelief (cpf, new HashVarSet (new Variable[] { var }));
    marginal.normalize ();

    return marginal;
  }
View Full Code Here

TOP

Related Classes of cc.mallet.grmm.types.HashVarSet

Copyright © 2018 www.massapicom. 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.