Class AbstractLinePathConnector

    • Constructor Detail

      • AbstractLinePathConnector

        public AbstractLinePathConnector()
    • Method Detail

      • connect

        public void connect​(java.lang.Iterable<? extends LineConvexSubset> subsets)
        Add a collection of line subsets to the connector and attempt to connect each new line subset with existing subsets. Connections made at this time will not be overwritten by subsequent calls to this or other connection methods. (eg, connectAll()).

        The connector is not reset by this call. Additional line subsets can still be added to the current set of paths.

        Parameters:
        subsets - line subsets to connect
        See Also:
        connectAll()
      • connectAll

        public java.util.List<LinePath> connectAll​(java.lang.Iterable<LineConvexSubset> subsets)
        Add the given line subsets to this instance and connect all current subsets into connected paths. This call is equivalent to
              connector.add(subsets);
              List<LinePath> result = connector.connectAll();
         

        The connector is reset after this call. Further calls to add or connect line subsets will result in new paths being generated.

        Parameters:
        subsets - line subsets to add
        Returns:
        the connected 2D paths
        See Also:
        add(Iterable), connectAll()
      • connectAll

        public java.util.List<LinePath> connectAll()
        Connect all current line subsets into connected paths, returning the result as a list of line paths.

        The connector is reset after this call. Further calls to add or connect line subsets will result in new paths being generated.

        Returns:
        the connected 2D paths