Examples of diagonal()


Examples of ca.eandb.jmist.math.Box3.diagonal()

   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#getBoundingSphere(int)
   */
  @Override
  public Sphere getBoundingSphere(int index) {
    Box3 b = super.getBoundingBox(index);
    return new Sphere(b.center(), b.diagonal() / 2.0);
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#getSurfaceArea()
   */
 
View Full Code Here

Examples of ca.eandb.jmist.math.Box3.diagonal()

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    Box3 box = boundingBox();
    return new Sphere(box.center(), 0.5 * box.diagonal());
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.geometry.AbstractGeometry#getSurfaceArea(int)
   */
 
View Full Code Here

Examples of ca.eandb.jmist.math.Box3.diagonal()

      return bound.getBoundingBox();
    }

    public Sphere boundingSphere() {
      Box3 box = boundingBox();
      return new Sphere(box.center(), box.diagonal() / 2.0);
    }

    public void intersect(final Ray3 ray, IntersectionRecorder recorder) {
      for (int i = 0; i < vertices.length - 3; i++) {
        final double t = GeometryUtil.rayIntersectTriangle(ray, vertices[i], vertices[i+1], vertices[i+2]);
View Full Code Here

Examples of ca.eandb.jmist.math.Box3.diagonal()

   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  @Override
  public Sphere boundingSphere() {
    Box3 boundingBox = this.boundingBox();
    return new Sphere(boundingBox.center(), boundingBox.diagonal() / 2.0);
  }

}
View Full Code Here

Examples of ca.eandb.jmist.math.Box3.diagonal()

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    Box3 boundingBox = boundingBox();
    return new Sphere(boundingBox.center(), boundingBox.diagonal() / 2.0);
  }

}
View Full Code Here

Examples of ca.eandb.jmist.math.Box3.diagonal()

    /* The default behavior is to return the sphere that bounds the
     * bounding box.
     */
    Box3 boundingBox = this.boundingBox();

    return new Sphere(boundingBox.center(), boundingBox.diagonal() / 2.0);

  }

  /**
   * Gets the list of child geometries.
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.diagonal()

        return results_;
    }

    public Matrix correlation() {
        final Matrix correlation = covariance();
        final Array variances = correlation.diagonal();
        for (int i = 0; i < dimension_; i++) {
            for (int j = 0; j < dimension_; j++)
                if (i == j) {
                    if (variances.get(i) == 0.0) {
                        correlation.set(i, j, 1.0);
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.diagonal()

  /**
   * returns the correlation Matrix
   */
  public Matrix correlation() /*@ReadOnly*/ {
    final Matrix corr = covariance();
    final Array v = corr.diagonal();
    for (/*@Size*/ int i=0; i<dimension_; i++){
      for (/*@Size*/ int j=0; j<dimension_; j++){
        if (i==j) {
          if (v.$[v._(i)]==0.0) {
            corr.$[corr._(i,j)] = 1.0;
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.diagonal()

                { 9.0, 9.0, 9.0, 4.0 },
        }, flagsA);

        final Array aA = new Array(new double[] { 1.0, 2.0, 3.0, 4.0 }, flagsB);

        if (!ArrayTest.equals(mA.diagonal(), aA)) {
            fail("'diagonal' failed");
        }
    }

View Full Code Here

Examples of org.jquantlib.methods.finitedifferences.BSMOperator.diagonal()

        final double tolerance = 1.0e-6;

        Array lderror = ref.lowerDiagonal().clone();
        lderror.subAssign(op1.lowerDiagonal());
        Array derror = ref.diagonal().clone();
        derror.subAssign(op1.diagonal());
        Array uderror = ref.upperDiagonal().clone();
        uderror.subAssign(op1.upperDiagonal());


        for (i=2; i<grid.size()-2; i++) {
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.