Package mikera.arrayz

Examples of mikera.arrayz.INDArray


    int tdims=this.dimensionality();
    int adims=a.dimensionality();
    if (adims<tdims) {
      int sc=sliceCount();
      for (int i=0; i<sc; i++) {
        INDArray s=slice(i);
        s.set(a);
      }
    } else if (adims==tdims) {
      if (tdims==0) {
        set(a.get());
        return;
      }
      int sc=sliceCount();
      for (int i=0; i<sc; i++) {
        INDArray s=slice(i);
        s.set(a.slice(i));
      }
    } else {
      throw new IllegalArgumentException(ErrorMessages.incompatibleShapes(this, a));
    }
  }
View Full Code Here


    applyOp(Ops.SQUARE);
  }
 
  @Override
  public INDArray squareCopy() {
    INDArray r=clone();
    r.square();
    return r;
  }
View Full Code Here

    return r;
  }
 
  @Override
  public INDArray absCopy() {
    INDArray r=clone();
    r.abs();
    return r;
  }
View Full Code Here

    return r;
  }
 
  @Override
  public INDArray reciprocalCopy() {
    INDArray r=clone();
    r.reciprocal();
    return r;
  }
View Full Code Here

    return r;
  }
 
  @Override
  public INDArray signumCopy() {
    INDArray r=clone();
    r.signum();
    return r;
  }
View Full Code Here

    return clone();
  }
 
  @Override
  public INDArray scaleCopy(double d) {
    INDArray r=clone();
    r.scale(d);
    return r;
  }
View Full Code Here

    return r;
  }
 
  @Override
  public INDArray negateCopy() {
    INDArray r=clone();
    r.negate();
    return r;
  }
View Full Code Here

    slice(s).addAt(i-s*ss, v);
  }
 
  @Override
  public INDArray addCopy(INDArray a) {
    INDArray r=this.broadcastCloneLike(a);
    r.add(a);
    return r;
  }
View Full Code Here

    return r;
  }
 
  @Override
  public INDArray subCopy(INDArray a) {
    INDArray r=this.broadcastCloneLike(a);
    r.sub(a);
    return r;
  }
View Full Code Here

    return r;
  }
 
  @Override
  public INDArray multiplyCopy(INDArray a) {
    INDArray r=this.broadcastCloneLike(a);
    r.multiply(a);
    return r;
  }
View Full Code Here

TOP

Related Classes of mikera.arrayz.INDArray

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.