Package gnu.trove

Examples of gnu.trove.TObjectIntHashMap


    }

    public void resetRuntimeState() {
        m_targetBoundedName = null;
        m_thisBoundedName = null;
        m_exprIndexToTargetIndex = new TObjectIntHashMap();
        m_targetWithRuntimeCheck = false;
    }
View Full Code Here


   * Creates an empty assignment.
   */
  public Assignment ()
  {
    super (new HashVarSet ());
    var2idx = new TObjectIntHashMap ();
    values = new ArrayList();
  }
View Full Code Here

  /**
   * Creates an assignemnt for the given variables.
   */
  public Assignment (Variable[] vars, int[] outcomes)
  {
    var2idx = new TObjectIntHashMap (vars.length);
    values = new ArrayList ();
    addRow (vars, outcomes);
  }
View Full Code Here

  /**
   * Creates an assignemnt for the given variables.
   */
  public Assignment (Variable[] vars, double[] outcomes)
  {
    var2idx = new TObjectIntHashMap (vars.length);
    values = new ArrayList ();
    addRow (vars, outcomes);
  }
View Full Code Here

  /**
   * Creates an assignemnt for the given variables.
   */
  public Assignment (List vars, int[] outcomes)
  {
    var2idx = new TObjectIntHashMap (vars.size ());
    values = new ArrayList ();
    addRow ((Variable[]) vars.toArray (new Variable[0]), outcomes);
  }
View Full Code Here

   * The assignment will assign outcomes[i] to the variable
   * <tt>mdl.get(i)</tt>
   */
  public Assignment (FactorGraph mdl, int[] outcomes)
  {
    var2idx = new TObjectIntHashMap (mdl.numVariables ());
    values = new ArrayList ();
    Variable[] vars = new Variable [mdl.numVariables ()];
    for (int i = 0; i < vars.length; i++) vars[i] = mdl.get (i);
    addRow (vars, outcomes);
  }
View Full Code Here

  {
//    in.defaultReadObject ();
    int version = in.readInt ()// version

    int numVariables = in.readInt ();
    var2idx = new TObjectIntHashMap (numVariables);
    for (int vi = 0; vi < numVariables; vi++) {
      Variable var = (Variable) in.readObject ();
      var2idx.put (var, vi);
    }
View Full Code Here

        // same order so we have
        // to sort the method list before computation.
        // @TODO: filter init/clinit/prefixed methods
        final List sortedMethods = Arrays.asList(methods);
        Collections.sort(sortedMethods, JavassistMethodComparator.getInstance());
        final TObjectIntHashMap methodSequences = new TObjectIntHashMap();
        final List sortedMethodTuples = new ArrayList(sortedMethods.size());
        for (Iterator methodsIt = sortedMethods.iterator(); methodsIt.hasNext();) {
            CtMethod method = (CtMethod) methodsIt.next();
            MethodInfo methodInfo = JavassistMethodInfo.getMethodInfo(method, context.getLoader());
            int sequence = 1;
            if (methodSequences.containsKey(method.getName())) {
                sequence = methodSequences.get(method.getName());
                methodSequences.remove(method.getName());
                sequence++;
            }
            methodSequences.put(method.getName(), sequence);
            ExpressionContext ctx = new ExpressionContext(PointcutType.EXECUTION, methodInfo, methodInfo);
            MethodSequenceTuple tuple = new MethodSequenceTuple(method, sequence);
            int status = methodFilter(definitions, ctx, method);
            tuple.setStatus(status);
View Full Code Here

        // Javassist.getDeclaredMethods() does not always return methods in the same order so we have
        // to sort the method list before computation.
        // @TODO: filter init/clinit/prefixed methods
        final List sortedMethods = Arrays.asList(methods);
        Collections.sort(sortedMethods, JavassistMethodComparator.getInstance());
        final TObjectIntHashMap methodSequences = new TObjectIntHashMap();
        final List sorteMethodTuples = new ArrayList(sortedMethods.size());
        for (Iterator methodsIt = sortedMethods.iterator(); methodsIt.hasNext();) {
            CtMethod method = (CtMethod)methodsIt.next();
            MethodInfo methodInfo = JavassistMethodInfo.getMethodInfo(method, context.getLoader());
            int sequence = 1;
            if (methodSequences.containsKey(method.getName())) {
                sequence = methodSequences.get(method.getName());
                methodSequences.remove(method.getName());
                sequence++;
            }
            methodSequences.put(method.getName(), sequence);
            ExpressionContext ctx = new ExpressionContext(PointcutType.EXECUTION, methodInfo, null);
            MethodSequenceTuple tuple = new MethodSequenceTuple(method, sequence);
            int status = methodFilter(definitions, ctx, method);
            tuple.setStatus(status);
View Full Code Here

    }

    public void resetRuntimeState() {
        m_targetBoundedName = null;
        m_thisBoundedName = null;
        m_exprIndexToTargetIndex = new TObjectIntHashMap();
        m_targetWithRuntimeCheck = false;
    }
View Full Code Here

TOP

Related Classes of gnu.trove.TObjectIntHashMap

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.