Modifier and Type | Method and Description |
---|---|
SDVariable |
DifferentialFunctionFactory.firstIndex(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions) |
SDVariable |
DifferentialFunctionFactory.lastIndex(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions) |
SDVariable |
DifferentialFunctionFactory.matchCondition(SDVariable in,
Condition condition)
Returns a boolean mask of equal shape to the input, where the condition is satisfied
|
SDVariable |
DifferentialFunctionFactory.matchConditionCount(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions)
Returns a count of the number of elements that satisfy the condition
|
SDVariable |
DifferentialFunctionFactory.replaceWhere(SDVariable to,
Number set,
Condition condition) |
SDVariable |
DifferentialFunctionFactory.replaceWhere(SDVariable to,
SDVariable from,
Condition condition) |
Modifier and Type | Method and Description |
---|---|
SDVariable |
SDMath.firstIndex(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions) |
SDVariable |
SDMath.firstIndex(SDVariable in,
Condition condition,
int... dimensions) |
SDVariable |
SDMath.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. |
SDVariable |
SDMath.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) |
SDVariable |
SDMath.lastIndex(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions) |
SDVariable |
SDMath.lastIndex(SDVariable in,
Condition condition,
int... dimensions) |
SDVariable |
SDMath.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. |
SDVariable |
SDMath.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) |
SDVariable |
SDBaseOps.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 otherwise
|
SDVariable |
SDBaseOps.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 otherwise
|
SDVariable |
SDBaseOps.matchConditionCount(SDVariable in,
Condition condition)
Returns a count of the number of elements that satisfy the condition
|
SDVariable |
SDBaseOps.matchConditionCount(String name,
SDVariable in,
Condition condition)
Returns a count of the number of elements that satisfy the condition
|
SDVariable |
SDBaseOps.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. |
SDVariable |
SDBaseOps.replaceWhere(SDVariable update,
Number 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 satisfied |
SDVariable |
SDBaseOps.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 |
SDVariable |
SDBaseOps.replaceWhere(String name,
SDVariable update,
Number 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 satisfied |
SDVariable |
SDBaseOps.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 satisfied |
Modifier and Type | Method and Description |
---|---|
INDArray |
INDArray.assignIf(INDArray arr,
Condition condition)
Assign all elements from given ndarray that are matching given condition,
ndarray to this ndarray
|
INDArray |
BaseNDArray.assignIf(INDArray arr,
Condition condition) |
INDArray |
INDArray.cond(Condition condition)
Returns a binary INDArray with value 'true' if the element matches the specified condition and 'false' otherwise
|
INDArray |
BaseNDArray.cond(Condition condition) |
INDArray |
INDArray.getWhere(INDArray comp,
Condition condition)
Boolean indexing:
Return the element if it fulfills the condition in
result array
|
INDArray |
BaseNDArray.getWhere(INDArray comp,
Condition condition) |
INDArray |
INDArray.getWhere(Number comp,
Condition condition)
Boolean indexing:
Return the element if it fulfills the condition in
result array
|
INDArray |
BaseNDArray.getWhere(Number comp,
Condition condition) |
INDArray |
INDArray.match(INDArray comp,
Condition condition)
Return a mask on whether each element matches the given condition
|
INDArray |
BaseNDArray.match(INDArray comp,
Condition condition) |
INDArray |
INDArray.match(Number comp,
Condition condition)
Returns a mask
|
INDArray |
BaseNDArray.match(Number comp,
Condition condition) |
INDArray |
INDArray.putWhere(INDArray comp,
INDArray put,
Condition condition)
Assign the element according to the comparison array
|
INDArray |
BaseNDArray.putWhere(INDArray comp,
INDArray put,
Condition condition) |
INDArray |
INDArray.putWhere(Number comp,
INDArray put,
Condition condition)
Assign the element according to the comparison array
|
INDArray |
BaseNDArray.putWhere(Number comp,
INDArray put,
Condition condition) |
INDArray |
INDArray.putWhere(Number comp,
Number put,
Condition condition)
Assign the element according to the comparison array
|
INDArray |
BaseNDArray.putWhere(Number comp,
Number put,
Condition condition) |
INDArray |
INDArray.replaceWhere(INDArray arr,
Condition condition)
Replaces all elements in this ndarray that are matching give condition, with corresponding elements from given array
|
INDArray |
BaseNDArray.replaceWhere(INDArray arr,
Condition condition) |
Number |
INDArray.scan(Condition condition)
This method takes boolean condition, and returns number of elements matching this condition
|
Number |
BaseNDArray.scan(Condition condition) |
Modifier and Type | Field and Description |
---|---|
protected Condition |
LastIndex.condition |
protected Condition |
FirstIndex.condition |
Constructor and Description |
---|
FirstIndex(INDArray x,
Condition condition,
boolean keepDims,
int... dimension) |
FirstIndex(INDArray x,
Condition condition,
double eps,
int... dimension) |
FirstIndex(INDArray x,
Condition condition,
int... dimension) |
FirstIndex(SameDiff sameDiff,
SDVariable i_v,
Condition condition,
boolean keepDims,
int... dimensions) |
LastIndex(INDArray x,
Condition condition,
boolean keepDim,
int... dimensions) |
LastIndex(INDArray x,
Condition condition,
double eps,
int... dimensions) |
LastIndex(INDArray x,
Condition condition,
int... dimensions) |
LastIndex(SameDiff sameDiff,
SDVariable i_v,
Condition condition,
boolean keepDims,
int... dimensions) |
Constructor and Description |
---|
MatchCondition(INDArray x,
Condition condition,
int... dimensions) |
MatchCondition(INDArray x,
double eps,
Condition condition,
int... dimensions) |
MatchCondition(SameDiff sameDiff,
SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions) |
Constructor and Description |
---|
MatchConditionTransform(INDArray x,
Condition condition) |
MatchConditionTransform(INDArray x,
double eps,
Condition condition) |
MatchConditionTransform(INDArray x,
INDArray z,
Condition condition) |
MatchConditionTransform(INDArray x,
INDArray z,
double eps,
Condition condition) |
MatchConditionTransform(INDArray x,
INDArray y,
INDArray z,
Condition condition) |
MatchConditionTransform(SameDiff sameDiff,
SDVariable in,
Condition condition) |
Constructor and Description |
---|
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.
|
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(SameDiff sameDiff,
SDVariable to,
SDVariable from,
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,
double compare,
double set,
double eps,
Condition condition) |
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.
|
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(SameDiff sameDiff,
SDVariable to,
Number set,
Condition condition) |
Constructor and Description |
---|
Choose(INDArray[] inputs,
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(SameDiff sameDiff,
SDVariable[] args,
Condition condition) |
Choose(String opName,
INDArray[] inputs,
Condition condition) |
Modifier and Type | Method and Description |
---|---|
INDArray |
NDMath.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. |
INDArray |
NDMath.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. |
INDArray |
NDMath.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. |
INDArray |
NDMath.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. |
Modifier and Type | Method and Description |
---|---|
static boolean |
BooleanIndexing.and(INDArray n,
Condition cond)
And over the whole ndarray given some condition
|
static boolean[] |
BooleanIndexing.and(INDArray n,
Condition condition,
int... dimension)
And over the whole ndarray given some condition, with respect to dimensions
|
static void |
BooleanIndexing.assignIf(INDArray to,
INDArray from,
Condition condition)
This method does element-wise comparison
for 2 equal-sized matrices, for each element that matches Condition.
|
static INDArray |
BooleanIndexing.chooseFrom(INDArray[] input,
Condition condition)
Choose from the inputs based on the given condition.
|
static INDArray |
BooleanIndexing.chooseFrom(INDArray[] input,
List<Double> tArgs,
List<Integer> iArgs,
Condition condition)
Choose from the inputs based on the given condition.
|
static INDArray |
BooleanIndexing.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 met
|
static INDArray |
BooleanIndexing.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 conditions
|
static INDArray |
BooleanIndexing.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 met
|
static INDArray |
BooleanIndexing.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 conditions
|
static boolean |
BooleanIndexing.or(INDArray n,
Condition cond)
Or over the whole ndarray given some condition
|
static boolean[] |
BooleanIndexing.or(INDArray n,
Condition condition,
int... dimension)
Or over the whole ndarray given some condition, with respect to dimensions
|
static void |
BooleanIndexing.replaceWhere(INDArray to,
INDArray from,
Condition condition)
This method does element-wise comparison for 2 equal-sized matrices, for each element that matches Condition
|
static void |
BooleanIndexing.replaceWhere(INDArray to,
Number set,
Condition condition)
This method does element-wise assessing for 2 equal-sized matrices, for each element that matches Condition
|
Modifier and Type | Class and Description |
---|---|
class |
AbsValueGreaterOrEqualsThan
Boolean condition on absolute value: abs(x) >= value
|
class |
AbsValueGreaterThan
Boolean condition on absolute value: abs(x) > value
|
class |
AbsValueLessOrEqualsThan
Boolean condition on absolute value: abs(x) <= value
|
class |
AbsValueLessThan
Boolean condition on absolute value: abs(x) < value
|
class |
And
Created by agibsonccc on 10/9/14.
|
class |
BaseCondition
Created by agibsonccc on 10/8/14.
|
class |
ConditionEquals
Returns true when all of the conditions equal each other
|
class |
EpsilonEquals
Created by agibsonccc on 10/8/14.
|
class |
EpsilonNotEquals
Created by agibsonccc on 10/8/14.
|
class |
EqualsCondition
Created by agibsonccc on 10/8/14.
|
class |
GreaterThan
Created by agibsonccc on 10/8/14.
|
class |
GreaterThanOrEqual
Created by agibsonccc on 10/8/14.
|
class |
IsFinite
Created by agibsonccc on 10/8/14.
|
class |
IsInfinite
Created by agibsonccc on 10/8/14.
|
class |
IsNaN
Condition for whether an element is NaN
|
class |
LessThan
Created by agibsonccc on 10/8/14.
|
class |
LessThanOrEqual
Created by agibsonccc on 10/8/14.
|
class |
Not
Created by agibsonccc on 10/9/14.
|
class |
NotEqualsCondition
Created by agibsonccc on 10/8/14.
|
class |
NotFinite
Created by agibsonccc on 10/8/14.
|
class |
Or
An or between 2 conditions.
|
Modifier and Type | Method and Description |
---|---|
static Condition |
Conditions.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 Condition |
Conditions.absGreaterThan(Number value)
This method will create Condition that checks if value is value X is greater than value Y in absolute values
|
static Condition |
Conditions.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 Condition |
Conditions.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 values
|
static Condition |
Conditions.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 Condition |
Conditions.absLessThan(Number value)
This method will create Condition that checks if value is value X is less than value Y in absolute values
|
static Condition |
Conditions.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 Condition |
Conditions.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 values
|
Condition |
ConditionBuilder.build() |
static Condition |
Conditions.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 Condition |
Conditions.epsEquals(Number value)
This method will create Condition that checks if value is two values are equal wrt eps
|
static Condition |
Conditions.epsEquals(Number value,
Number epsilon)
This method will create Condition that checks if value is two values are equal wrt eps
|
static Condition |
Conditions.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 Condition |
Conditions.epsNotEquals(Number value)
This method will create Condition that checks if value is two values are not equal wrt eps
|
static Condition |
Conditions.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 Condition |
Conditions.equals(Number value)
This method will create Condition that checks if value is two values are equal
|
static Condition |
Conditions.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 Condition |
Conditions.greaterThan(Number value)
This method will create Condition that checks if value is value X is greater than value Y
|
static Condition |
Conditions.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 Condition |
Conditions.greaterThanOrEqual(Number value)
This method will create Condition that checks if value is value X is greater than or equal to value Y
|
static Condition |
Conditions.isFinite()
This method will create Condition that checks if value is finite
|
static Condition |
Conditions.isInfinite()
This method will create Condition that checks if value is infinite
|
static Condition |
Conditions.isNan()
This method will create Condition that checks if value is NaN
|
static Condition |
Conditions.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 Condition |
Conditions.lessThan(Number value)
This method will create Condition that checks if value is value X is less than value Y
|
static Condition |
Conditions.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 Condition |
Conditions.lessThanOrEqual(Number value)
This method will create Condition that checks if value is value X is less than or equal to value Y
|
static Condition |
Conditions.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 Condition |
Conditions.notEquals(Number value)
This method will create Condition that checks if value is two values are not equal
|
static Condition |
Conditions.notFinite()
This method will create Condition that checks if value is NOT finite
|
Modifier and Type | Method and Description |
---|---|
ConditionBuilder |
ConditionBuilder.and(Condition... conditions) |
ConditionBuilder |
ConditionBuilder.eq(Condition... conditions) |
ConditionBuilder |
ConditionBuilder.or(Condition... conditions) |
Constructor and Description |
---|
And(Condition... conditions) |
ConditionEquals(Condition... conditions) |
Not(Condition condition) |
Or(Condition... conditions) |
Copyright © 2019. All rights reserved.