public BreadthFirstChainDecomposition(int maxTreeSize, bool mergeSmallChains, bool startTreeWithMultipleVertices, TreeComponentStrategy treeComponentStrategy, Logger logger = null)
 {
     this.maxTreeSize      = maxTreeSize;
     this.mergeSmallChains = mergeSmallChains;
     this.startTreeWithMultipleVertices = startTreeWithMultipleVertices;
     this.treeComponentStrategy         = treeComponentStrategy;
     this.logger = logger ?? new Logger();
 }
 public ChainDecompositionMutation(int priority, List <Chain <TNode> > chains, int maxTreeSize, bool mergeSmallChains, bool startTreeWithMultipleVertices, TreeComponentStrategy treeComponentStrategy)
 {
     Priority         = priority;
     Chains           = chains;
     MaxTreeSize      = maxTreeSize;
     MergeSmallChains = mergeSmallChains;
     StartTreeWithMultipleVertices = startTreeWithMultipleVertices;
     TreeComponentStrategy         = treeComponentStrategy;
 }
 public BreadthFirstChainDecomposition(ChainDecompositionConfiguration configuration, Logger logger = null)
 {
     this.maxTreeSize      = configuration.MaxTreeSize;
     this.mergeSmallChains = configuration.MergeSmallChains;
     this.startTreeWithMultipleVertices = configuration.StartTreeWithMultipleVertices;
     this.treeComponentStrategy         = configuration.TreeComponentStrategy;
     this.preferSmallCycles             = configuration.PreferSmallCycles;
     this.logger = logger ?? new Logger();
 }
        private IMutation <TConfiguration> GetMutation(int priority, int maxTreeSize, bool mergeSmallChains, bool startTreeWithMultipleVertices, TreeComponentStrategy treeComponentStrategy)
        {
            var configuration = new ChainDecompositionConfiguration()
            {
                MaxTreeSize      = maxTreeSize,
                MergeSmallChains = mergeSmallChains,
                StartTreeWithMultipleVertices = startTreeWithMultipleVertices,
                TreeComponentStrategy         = treeComponentStrategy,
            };

            var chains =
                new TwoStageChainDecomposition <TNode>(mapDescription, new BreadthFirstChainDecomposition <TNode>(configuration))
                .GetChains(mapDescription.GetGraph()).ToList();

            return(new ChainDecompositionMutation <TConfiguration, TNode>(priority, chains, maxTreeSize, mergeSmallChains, startTreeWithMultipleVertices, treeComponentStrategy));
        }