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();
            }
        }
Пример #2
0
        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));
        }
Пример #3
0
        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);
        }
Пример #4
0
        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));
        }
Пример #5
0
 public abstract List <List <T> > FixedRandom(HeuristicOption opt, BackgroundWorker worker);
Пример #6
0
 public abstract List <List <T> > QuadraticRandom(HeuristicOption opt, BackgroundWorker worker);
Пример #7
0
 public abstract List <List <T> > PairWise(HeuristicOption opt, BackgroundWorker worker);
Пример #8
0
 public abstract List <List <T> > NegFeatureWise(HeuristicOption opt, BackgroundWorker worker);
Пример #9
0
        public override List <List <BinaryOption> > AllVariant(HeuristicOption opt, BackgroundWorker worker)
        {
            var vg = new MicrosoftSolverFoundation.VariantGenerator();

            return(vg.generateAllVariantsFast(_vm));
        }
Пример #10
0
 public override List <List <BinaryOption> > PairWise(HeuristicOption opt, BackgroundWorker worker)
 {
     return(!opt.HasTimeLimit ? null : new PairWise().generatePairWiseVariantsUntilSeconds(_vm, opt.TimeLimitSeconds));
 }
Пример #11
0
 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);