Uses of Interface
org.nd4j.linalg.indexing.conditions.Condition
-
-
Uses of Condition in org.nd4j.autodiff.samediff.ops
Methods in org.nd4j.autodiff.samediff.ops with parameters of type Condition Modifier and Type Method Description SDVariableSDMath. firstIndex(String name, SDVariable in, Condition condition, boolean keepDims, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. firstIndex(String name, SDVariable in, Condition condition, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. firstIndex(SDVariable in, Condition condition, boolean keepDims, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. firstIndex(SDVariable in, Condition condition, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. lastIndex(String name, SDVariable in, Condition condition, boolean keepDims, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. lastIndex(String name, SDVariable in, Condition condition, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. lastIndex(SDVariable in, Condition condition, boolean keepDims, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDMath. lastIndex(SDVariable in, Condition condition, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDBaseOps. matchCondition(String name, SDVariable in, Condition condition)Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwiseSDVariableSDBaseOps. matchCondition(SDVariable in, Condition condition)Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwiseSDVariableSDBaseOps. matchConditionCount(String name, SDVariable in, Condition condition)Returns a count of the number of elements that satisfy the conditionSDVariableSDBaseOps. matchConditionCount(String name, SDVariable in, Condition condition, boolean keepDim, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDBaseOps. matchConditionCount(String name, SDVariable in, Condition condition, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDBaseOps. matchConditionCount(SDVariable in, Condition condition)Returns a count of the number of elements that satisfy the conditionSDVariableSDBaseOps. matchConditionCount(SDVariable in, Condition condition, boolean keepDim, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDBaseOps. matchConditionCount(SDVariable in, Condition condition, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.SDVariableSDBaseOps. replaceWhere(String name, SDVariable update, double value, Condition condition)Element-wise replace where condition:
out[i] = value if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedSDVariableSDBaseOps. replaceWhere(String name, SDVariable update, SDVariable from, Condition condition)Element-wise replace where condition:
out[i] = from[i] if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedSDVariableSDBaseOps. replaceWhere(SDVariable update, double value, Condition condition)Element-wise replace where condition:
out[i] = value if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedSDVariableSDBaseOps. replaceWhere(SDVariable update, SDVariable from, Condition condition)Element-wise replace where condition:
out[i] = from[i] if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfied -
Uses of Condition in org.nd4j.linalg.api.ndarray
Methods in org.nd4j.linalg.api.ndarray with parameters of type Condition Modifier and Type Method Description INDArrayBaseNDArray. assignIf(INDArray arr, Condition condition)INDArrayINDArray. assignIf(INDArray arr, Condition condition)Assign all elements from given ndarray that are matching given condition, ndarray to this ndarrayINDArrayBaseNDArray. cond(Condition condition)INDArrayINDArray. cond(Condition condition)Returns a binary INDArray with value 'true' if the element matches the specified condition and 'false' otherwiseINDArrayBaseNDArray. getWhere(Number comp, Condition condition)INDArrayBaseNDArray. getWhere(INDArray comp, Condition condition)INDArrayINDArray. getWhere(Number comp, Condition condition)Boolean indexing: Return the element if it fulfills the condition in result arrayINDArrayINDArray. getWhere(INDArray comp, Condition condition)Boolean indexing: Return the element if it fulfills the condition in result arrayINDArrayBaseNDArray. match(Number comp, Condition condition)INDArrayBaseNDArray. match(INDArray comp, Condition condition)INDArrayINDArray. match(Number comp, Condition condition)Returns a maskINDArrayINDArray. match(INDArray comp, Condition condition)Return a mask on whether each element matches the given conditionINDArrayBaseNDArray. putWhere(Number comp, Number put, Condition condition)INDArrayBaseNDArray. putWhere(Number comp, INDArray put, Condition condition)INDArrayBaseNDArray. putWhere(INDArray comp, INDArray put, Condition condition)INDArrayINDArray. putWhere(Number comp, Number put, Condition condition)Assign the element according to the comparison arrayINDArrayINDArray. putWhere(Number comp, INDArray put, Condition condition)Assign the element according to the comparison arrayINDArrayINDArray. putWhere(INDArray comp, INDArray put, Condition condition)Assign the element according to the comparison arrayINDArrayBaseNDArray. replaceWhere(INDArray arr, Condition condition)INDArrayINDArray. replaceWhere(INDArray arr, Condition condition)Replaces all elements in this ndarray that are matching give condition, with corresponding elements from given arrayNumberBaseNDArray. scan(Condition condition)NumberINDArray. scan(Condition condition)This method takes boolean condition, and returns number of elements matching this condition -
Uses of Condition in org.nd4j.linalg.api.ops.impl.indexaccum
Fields in org.nd4j.linalg.api.ops.impl.indexaccum declared as Condition Modifier and Type Field Description protected ConditionFirstIndex. conditionprotected ConditionLastIndex. conditionConstructors in org.nd4j.linalg.api.ops.impl.indexaccum with parameters of type Condition Constructor Description FirstIndex(SameDiff sameDiff, SDVariable i_v, boolean keepDims, Condition condition, int... dimensions)FirstIndex(SameDiff sameDiff, SDVariable i_v, Condition condition, boolean keepDims, int... dimensions)FirstIndex(INDArray x, boolean keepDims, @NonNull Condition condition, int... dimension)FirstIndex(INDArray x, @NonNull Condition condition, boolean keepDims, int... dimension)FirstIndex(INDArray x, @NonNull Condition condition, double eps, int... dimension)FirstIndex(INDArray x, @NonNull Condition condition, int... dimension)LastIndex(SameDiff sameDiff, SDVariable i_v, boolean keepDims, Condition condition, int... dimensions)LastIndex(SameDiff sameDiff, SDVariable x, @NonNull Condition condition, int... dimensions)LastIndex(SameDiff sameDiff, SDVariable i_v, Condition condition, boolean keepDims, int... dimensions)LastIndex(INDArray in, boolean keepDim, Condition condition, int... dimensions)LastIndex(INDArray x, @NonNull Condition condition, boolean keepDim, int... dimensions)LastIndex(INDArray x, @NonNull Condition condition, double eps, int... dimensions)LastIndex(INDArray x, @NonNull Condition condition, int... dimensions) -
Uses of Condition in org.nd4j.linalg.api.ops.impl.reduce.longer
Constructors in org.nd4j.linalg.api.ops.impl.reduce.longer with parameters of type Condition Constructor Description MatchCondition(SameDiff sameDiff, SDVariable in, Condition condition)MatchCondition(SameDiff sameDiff, SDVariable in, Condition condition, boolean keepDims, int... dimensions)MatchCondition(INDArray x, double eps, Condition condition, int... dimensions)MatchCondition(INDArray x, Condition condition, boolean keepDims, int... dimensions)MatchCondition(INDArray x, Condition condition, int... dimensions) -
Uses of Condition in org.nd4j.linalg.api.ops.impl.transforms.bool
Constructors in org.nd4j.linalg.api.ops.impl.transforms.bool with parameters of type Condition Constructor Description MatchConditionTransform(@NonNull INDArray x, @NonNull INDArray y, @NonNull INDArray z, @NonNull Condition condition)MatchConditionTransform(@NonNull INDArray x, @NonNull INDArray z, @NonNull Condition condition)MatchConditionTransform(SameDiff sameDiff, SDVariable in, Condition condition)MatchConditionTransform(INDArray x, double eps, @NonNull Condition condition)MatchConditionTransform(INDArray x, @NonNull Condition condition)MatchConditionTransform(INDArray x, INDArray z, double eps, @NonNull Condition condition) -
Uses of Condition in org.nd4j.linalg.api.ops.impl.transforms.comparison
Constructors in org.nd4j.linalg.api.ops.impl.transforms.comparison with parameters of type Condition Constructor Description CompareAndReplace(SameDiff sameDiff, SDVariable to, SDVariable from, Condition condition)CompareAndReplace(INDArray x, INDArray y, INDArray z, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise Pseudocode: z[i] = condition(x[i]) ? y[i] : x[i];CompareAndReplace(INDArray x, INDArray y, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise PLEASE NOTE: X will be modified inplace.CompareAndSet(SameDiff sameDiff, SDVariable to, Number set, Condition condition)CompareAndSet(INDArray x, double compare, double set, double eps, Condition condition)CompareAndSet(INDArray x, double set, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element will be replaced with Set value Pseudocode: z[i] = condition(x[i]) ? set : x[i]; PLEASE NOTE: X will be modified inplace.CompareAndSet(INDArray x, INDArray z, double set, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element will be replaced with Set value Pseudocode: z[i] = condition(x[i]) ? set : x[i];CompareAndSet(INDArray x, INDArray y, INDArray z, Condition condition)With this constructor, op will check each Y element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise Pseudocode: z[i] = condition(y[i]) ? y[i] : x[i];CompareAndSet(INDArray x, INDArray y, Condition condition)With this constructor, op will check each Y element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise PLEASE NOTE: X will be modified inplace. -
Uses of Condition in org.nd4j.linalg.api.ops.impl.transforms.custom
Constructors in org.nd4j.linalg.api.ops.impl.transforms.custom with parameters of type Condition Constructor Description Choose(String opName, INDArray[] inputs, Condition condition)Choose(SameDiff sameDiff, SDVariable[] args, Condition condition)Choose(INDArray[] inputs, List<Integer> iArgs, List<Double> tArgs, Condition condition)Note that iArgs (integer arguments) and tArgs(double/float arguments) may end up being used under the following conditions: scalar operations (if a scalar is specified the you do not need to specify an ndarray) otherwise, if an ndarray is needed as a second input then put it in the inputs Usually, you only need 1 input (the equivalent of the array you're trying to do indexing on)Choose(INDArray[] inputs, Condition condition) -
Uses of Condition in org.nd4j.linalg.factory.ops
Methods in org.nd4j.linalg.factory.ops with parameters of type Condition Modifier and Type Method Description INDArrayNDMath. firstIndex(INDArray in, Condition condition, boolean keepDims, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. firstIndex(INDArray in, Condition condition, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. lastIndex(INDArray in, Condition condition, boolean keepDims, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. lastIndex(INDArray in, Condition condition, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. matchCondition(INDArray in, Condition condition)Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwiseINDArrayNDBase. matchConditionCount(INDArray in, Condition condition)Returns a count of the number of elements that satisfy the conditionINDArrayNDBase. matchConditionCount(INDArray in, Condition condition, boolean keepDim, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. matchConditionCount(INDArray in, Condition condition, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. replaceWhere(INDArray update, double value, Condition condition)Element-wise replace where condition:
out[i] = value if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedINDArrayNDBase. replaceWhere(INDArray update, INDArray from, Condition condition)Element-wise replace where condition:
out[i] = from[i] if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfied -
Uses of Condition in org.nd4j.linalg.indexing
Methods in org.nd4j.linalg.indexing with parameters of type Condition Modifier and Type Method Description static booleanBooleanIndexing. and(INDArray n, Condition cond)And over the whole ndarray given some conditionstatic boolean[]BooleanIndexing. and(INDArray n, Condition condition, int... dimension)And over the whole ndarray given some condition, with respect to dimensionsstatic voidBooleanIndexing. assignIf(@NonNull INDArray to, @NonNull INDArray from, @NonNull Condition condition)This method does element-wise comparison for 2 equal-sized matrices, for each element that matches Condition.static INDArrayBooleanIndexing. chooseFrom(@NonNull INDArray[] input, @NonNull List<Double> tArgs, @NonNull List<Integer> iArgs, @NonNull Condition condition)Choose from the inputs based on the given condition.static INDArrayBooleanIndexing. chooseFrom(@NonNull INDArray[] input, @NonNull Condition condition)Choose from the inputs based on the given condition.static INDArrayBooleanIndexing. firstIndex(INDArray array, Condition condition)This method returns first index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't metstatic INDArrayBooleanIndexing. firstIndex(INDArray array, Condition condition, int... dimension)This method returns first index matching given condition along given dimensions PLEASE NOTE: This method will return -1 values for missing conditionsstatic INDArrayBooleanIndexing. lastIndex(INDArray array, Condition condition)This method returns last index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't metstatic INDArrayBooleanIndexing. lastIndex(INDArray array, Condition condition, int... dimension)This method returns first index matching given condition along given dimensions PLEASE NOTE: This method will return -1 values for missing conditionsstatic booleanBooleanIndexing. or(INDArray n, Condition cond)Or over the whole ndarray given some conditionstatic boolean[]BooleanIndexing. or(INDArray n, Condition condition, int... dimension)Or over the whole ndarray given some condition, with respect to dimensionsstatic voidBooleanIndexing. replaceWhere(@NonNull INDArray to, @NonNull Number set, @NonNull Condition condition)This method does element-wise assessing for 2 equal-sized matrices, for each element that matches Conditionstatic voidBooleanIndexing. replaceWhere(@NonNull INDArray to, @NonNull INDArray from, @NonNull Condition condition)This method does element-wise comparison for 2 equal-sized matrices, for each element that matches Condition -
Uses of Condition in org.nd4j.linalg.indexing.conditions
Classes in org.nd4j.linalg.indexing.conditions that implement Condition Modifier and Type Class Description classAbsoluteEqualsclassAbsValueGreaterOrEqualsThanclassAbsValueGreaterThanclassAbsValueLessOrEqualsThanclassAbsValueLessThanclassAndclassBaseConditionclassConditionEqualsclassEpsilonEqualsclassEpsilonNotEqualsclassEqualsConditionclassGreaterThanclassGreaterThanOrEqualclassIsFiniteclassIsInfiniteclassIsNaNclassLessThanclassLessThanOrEqualclassNotclassNotEqualsConditionclassNotFiniteclassOrMethods in org.nd4j.linalg.indexing.conditions that return Condition Modifier and Type Method Description static ConditionConditions. absEquals()This method will create Condition that checks if the absolute value of x is equal to 0.0 PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. absEquals(double value)This method will create Condition that checks if the absolute value of x is equal to the specified value.static ConditionConditions. absGreaterThan()This method will create Condition that checks if value is value X is greater than value Y in absolute values PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. absGreaterThan(Number value)This method will create Condition that checks if value is value X is greater than value Y in absolute valuesstatic ConditionConditions. absGreaterThanOrEqual()This method will create Condition that checks if value is value X is greater than or equal to value Y in absolute values PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. absGreaterThanOrEqual(Number value)This method will create Condition that checks if value is value X is greater than or equal to value Y in absolute valuesstatic ConditionConditions. absLessThan()This method will create Condition that checks if value is value X is less than value Y in absolute values PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. absLessThan(Number value)This method will create Condition that checks if value is value X is less than value Y in absolute valuesstatic ConditionConditions. absLessThanOrEqual()This method will create Condition that checks if value is value X is less than or equal to value Y in absolute values PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. absLessThanOrEqual(Number value)This method will create Condition that checks if value is value X is less than or equal to value Y in absolute valuesConditionConditionBuilder. build()static ConditionConditions. epsEquals()This method will create Condition that checks if value is two values are equal wrt eps PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. epsEquals(Number value)This method will create Condition that checks if value is two values are equal wrt epsstatic ConditionConditions. epsEquals(Number value, Number epsilon)This method will create Condition that checks if value is two values are equal wrt epsstatic ConditionConditions. epsNotEquals()This method will create Condition that checks if value is two values are not equal wrt eps PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. epsNotEquals(Number value)This method will create Condition that checks if value is two values are not equal wrt epsstatic ConditionConditions. equals()This method will create Condition that checks if value is two values are equal PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. equals(Number value)This method will create Condition that checks if value is two values are equalstatic ConditionConditions. fromInt(int mode)static ConditionConditions. fromInt(int mode, Double value)static ConditionConditions. greaterThan()This method will create Condition that checks if value is value X is greater than value Y PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. greaterThan(Number value)This method will create Condition that checks if value is value X is greater than value Ystatic ConditionConditions. greaterThanOrEqual()This method will create Condition that checks if value is value X is greater than or equal to value Y PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. greaterThanOrEqual(Number value)This method will create Condition that checks if value is value X is greater than or equal to value Ystatic ConditionConditions. isFinite()This method will create Condition that checks if value is finitestatic ConditionConditions. isInfinite()This method will create Condition that checks if value is infinitestatic ConditionConditions. isNan()This method will create Condition that checks if value is NaNstatic ConditionConditions. lessThan()This method will create Condition that checks if value is value X is less than value Y PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. lessThan(Number value)This method will create Condition that checks if value is value X is less than value Ystatic ConditionConditions. lessThanOrEqual()This method will create Condition that checks if value is value X is less than or equal to value Y PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. lessThanOrEqual(Number value)This method will create Condition that checks if value is value X is less than or equal to value Ystatic ConditionConditions. notEquals()This method will create Condition that checks if value is two values are not equal PLEASE NOTE: This condition should be used only with pairwise methods, i.e.static ConditionConditions. notEquals(Number value)This method will create Condition that checks if value is two values are not equalstatic ConditionConditions. notFinite()This method will create Condition that checks if value is NOT finiteMethods in org.nd4j.linalg.indexing.conditions with parameters of type Condition Modifier and Type Method Description ConditionBuilderConditionBuilder. and(Condition... conditions)ConditionBuilderConditionBuilder. eq(Condition... conditions)ConditionBuilderConditionBuilder. or(Condition... conditions)Constructors in org.nd4j.linalg.indexing.conditions with parameters of type Condition Constructor Description And(Condition... conditions)ConditionEquals(Condition... conditions)Not(Condition condition)Or(Condition... conditions)
-