conditionalFilter#

swordfish.function.conditionalFilter()#

Return true if both of the following conditions are satisfied, otherwise return false.

  • An element in the vector condition is a key to the dictionary filterMap;

  • The corresponding element in X is one of the elements of the key's value in the dictionary filterMap.

If both X and condition are vectors, the result is a vector of the same length as X.

参数:
  • X (Constant) -- A scalar/vector.

  • condition (Constant) -- A scalar or a vector of the same length as X.

  • filterMap (Constant) -- A dictionary indicating the filtering conditions.