Package mikera.vectorz

Examples of mikera.vectorz.Vector


    if (!(dest instanceof Vector)) {
      super.transform(source, dest);
    } else if ((source instanceof Vector )) {
      transform ((Vector)source, (Vector)dest);
    } else {
      Vector t=(Vector)dest;
      t.fill(0.0);
      double[] data=t.getArray();
      for (int i=minBand; i<=maxBand; i++) {
        AVector b=getBand(i);
        b.addProductToArray(1.0, 0, source, Math.max(i, 0), data, Math.max(-i, 0), bandLength(i));
      }
    }
View Full Code Here


  }
 
  @Override
  public void transform(Vector source, Vector dest) {
    // fast transform is possible!
    Vector t=dest;
    t.fill(0.0);
    double[] data=dest.getArray();
    for (int i=minBand; i<=maxBand; i++) {
      AVector b=getBand(i);
      b.addProductToArray(1.0, 0, source, Math.max(i, 0), data, Math.max(-i, 0), bandLength(i));
    }   
View Full Code Here

    return vector.equalsArray(data, offset);
  }

  @Override
  public Matrix transposeInnerProduct(Matrix s) {
    Vector v=vector.innerProduct(s).toVector();
    return Matrix.wrap(1, s.columnCount(), v.asDoubleArray());
  }
View Full Code Here

    return left.join(right,dimension);
  }
 
  @Override
  public AVector transform(AVector source) {
    Vector v=Vector.createLength(rowCount());
    if (source instanceof Vector) {
      transform((Vector)source,v);
    } else {
      transform(source,v);
    }
View Full Code Here

    }
    return v;
  }
 
  public Vector transform(Vector source) {
    Vector v=Vector.createLength(rowCount());
    transform(source,v);
    return v;
  }
View Full Code Here

   *
   * You may modify the cloned row without affecting the source matrix.
   */
  public AVector getRowClone(int row) {
    int cc=this.columnCount();
    Vector v=Vector.createLength(cc);
    copyRowTo(row,v.getArray(),0);
    return v;
  }
View Full Code Here

  /**
   * Returns a column of the matrix as a new cloned vector
   */
  public AVector getColumnClone(int column) {
    int rc=this.rowCount();
    Vector v=Vector.createLength(rc);
    copyColumnTo(column,v.getArray(),0);
    return v;
  }
View Full Code Here

   */
  @Override
  public Vector toVector() {
    int rc = rowCount();
    int cc = columnCount();
    Vector v = Vector.createLength(rc * cc);
    this.getElements(v.getArray(),0);
    return v;
  }
View Full Code Here

    }
  }

  @Override
  public Vector transform(AVector a) {
    Vector v = Vector.createLength(rows);
    double[] vdata = v.getArray();
    for (int i = 0; i < rows; i++) {
      vdata[i] = a.dotProduct(data, i * cols);
    }
    return v;
  }
View Full Code Here

    return v;
  }

  @Override
  public Vector transform(Vector a) {
    Vector v = Vector.createLength(rows);
    transform(a, v);
    return v;
  }
View Full Code Here

TOP

Related Classes of mikera.vectorz.Vector

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.