Class Graph6Sparse6Importer<V,​E>

  • Type Parameters:
    V - graph vertex type
    E - graph edge type
    All Implemented Interfaces:
    GraphImporter<V,​E>

    @Deprecated
    public class Graph6Sparse6Importer<V,​E>
    extends Object
    implements GraphImporter<V,​E>
    Deprecated.
    Importer which reads graphs in graph6 or sparse6 format. A description of the format can be found here. graph6 and sparse6 are formats for storing undirected graphs in a compact manner, using only printable ASCII characters. Files in these formats have text Format and contain one line per graph. graph6 is suitable for small graphs, or large dense graphs. sparse6 is more space-efficient for large sparse graphs. Typically, files storing graph6 graphs have the 'g6' extension. Similarly, files storing sparse6 graphs have a 's6' file extension. sparse6 graphs support loops and multiple edges, graph6 graphs do not.
    Author:
    Joris Kinable
    • Field Detail

      • vertexProvider

        protected VertexProvider<V> vertexProvider
        Deprecated.
        Constructs new vertices
      • edgeProvider

        protected EdgeProvider<V,​E> edgeProvider
        Deprecated.
        Constructs new edges
      • vertexUpdater

        protected ComponentUpdater<V> vertexUpdater
        Deprecated.
        Updates already constructed vertices
      • graphUpdater

        protected ComponentUpdater<Graph<V,​E>> graphUpdater
        Deprecated.
        Updates graph properties
    • Constructor Detail

      • Graph6Sparse6Importer

        public Graph6Sparse6Importer​(VertexProvider<V> vertexProvider,
                                     EdgeProvider<V,​E> edgeProvider,
                                     double defaultWeight)
        Deprecated.
        Construct a new Graph6Sparse6Importer
        Parameters:
        vertexProvider - provider for the generation of vertices. Must not be null.
        edgeProvider - provider for the generation of edges. Must not be null.
        defaultWeight - default edge weight
      • Graph6Sparse6Importer

        public Graph6Sparse6Importer​(VertexProvider<V> vertexProvider,
                                     EdgeProvider<V,​E> edgeProvider)
        Deprecated.
        Construct a new Graph6Sparse6Importer
        Parameters:
        vertexProvider - provider for the generation of vertices. Must not be null.
        edgeProvider - provider for the generation of edges. Must not be null.
    • Method Detail

      • importGraph

        public void importGraph​(Graph<V,​E> g,
                                String g6)
                         throws ImportException
        Deprecated.
        Import the graph represented by a String in graph6 or sparse6 encoding.
        Parameters:
        g - the graph
        g6 - String representation of a graph either in graph6 or sparse6 format. WARNING: a g6/s6 string may contain backslashes '\'. Escaping is required when invoking this method directly. E.g.
         importgraph(g,":?@MnDA\oi")
                
        may result in undefined behavior. This should have been:
         importgraph(g,":?@MnDA\\oi")
                
        Throws:
        ImportException - in case any error occurs, such as I/O or parse error
      • getVertexProvider

        public VertexProvider<V> getVertexProvider()
        Deprecated.
        Get the vertex provider
        Returns:
        the vertex provider
      • setVertexProvider

        public void setVertexProvider​(VertexProvider<V> vertexProvider)
        Deprecated.
        Set the vertex provider
        Parameters:
        vertexProvider - the new vertex provider. Must not be null.
      • getEdgeProvider

        public EdgeProvider<V,​E> getEdgeProvider()
        Deprecated.
        Get the edge provider
        Returns:
        The edge provider
      • setEdgeProvider

        public void setEdgeProvider​(EdgeProvider<V,​E> edgeProvider)
        Deprecated.
        Set the edge provider.
        Parameters:
        edgeProvider - the new edge provider. Must not be null.
      • getVertexUpdater

        public ComponentUpdater<V> getVertexUpdater()
        Deprecated.
        Get the vertex updater
        Returns:
        the vertex updater
      • setVertexUpdater

        public void setVertexUpdater​(ComponentUpdater<V> vertexUpdater)
        Deprecated.
        Set the vertex updater.
        Parameters:
        vertexUpdater - the new vertex updater. Must not be null.
      • getGraphUpdater

        public ComponentUpdater<Graph<V,​E>> getGraphUpdater()
        Deprecated.
        Get the graph updater.
        Returns:
        the graph updater
      • setGraphUpdater

        public void setGraphUpdater​(ComponentUpdater<Graph<V,​E>> graphUpdater)
        Deprecated.
        Set the graph updater.
        Parameters:
        graphUpdater - the new graph updater. Must not be null.