Package com.adventuresinsoftware.tuple

Examples of com.adventuresinsoftware.tuple.Tuple


  /*
   * Allocate more measurements according to the algorithm, and put them into
   * the measurementsToGive list in round-robin fashion.
   */
  public void AllocateMore() {
    Tuple D[] = new Tuple[M()];
    int i, b = MathPF.argmax(belief.mu);

    // System.out.println("AllocateMore");

    /*
     * Compute D[i] for each alternative according to the procedure in the
     * left hand column on page 958 of the paper. We compute D[i] when i<>b
     * in a straightforward fashion in the loop. D[b] is more complicated,
     * being computed as the sum of terms over i<>b. Also see notes on
     * 10/9/2007, p3.
     */
    double Db = 0;
    for (i = 0; i < M(); i++) {
      double s2bi, s2bii, s2bib; // standard deviations.
      double fbi, fbii, fbib; // values for bf.
      if (i == b)
        continue;
      s2bi = Math.sqrt(1 / belief.beta[b] + 1 / belief.beta[i]);
      s2bii = Math.sqrt(1 / belief.beta[b] + 1
          / (belief.beta[i] + belief.noiseBeta[i]));
      s2bib = Math.sqrt(1 / belief.beta[i] + 1
          / (belief.beta[b] + belief.noiseBeta[b]));
      fbi = bf(belief.mu[b] - belief.mu[i], s2bi);
      fbii = bf(belief.mu[b] - belief.mu[i], s2bii);
      fbib = bf(belief.mu[b] - belief.mu[i], s2bib);
      D[i] = new Tuple().add(fbii - fbi).add(i);
      Db += fbib - fbi;
    }
    D[b] = new Tuple().add(Db).add(b);

    // System.out.println(Arrays.toString(D));

    /*
     * Now find the mHeChCh best (minimum) values of D and allocate tau each
View Full Code Here

TOP

Related Classes of com.adventuresinsoftware.tuple.Tuple

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.