Package com.jgalgo

Interface IndexGraph.Builder

    • Method Detail

      • build

        IndexGraph build()
        Create a new empty index graph.
        Returns:
        a new index graph with the builder options
      • setDirected

        IndexGraph.Builder setDirected​(boolean directed)
        Determine if graphs built by this builder should be directed or not.
        Parameters:
        directed - if true, graphs built by this builder will be directed
        Returns:
        this builder
      • expectedVerticesNum

        IndexGraph.Builder expectedVerticesNum​(int expectedVerticesNum)
        Set the expected number of vertices that will exist in the graph.
        Parameters:
        expectedVerticesNum - the expected number of vertices in the graph
        Returns:
        this builder
      • expectedEdgesNum

        IndexGraph.Builder expectedEdgesNum​(int expectedEdgesNum)
        Set the expected number of edges that will exist in the graph.
        Parameters:
        expectedEdgesNum - the expected number of edges in the graph
        Returns:
        this builder
      • addHint

        IndexGraph.Builder addHint​(Graph.Builder.Hint hint)
        Add a hint to this builder.

        Hints do not change the behavior of the graphs built by this builder, by may affect performance.

        Parameters:
        hint - the hint to add
        Returns:
        this builder
      • removeHint

        IndexGraph.Builder removeHint​(Graph.Builder.Hint hint)
        Remove a hint from this builder.

        Hints do not change the behavior of the graphs built by this builder, by may affect performance.

        Parameters:
        hint - the hint to remove
        Returns:
        this builder
      • setOption

        default BuilderType setOption​(String key,
                                      Object value)
        [TL;DR Don't call me!] Set an option.

        The builder might support different options to customize its implementation. These options never change the behavior of the algorithm, only its internal implementation. The possible options are not exposed as 'public' because they are not part of the API and may change in the future.

        These options are mainly for debug and benchmark purposes.

        Parameters:
        key - the option key
        value - the option value
        Returns:
        this builder