public IArrayMath toEltMultiply(IArray newArray) throws ShapeNotMatchException { getArray().getArrayUtils().checkShape(newArray); IArrayMath arrMath = newArray.getArrayMath(); IArray result = getFactory().createArray(getArray().getElementType(), getArray().getShape()); if (getArray().getRank() == newArray.getRank()) { eltMultiplyWithEqualSize(newArray, result); } else { ISliceIterator sourceSliceIterator = null; ISliceIterator resultSliceIterator = null; try { sourceSliceIterator = getArray().getSliceIterator(newArray.getRank()); resultSliceIterator = result.getSliceIterator(newArray.getRank()); while (sourceSliceIterator.hasNext() && resultSliceIterator.hasNext()) { IArray sourceSlice = sourceSliceIterator.getArrayNext(); IArray resultSlice = resultSliceIterator.getArrayNext(); arrMath.eltMultiplyWithEqualSize(sourceSlice, resultSlice); } } catch (InvalidRangeException e) { throw new ShapeNotMatchException("shape is invalid"); } } return result.getArrayMath(); }
public IArrayMath eltDivide(IArrayMath array) throws ShapeNotMatchException { return eltDivide(array.getArray()); }
public IArrayMath eltRemainder(IArrayMath array) throws ShapeNotMatchException { return eltRemainder(array.getArray()); }
public void eltDivideWithEqualSize(IArrayMath array, IArrayMath result) throws ShapeNotMatchException { eltDivideWithEqualSize(array.getArray(), result.getArray()); }
public double vecDot(IArrayMath array) throws ShapeNotMatchException { return vecDot(array.getArray()); }
public double powerSum(IArrayMath axis, int dimension, double power) throws ShapeNotMatchException { return powerSum(axis.getArray(), dimension, power); }
public IArrayMath add(IArrayMath array) throws ShapeNotMatchException { return add(array.getArray()); }
public IArrayMath matMultiply(IArrayMath array) throws ShapeNotMatchException { return matMultiply(array.getArray()); }