Examples of multiply()


Examples of mikera.arrayz.INDArray.multiply()

  }
 
  @Override
  public INDArray multiplyCopy(double d) {
    INDArray r=clone();
    r.multiply(d);
    return r;
  }
 
  @Override
  public INDArray applyOpCopy(Op op) {
View Full Code Here

Examples of mikera.matrixx.AMatrix.multiply()

                       
                        Matrix t = Matrix.create(v.length(), 1);
                        t.setColumn(0, v);
                        double error = diffNormF(e,t);
//                        CommonOps.changeSign(e);
                        e.multiply(-1);
                        double error2 = diffNormF(e,t);


                        if(error < 1e-3 || error2 < 1e-3)
                            numMatched++;
View Full Code Here

Examples of mikera.matrixx.Matrix.multiply()

    }

    public void testQuality_scale( CholeskySolver solver ) {
      Matrix A = DiagonalMatrix.create(3,2,1).toMatrix();
      Matrix B = Matrix.create(A);
      B.multiply(0.001);

        assertTrue(solver.setA(A));
        double qualityA = solver.quality();

        assertTrue(solver.setA(B));
View Full Code Here

Examples of mikera.vectorz.AVector.multiply()

    v.add(w);
    v.multiply(0.5);
    assertEquals(w,v);

    w.addMultiple(v,3);
    w.multiply(0.25);
    assertEquals(v,w);
   
    w.addProduct(v,w,2);
    assertEquals(210,w.get(10),0.000);
View Full Code Here

Examples of net.rim.device.api.math.Matrix4f.multiply()

            // Save the old model view matrix
            final Matrix4f m = new Matrix4f(modelview);

            // Apply the local transformation
            m.multiply(_transform.getMatrix());

            // Bind the vertex and index buffers
            gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, _buffers[0]);
            gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, _buffers[1]);
View Full Code Here

Examples of org.apache.camel.example.server.Multiplier.multiply()

        // just get the proxy to the service and we as the client can use the "proxy" as it was
        // a local object we are invoking. Camel will under the covers do the remote communication
        // to the remote ActiveMQ server and fetch the response.
        Multiplier multiplier = context.getBean("multiplierProxy", Multiplier.class);
      
        int response = multiplier.multiply(33);
       
        assertEquals("Get a wrong response", 99, response);
       
        context.stop();
    }
View Full Code Here

Examples of org.apache.commons.math.fraction.BigFraction.multiply()

            BigFraction ck     = coefficients.get(startK);
            BigFraction ckm1   = coefficients.get(startKm1);

            // degree 0 coefficient
            coefficients.add(ck.multiply(ai[0]).subtract(ckm1.multiply(ai[2])));

            // degree 1 to degree k-1 coefficients
            for (int i = 1; i < k; ++i) {
                final BigFraction ckPrev = ck;
                ck     = coefficients.get(startK + i);
View Full Code Here

Examples of org.apache.commons.math.linear.RealMatrix.multiply()

                }
            }
        }

        // Compute and return Hat matrix
        return Q.multiply(augI).multiply(Q.transpose());
    }

    /**
     * <p>Returns the sum of squared deviations of Y from its mean.</p>
     *
 
View Full Code Here

Examples of org.apache.commons.math.linear.RealMatrixImpl.multiply()

    rMatrix = new RealMatrixImpl(qr.getR().getArray());
    qMatrix = new RealMatrixImpl(qr.getQ().getArray());
    RealMatrix qMatrixTransposed = qMatrix.transpose();
    RealMatrix qByY = qMatrixTransposed.multiply(yMatrix);
    RealMatrix  rMatrixInverse = new RealMatrixImpl(new Matrix(rMatrix.getData()).inverse().getArray());
    RealMatrix resultMatrix = rMatrixInverse.multiply(qByY);
    coefficiants= resultMatrix.getColumn(0);

    //System.out.println(stdDev+" "+mean);
  }
 
View Full Code Here

Examples of org.apache.commons.math3.analysis.differentiation.DerivativeStructure.multiply()

            throw new NoDataException(LocalizedFormats.EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY);
        }
        DerivativeStructure result =
                new DerivativeStructure(t.getFreeParameters(), t.getOrder(), coefficients[n - 1]);
        for (int j = n - 2; j >= 0; j--) {
            result = result.multiply(t).add(coefficients[j]);
        }
        return result;
    }

    /**
 
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.