using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EvoBoat.EvoAlg.WWO;

namespace EvoBoat.EvoAlg.ZOProg
{
    public class ZO_NWWOAlg<P,S> : COMB_NWWOAlg<P, S, BoolVector, bool>
        where P : ZeroOneProgProblem<S>
        where S : VecSolution<BoolVector, bool>, new()
    {
        public ZO_NWWOAlg() : base()
        { }

        public ZO_NWWOAlg(P problem, int seed = 0) : base(problem, seed)
        {
            this.Factory = new BoolVectorSolutionFactory<P, S>(problem);
        }

        public override void SetFactory()
        {
            if (Problem == null)
                throw new ArgumentNullException("Please assign the problem instance before set the factory");
            this.Factory = new BoolVectorSolutionFactory<P, S>(Problem);
        }

        public override double MoveP(S sol, int index, int d)
        {
            sol.Content[d] = !sol.Content[d];
            return 0;
        }

    }
}
