Package mikera.vectorz

Examples of mikera.vectorz.AVector.innerProduct()


  public AMatrix multiplyCopy(double a) {
    AVector[] ndata=new AVector[lineCount()];
    for (int i = 0; i < lineCount(); ++i) {
            AVector v = unsafeGetVec(i);
            if (v != null)
                ndata[i] = v.innerProduct(a);
    }
    return wrap(ndata,rows,cols);
  }
 
  @Override
View Full Code Here


  public AMatrix multiplyCopy(double a) {
    AVector[] ndata=new AVector[lineCount()];
    for (int i = 0; i < lineCount(); ++i) {
            AVector v = unsafeGetVec(i);
            if (v != null)
                ndata[i] = v.innerProduct(a);
    }
    return wrap(ndata,rows,cols);
  }

  @Override
View Full Code Here

    AMatrix r = Matrix.create(rows, a.columnCount());

        for (int i = 0; i < rows; ++i) {
      AVector row = unsafeGetVec(i);
            if (! ((row == null) || (row.isZero()))) {
          r.setRow(i,row.innerProduct(a));
            }
    }
    return r;
  }
 
View Full Code Here

     
        AMatrix Q = DenseColumnMatrix.wrap(this.rowCount(), this.columnCount(), this.getTransposeView().toDoubleArray());
        for( int i = 0; i < Q.columnCount(); i++ ) {
            AVector a = Q.getColumn(i);
            for( int j = i+1; j < Q.columnCount(); j++ ) {
                double val = a.innerProduct(Q.getColumn(j)).get();
                if( !(Math.abs(val) <= TOLERANCE))
                    return false;
            }
        }
       
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.