Class OpPredicate

    • Constructor Detail

      • OpPredicate

        public OpPredicate()
    • Method Detail

      • matches

        public abstract boolean matches​(SameDiff sameDiff,
                                        DifferentialFunction function)
        Parameters:
        sameDiff - SameDiff instance the function belongs to
        function -
        Returns:
        Returns whether the specific function matches the predicate
      • nameEquals

        public static OpPredicate nameEquals​(String name)
        Return true if the operation own (user specified) name equals the specified name
      • opNameEquals

        public static OpPredicate opNameEquals​(String opName)
        Return true if the operation name (i.e., "add", "mul", etc - not the user specified name) equals the specified name
      • nameMatches

        public static OpPredicate nameMatches​(String regex)
        Return true if the operation own (user specified) name matches the specified regular expression
      • opNameMatches

        public static OpPredicate opNameMatches​(String regex)
        Return true if the operation name (i.e., "add", "mul", etc - not the user specified name) matches the specified regular expression
      • classEquals

        public static OpPredicate classEquals​(Class<?> c)
        Return true if the operation class is equal to the specified class