Class Infos


  • public final class Infos
    extends Object
    Utility methods for working with OpInfos.
    Author:
    Curtis Rueden, David Kolb, Gabriel Selzer
    • Method Detail

      • parseNames

        public static String[] parseNames​(String names)
        Parses op names contained in specified String according to the following format:
          'prefix1'.'prefix2' , 'prefix1'.'prefix3'
         
        E.g. "math.add, math.pow".

        The name delimiter is a comma (,). Furthermore, names without prefixes are added. The above example will result in the following output:

          [math.add, add, math.pow, pow]
         
        Parameters:
        names - the string containing the names to parse
        Returns:
        an array of parsed Op names
      • validate

        public static void validate​(OpInfo info)
        Asserts common requirements for an OpInfo to be valid
        Parameters:
        info - the OpInfo to validate
      • IOIndex

        public static int IOIndex​(OpInfo info)
        Returns the index of the argument that is both the input and the output. If there is no such argument (i.e. the Op produces a pure output), -1 is returned
        Returns:
        the index of the mutable argument.
      • hasPureOutput

        public static boolean hasPureOutput​(OpInfo info)
      • describe

        public static String describe​(OpInfo info)
        Forms a verbose description of info
        Parameters:
        info - an OpInfo
        Returns:
        a verbose description of info