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

namespace EvoBoat.EvoAlg.Perm
{
    public class PermSolutionFactory<P, S> : SolutionFactory<P, S, PermVector>
        where P : PermProblem<S>
        where S : class, ISolution<PermVector>, new()
    {
        public PermSolutionFactory(P problem, int seed = 0) : base(problem, seed)
        { }

        public override S CreateEmpty()
        {
            return new S() { Content = new PermVector(Problem.Dimension, false) };
        }

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