use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class BooleanIndexing method and.
/**
* And
*
* @param n
* @param cond
* @return
*/
public static boolean and(IComplexNDArray n, Condition cond) {
boolean ret = true;
IComplexNDArray linear = n.linearView();
for (int i = 0; i < linear.length(); i++) {
ret = ret && cond.apply(linear.getComplex(i));
}
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* @param data
* @param shape
* @param offset
* @param ordering
* @return
*/
public static IComplexNDArray createComplex(DataBuffer data, int[] shape, long offset, char ordering) {
shape = getEnsuredShape(shape);
checkShapeValues(shape);
IComplexNDArray ret = INSTANCE.createComplex(data, shape, offset, ordering);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* @param data
* @param shape
* @param offset
* @param ordering
* @return
*/
public static IComplexNDArray createComplex(double[] data, int[] shape, long offset, char ordering) {
shape = getEnsuredShape(shape);
checkShapeValues(shape);
IComplexNDArray ret = INSTANCE.createComplex(data, shape, offset, ordering);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* @param data
* @param shape
* @param newStrides
* @param offset
* @return
*/
public static IComplexNDArray createComplex(DataBuffer data, int[] shape, int[] newStrides, long offset) {
shape = getEnsuredShape(shape);
checkShapeValues(shape);
IComplexNDArray ret = INSTANCE.createComplex(data, shape, newStrides, offset);
logCreationIfNecessary(ret);
return ret;
}
Aggregations