use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class BooleanIndexing method or.
/**
* Or over the whole ndarray given some condition
*
* @param n
* @param cond
* @return
*/
public static boolean or(IComplexNDArray n, Condition cond) {
boolean ret = false;
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 scalar.
/**
* Create a scalar nd array with the specified value and offset
*
* @param value the value of the scalar
* @param offset the offset of the ndarray
* @return the scalar nd array
*/
public static IComplexNDArray scalar(IComplexFloat value, long offset) {
IComplexNDArray ret = INSTANCE.scalar(value, offset);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
/**
* Creates an ndarray
*
* @param columns the number of columns in the row vector
* @return ndarray
*/
public static IComplexNDArray createComplex(int columns, char order) {
int[] shape = new int[] { 1, columns };
IComplexNDArray ret = INSTANCE.createComplex(new int[] { 1, columns }, Nd4j.getComplexStrides(shape, order), 0, order);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method complexValueOf.
/**
* @param shape
* @param value
* @return
*/
public static IComplexNDArray complexValueOf(int[] shape, IComplexNumber value) {
checkShapeValues(shape);
IComplexNDArray ret = INSTANCE.complexValueOf(shape, value);
logCreationIfNecessary(ret);
return ret;
}
use of org.nd4j.linalg.api.complex.IComplexNDArray in project nd4j by deeplearning4j.
the class Nd4j method createComplex.
private static IComplexNDArray createComplex(float[] data, char order) {
IComplexNDArray ret = INSTANCE.createComplex(data, order);
logCreationIfNecessary(ret);
return ret;
}
Aggregations