/** * in place (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @return the result of the multiplication */ @Override public INDArray muli(INDArray other) { return muli(other, this); }
/** * copy (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @param result the result ndarray * @return the result of the multiplication */ @Override public INDArray mul(INDArray other, INDArray result) { return muli(other, result); }
@Override public INDArray muli(Number n) { return muli(n, this); }
@Override public INDArray mul(Number n, INDArray result) { return muli(n, result); }
/** * copy (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @return the result of the addition */ @Override public INDArray mul(INDArray other) { return muli(other, Nd4j.createUninitialized(this.shape(), this.ordering())); }
@Override public INDArray mul(Number n) { // return dup().muli(n); return muli(n, Nd4j.createUninitialized(this.shape(), this.ordering())); }
/** * in place (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @param result the result ndarray * @return the result of the multiplication */ @Override public INDArray muli(INDArray other, INDArray result) { if (other.isScalar()) { return muli(other.getDouble(0), result); } if (isScalar()) { return other.muli(getDouble(0), result); } if(!Shape.shapeEquals(this.shape(),other.shape())) { int[] broadcastDimensions = Shape.getBroadcastDimensions(this.shape(),other.shape()); Nd4j.getExecutioner().exec(new BroadcastMulOp(this,other,result,broadcastDimensions),broadcastDimensions); return result; } LinAlgExceptions.assertSameShape(other, result); Nd4j.getExecutioner().exec(new OldMulOp(this, other, result, length())); if (Nd4j.ENFORCE_NUMERICAL_STABILITY) Nd4j.clearNans(result); return result; }
return muli(other.getDouble(0), result);
/** * copy (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @param result the result ndarray * @return the result of the multiplication */ @Override public INDArray mul(INDArray other, INDArray result) { return muli(other, result); }
/** * in place (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @return the result of the addition */ @Override public INDArray muli(INDArray other) { return muli(other, this); }
@Override public INDArray mul(Number n, INDArray result) { return muli(n, result); }
@Override public INDArray muli(Number n) { return muli(n, this); }
@Override public IComplexNDArray muli(IComplexNumber n) { return muli(n, Nd4j.createComplex(shape())); }
/** * copy (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @return the result of the addition */ @Override public INDArray mul(INDArray other) { return muli(other, Nd4j.createUninitialized(this.shape(), this.ordering())); }
@Override public INDArray mul(Number n) { // return dup().muli(n); return muli(n, Nd4j.createUninitialized(this.shape(), this.ordering())); }
/** * in place (element wise) multiplication of two matrices * * @param other the second ndarray to multiply * @param result the result ndarray * @return the result of the multiplication */ @Override public INDArray muli(INDArray other, INDArray result) { if (other.isScalar()) { return muli(other.getDouble(0), result); } if (isScalar()) { return other.muli(getDouble(0), result); } LinAlgExceptions.assertSameShape(other, result); Nd4j.getExecutioner().exec(new MulOp(this, other, result, length())); if (Nd4j.ENFORCE_NUMERICAL_STABILITY) Nd4j.clearNans(result); return result; }