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();
            }
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 5
0
 public abstract List <List <T> > FixedRandom(HeuristicOption opt, BackgroundWorker worker);
Ejemplo n.º 6
0
 public abstract List <List <T> > QuadraticRandom(HeuristicOption opt, BackgroundWorker worker);
Ejemplo n.º 7
0
 public abstract List <List <T> > PairWise(HeuristicOption opt, BackgroundWorker worker);
Ejemplo n.º 8
0
 public abstract List <List <T> > NegFeatureWise(HeuristicOption opt, BackgroundWorker worker);
Ejemplo n.º 9
0
        public override List <List <BinaryOption> > AllVariant(HeuristicOption opt, BackgroundWorker worker)
        {
            var vg = new MicrosoftSolverFoundation.VariantGenerator();

            return(vg.generateAllVariantsFast(_vm));
        }
Ejemplo n.º 10
0
 public override List <List <BinaryOption> > PairWise(HeuristicOption opt, BackgroundWorker worker)
 {
     return(!opt.HasTimeLimit ? null : new PairWise().generatePairWiseVariantsUntilSeconds(_vm, opt.TimeLimitSeconds));
 }
Ejemplo n.º 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);