public class SimpleBooleanTensor extends java.lang.Object implements BooleanTensor
Tensor.FlattenedView<T>
SCALAR_SHAPE, SCALAR_STRIDE
Constructor and Description |
---|
SimpleBooleanTensor(boolean constant) |
SimpleBooleanTensor(boolean[] data,
int[] shape) |
SimpleBooleanTensor(boolean constant,
int[] shape) |
SimpleBooleanTensor(int[] shape) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
create, create, placeHolder
asFlatList, elementwiseEquals, elementwiseEquals, hasSameShapeAs, hasSameShapeAs, isMatrix, isScalar, isVector
public SimpleBooleanTensor(boolean[] data, int[] shape)
data
- tensor data used c orderingshape
- desired shape of tensorpublic SimpleBooleanTensor(boolean constant)
constant
- constant boolean value to fill shapepublic SimpleBooleanTensor(int[] shape)
shape
- shape to use as place holderpublic SimpleBooleanTensor(boolean constant, int[] shape)
constant
- constant boolean value to fill shapeshape
- desired shape of tensorpublic BooleanTensor reshape(int... newShape)
reshape
in interface BooleanTensor
reshape
in interface Tensor<java.lang.Boolean>
public BooleanTensor and(BooleanTensor that)
and
in interface BooleanTensor
public BooleanTensor or(BooleanTensor that)
or
in interface BooleanTensor
public BooleanTensor not()
not
in interface BooleanTensor
public DoubleTensor setDoubleIf(DoubleTensor trueValue, DoubleTensor falseValue)
setDoubleIf
in interface BooleanTensor
public IntegerTensor setIntegerIf(IntegerTensor trueValue, IntegerTensor falseValue)
setIntegerIf
in interface BooleanTensor
public BooleanTensor setBooleanIf(BooleanTensor trueValue, BooleanTensor falseValue)
setBooleanIf
in interface BooleanTensor
public <T> Tensor<T> setIf(Tensor<T> trueValue, Tensor<T> falseValue)
setIf
in interface BooleanTensor
public BooleanTensor andInPlace(BooleanTensor that)
andInPlace
in interface BooleanTensor
public BooleanTensor orInPlace(BooleanTensor that)
orInPlace
in interface BooleanTensor
public BooleanTensor notInPlace()
notInPlace
in interface BooleanTensor
public boolean allTrue()
allTrue
in interface BooleanTensor
public boolean allFalse()
allFalse
in interface BooleanTensor
public DoubleTensor toDoubleMask()
toDoubleMask
in interface BooleanTensor
public IntegerTensor toIntegerMask()
toIntegerMask
in interface BooleanTensor
public boolean isShapePlaceholder()
isShapePlaceholder
in interface Tensor<java.lang.Boolean>
public java.lang.Boolean getValue(int... index)
public void setValue(java.lang.Boolean value, int... index)
public java.lang.Boolean scalar()
public BooleanTensor duplicate()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Tensor.FlattenedView<java.lang.Boolean> getFlattenedView()
getFlattenedView
in interface Tensor<java.lang.Boolean>
public double[] asFlatDoubleArray()
asFlatDoubleArray
in interface Tensor<java.lang.Boolean>
public int[] asFlatIntegerArray()
asFlatIntegerArray
in interface Tensor<java.lang.Boolean>
public java.lang.Boolean[] asFlatArray()
asFlatArray
in interface Tensor<java.lang.Boolean>