Beispiel #1
0
 public PolynomialRegresion(Bod robot, Bod prekazka, Bod cil)
 {
     n             = 3; //Druhy stupen polynomu
     a             = new double[4, 5];
     bodX          = new double[3];
     bodY          = new double[3];
     sloupce       = 220;
     radky         = 180;
     this.robot    = robot;
     this.prekazka = prekazka;
     this.cil      = cil;
     bodX[0]       = robot.x;
     bodY[0]       = robot.y;
     bodX[1]       = prekazka.x;
     bodY[1]       = prekazka.y;
     bodX[2]       = cil.x;
     bodY[2]       = cil.y;
 }
Beispiel #2
0
        /*
         * VYTVORENI DVOUROZMERNEHO VEKTORU, KTERY PRO KAZDE X OBSAHUJE DANE Y
         */

        public List <Bod> polynom(bool prekazka)
        {
            //pokud se jedna o prekazku, vypocitat bod pro objeti
            if (prekazka)
            {
                tecna();
            }

            gauss();

            List <Bod> pol = new List <Bod>();
            Bod        p;

            for (int x = -110; x < 110; x++)
            {
                double y = vypocet(x);
                p = new Bod(x, y);
                pol.Add(p);
            }

            return(pol);
        }
Beispiel #3
0
 public RobotDistance(Bod bod, double vzdalenost)
 {
     this.bod        = bod;
     this.vzdalenost = vzdalenost;
 }