Exemple #1
0
        public void GenerateNewLattice(int n, int m, BigInteger codomainStart, BigInteger codomainEnd)
        {
            UiServices.SetBusyState();

            LatticeND newLattice = new LatticeND(n, m, false);

            //Zur Generierung von kritischen Gittern
            //while (Math.Round(newLattice.AngleReducedVectors, 0) != 60)
            //{
            newLattice.GenerateRandomVectors(ReductionMethod == ReductionMethods.reduceGauss, codomainStart, codomainEnd);

            switch (ReductionMethod)
            {
            case ReductionMethods.reduceGauss:
                newLattice.GaussianReduce();
                break;

            default:
                newLattice.LLLReduce();
                break;
            }
            //}
            Lattice = newLattice;

            WriteHistoryForNewLattice(Languages.buttonGenerateNewLattice);

            NotifyPropertyChanged("Lattice");
        }
Exemple #2
0
        public void SetLatticeManually(LatticeND newLattice)
        {
            UiServices.SetBusyState();

            Lattice = new LatticeND(newLattice.Vectors, newLattice.UseRowVectors);

            switch (ReductionMethod)
            {
            case ReductionMethods.reduceGauss:
                Lattice.GaussianReduce();
                break;

            default:
                Lattice.LLLReduce();
                break;
            }

            WriteHistoryForNewLattice(Languages.buttonDefineNewLattice);

            NotifyPropertyChanged("Lattice");
        }