Example #1
0
 public SVM(ProblemSetup problem)
 {
     this.problem = problem;
     nParticles   = problem.getNumberOfParticles();
     mef          = new MEF(problem);
     /* perms = permutations(); */
 }
Example #2
0
    public void runSymHelium()
    {
        ProblemSetup problemh = new ProblemSetup("helium.txt");
        SVM          svmh     = new SVM(problemh);

        Console.WriteLine();
        svmh.runSymHelium();
    }
Example #3
0
 public void Init()
 {
     double[] masses  = { 1, 1, 1 };
     int[]    charges = { -1, -1, 1 };
     double[] spins   = { 1 / 2.0, 1 / 2.0, 1 / 2.0 };
     problem       = new ProblemSetup(masses, charges, spins, 0.0, 20);
     svm           = new SVM(problem);
     testfunctions = svm.generateTestFunctions(3);
     mef           = new MEF(problem);
 }
Example #4
0
    public void runPositronium()
    {
        double[]     massh    = { 1, 1 };
        int[]        chargeh  = { 1, -1 };
        double[]     spinh    = { 1.0 / 2, 1.0 / 2 };
        ProblemSetup problemh = new ProblemSetup(massh, chargeh, spinh, 0, 1);
        SVM          svmh     = new SVM(problemh);

        Console.WriteLine();
        svmh.run2(5, 100);
    }
Example #5
0
    public void Test_permutations()
    {
        List <Permutation> perms = svm.permutations();
        int length = perms.Count;

        Assert.AreEqual(length, 2); // only two particles can be swapped
        double[]     masses   = { 1, 1, 1, 1, 1 };
        int[]        charges  = { -1, -1, 1, 1, 1 };
        double[]     spins    = { 1 / 2.0, 1 / 2.0, 1 / 2.0, 1 / 2.0, 1 / 2.0, 1 / 2.0 };
        ProblemSetup problem2 = new ProblemSetup(masses, charges, spins, 0.1, 1);
        SVM          svm2     = new SVM(problem2);
        int          length2  = svm2.permutations().Count;

        Assert.AreEqual(length2, 12);
    }
Example #6
0
 public MEF(ProblemSetup problem)
 {
     this.problem = problem;
 }