Package com.jgalgo

Interface TreePathMaxima.Queries

    • Method Detail

      • newInstance

        static TreePathMaxima.Queries newInstance()
        Create an empty queries container.
        Returns:
        a new queries container
      • addQuery

        void addQuery​(int u,
                      int v)
        Add a query for the heaviest edge in a tree between two vertices.
        Parameters:
        u - the first vertex
        v - the second vertex
      • getQuery

        IntIntPair getQuery​(int idx)
        Get a query by index.
        Parameters:
        idx - index of the query. Must be in range [0, size())
        Returns:
        pair with the two vertices of the query
        Throws:
        IndexOutOfBoundsException - if idx < 0 or idx >= size()
      • size

        int size()
        Get the number of queries in this container.
        Returns:
        the number of queries in this container
      • clear

        void clear()
        Clear the container from all existing queries.