public List <List <T> > GenerateAsync(HeuristicOption option, BackgroundWorker worker)
        {
            switch (option.Method)
            {
            case VariantGenerator.Method.QuadraticRandom:
                return(QuadraticRandom(option, worker));

            case VariantGenerator.Method.FeatureWise:
                return(FeatureWise(option, worker));

            case VariantGenerator.Method.NegativeFeatureWise:
                return(NegFeatureWise(option, worker));

            case VariantGenerator.Method.Pairwise:
                return(PairWise(option, worker));

            case VariantGenerator.Method.LinearRandom:
                return(LinearRandom(option, worker));

            case VariantGenerator.Method.Random:
                return(Random(option, worker));

            case VariantGenerator.Method.PseudoRandom:
                return(FixedRandom(option, worker));

            case VariantGenerator.Method.AllVariant:
                return(AllVariant(option, worker));

            default:
                throw new NotImplementedException();
            }
        }
        public override List <List <BinaryOption> > FixedRandom(HeuristicOption opt, BackgroundWorker worker)
        {
            if (!opt.HasTreshold)
            {
                return(null);
            }
            var vg = new MicrosoftSolverFoundation.VariantGenerator();

            return(vg.generateR1(_vm, opt.Treshold, opt.SolverTimeout, worker));
        }
        public override List <List <BinaryOption> > LinearRandom(HeuristicOption opt, BackgroundWorker worker)
        {
            if (!opt.HasTreshold)
            {
                return(null);
            }
            var vg1 = new MachineLearning.Solver.VariantGenerator(null);

            return(vg1.GenerateRLinear(_vm, opt.Treshold, opt.SolverTimeout, worker));
            //var vg = new MicrosoftSolverFoundation.VariantGenerator();
            //return vg.GenerateRLinear(_vm, opt.Treshold, worker);
        }
        public override List <List <BinaryOption> > Random(HeuristicOption opt, BackgroundWorker worker)
        {
            if (!opt.HasTreshold)
            {
                return(null);
            }
            if (!opt.HasTimeLimit)
            {
                return(null);
            }
            if (opt.Modulo == 0)
            {
                return(null);
            }
            var vg = new MicrosoftSolverFoundation.VariantGenerator();

            return(vg.generateRandomVariantsUntilSeconds(_vm, opt.TimeLimitSeconds, opt.Treshold, opt.Modulo));
        }
Beispiel #5
0
 public abstract List <List <T> > FixedRandom(HeuristicOption opt, BackgroundWorker worker);
Beispiel #6
0
 public abstract List <List <T> > QuadraticRandom(HeuristicOption opt, BackgroundWorker worker);
Beispiel #7
0
 public abstract List <List <T> > PairWise(HeuristicOption opt, BackgroundWorker worker);
Beispiel #8
0
 public abstract List <List <T> > NegFeatureWise(HeuristicOption opt, BackgroundWorker worker);
        public override List <List <BinaryOption> > AllVariant(HeuristicOption opt, BackgroundWorker worker)
        {
            var vg = new MicrosoftSolverFoundation.VariantGenerator();

            return(vg.generateAllVariantsFast(_vm));
        }
 public override List <List <BinaryOption> > PairWise(HeuristicOption opt, BackgroundWorker worker)
 {
     return(!opt.HasTimeLimit ? null : new PairWise().generatePairWiseVariantsUntilSeconds(_vm, opt.TimeLimitSeconds));
 }
 public override List <List <BinaryOption> > NegFeatureWise(HeuristicOption opt, BackgroundWorker worker)
 {
     return(!opt.HasTimeLimit ? null : new NegFeatureWise().generateNegativeFWUntilSeconds(_vm, opt.TimeLimitSeconds));
 }
 public abstract List <List <T> > AllVariant(HeuristicOption opt, BackgroundWorker worker);