using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EvoBoat.EvoAlg.ZOProg
{
    public class BoolVectorSolutionFactory<P, S> : SolutionFactory<P, S, BoolVector>
        where P : ZeroOneProgProblem<S>
        where S : class, ISolution<BoolVector>, new()
    {
        public BoolVectorSolutionFactory(P problem, int seed = 0) : base(problem, seed)
        { }

        public override S CreateEmpty()
        {
            return new S() { Content = new bool[Problem.Dimension] };
        }

        public override S CreateRandom()
        {
            return new S() { Content = BoolVector.CreateRandom(Rand, Problem.Dimension) };
        }
    }
}
