Package org.jamesii.core.math

Examples of org.jamesii.core.math.Matrix.transpose()


  public static Pair<Double, Double> calcMeanAndVariance(double[] weights,
      Double[] avgPerf, Double[][] covMat) {
    Matrix w = new Matrix(weights);
    Matrix s = new Matrix(covMat);
    Matrix r = new Matrix(avgPerf);
    return new Pair<>(r.transpose().mult(w).getElement(0, 0), w
        .transpose().mult(s.mult(w)).getElement(0, 0));
  }

  /**
   * Gets the avg and cov from performances.
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.