Package com.jgalgo

Class JGAlgoConfig


  • public class JGAlgoConfig
    extends Object
    A global configuration class.

    The class allow to configure multiple general options for the JGAlgo library, such as setParallelByDefault(boolean) for example. Upon the first algorithm that reads one of these options, the options values will 'freezed' as they are, and no more modifications are allowed. This is done to allow the best optimization of the compiler, for example to remove code that is not needed entirely.

    Author:
    Barak Ugav
    • Method Detail

      • setParallelByDefault

        public static void setParallelByDefault​(boolean enable)
        Enable/disable default parallel computations in all algorithms.

        The default value is true.

        Parameters:
        enable - if true, some algorithm will use parallel computations by default