Examples of sum()


Examples of cc.mallet.grmm.types.Factor.sum()

  public double computeNormalizationFactor (FactorGraph m) {
    /* What we'll do is get the unnormalized marginal of an arbitrary
     *  node; then sum the marginal to get the normalization factor. */
    Variable var = (Variable) m.variablesSet ().iterator().next();
    Factor marginal = unnormalizedMarginal (m, var);
    return marginal.sum ();
  }

  transient FactorGraph mdlCurrent;

  // Inert. All work done in lookupMarginal().

Examples of cc.mallet.grmm.types.Factor.sum()

        ACRF.UnrolledVarSet clique = (ACRF.UnrolledVarSet) it.next();
        int tidx = clique.getTemplate().index;
        if (tidx == -1) continue;

        Factor ptl = unrolled.factorOf (clique);
        double logZ = Math.log (ptl.sum ());

        // for each assigment to the clique
        //  xxx SLOW this will need to be sparsified
        AssignmentIterator assnIt = clique.assignmentIterator ();
        int i = 0;

Examples of com.exigen.ie.constrainer.Constrainer.sum()

    constraintAllDiff2.execute();

    //IntExp cost = C.addIntVar(0,20,"cost");
    //Constraint sum = new ConstraintAddVector(vars,cost);
    //sum.execute();
    IntExp cost = C.sum(vars); cost.name("cost");

    //x.lessOrEqual(y).execute();
    x.mul(2).sub(cost).more(y).execute();

    C.traceChoicePoints(vars);

Examples of com.jengine.orm.model.cluster.Cluster.sum()

        check( cluster1.select().distinct("Book.title").order("Book.title", "DESC").page(0, 2).list().equals(list("The Shining", "The Dark Tower")));
        check( cluster1.select().distinct("Book.title").order("Book.title", "DESC").page(0, 1).list().equals(list("The Shining")));
        check( cluster1.<Long>max("Book.id") == 2l);
        check( cluster1.<Long>min("Transaction.id") == 1l);
        check( cluster1.<Double>avg("Transaction.id") == 2.0);
        check( cluster1.<Long>sum("Transaction.id") == 6);
        check( cluster1.count() == 3);
        check( cluster1.count("Book.id") == 3);
//        check( cluster1.<Long>calc("%s + 10", "Transaction.id") > 0);
//        check( new Cluster("Transaction >> Book").fields("Transaction.id", new Calc("calc_field", Long.class, "%s + 10", "Transaction.id")).select().list() != null );
        check( new Cluster("Transaction >> Book").fields("Transaction.id", new Calc("calc_field", Long.class, "%s + 10", "Transaction.id")).select().list()

Examples of com.jengine.orm.model.cluster.Cluster.sum()

        check( cluster1.select().distinct("Book.title").order("Book.title", "DESC").page(0, 2).list().equals(list("The Shining", "The Dark Tower")));
        check( cluster1.select().distinct("Book.title").order("Book.title", "DESC").page(0, 1).list().equals(list("The Shining")));
        check( cluster1.<Long>max("Book.id") == 2l);
        check( cluster1.<Long>min("Transaction.id") == 1l);
        check( cluster1.<Double>avg("Transaction.id") == 2.0);
        check( cluster1.<Long>sum("Transaction.id") == 6);
        check( cluster1.count() == 3);
        check( cluster1.count("Book.id") == 3);
//        check( cluster1.<Long>calc("%s + 10", "Transaction.id") > 0);
//        check( new Cluster("Transaction >> Book").fields("Transaction.id", new Calc("calc_field", Long.class, "%s + 10", "Transaction.id")).select().list() != null );
        check( new Cluster("Transaction >> Book").fields("Transaction.id", new Calc("calc_field", Long.class, "%s + 10", "Transaction.id")).select().list()

Examples of com.lambdaworks.redis.ZStoreArgs.sum()

          break;
        case MAX:
          args.max();
          break;
        default:
          args.sum();
          break;
      }
    }

    long[] lg = new long[weights.length];

Examples of com.yammer.metrics.core.Timer.sum()

                } else if (metric instanceof Meter) {
                    Meter meter = (Meter) metric;
                    context.getCounter(COUNTER_GROUP, counterName).increment(meter.count());
                } else if (metric instanceof Timer) {
                    Timer timer = (Timer) metric;
                    context.getCounter(COUNTER_GROUP, counterName).increment((long) timer.sum());
                }
            }
        }
    }

Examples of de.jungblut.math.DoubleVector.sum()

    }

    final int[] rowEntries = transitionProbabilities.rowIndices();
    for (int rowIndex : rowEntries) {
      DoubleVector rowVector = transitionProbabilities.getRowVector(rowIndex);
      double sum = rowVector.sum();
      Iterator<DoubleVectorElement> iterateNonZero = rowVector.iterateNonZero();
      // loop over all counts and take the log of the probability
      while (iterateNonZero.hasNext()) {
        DoubleVectorElement columnElement = iterateNonZero.next();
        int columnIndex = columnElement.getIndex();

Examples of de.torstennahm.integrate.sparse.index.Index.sum()

            extent.set(entry.getNumber(), entry.getValue());
            repaint = true;
          }
        }
       
        if (index.sum() > maxSum) {
          maxSum = index.sum();
          repaint = true;
        }
      }
     

Examples of de.torstennahm.integrate.sparse.index.Index.sum()

            repaint = true;
          }
        }
       
        if (index.sum() > maxSum) {
          maxSum = index.sum();
          repaint = true;
        }
      }
     
      if (repaint) {
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.