Exemplo n.º 1
0
 public override double Calc(TwoBodies tb, double f)
 {
     if (prefF < 0)
     {
         prefF = f;
         return(0.0);
     }
     else
     {
         double res = Math.Abs(prefF - f);
         prefF = f;
         return(res);
     }
 }
Exemplo n.º 2
0
        private void makeConnections()
        {
            connections = new Connection[(bodies.Length * (bodies.Length - 1) / 2)];
            var tel = 0;

            for (int i = 0; i < bodies.Length; i++)
            {
                for (int j = i + 1; j < bodies.Length; j++)
                {
                    var tb = new TwoBodies(bodies[i], bodies[j]);
                    var c  = new Connection(new FDiv(), tb);
                    connections[tel] = c;
                    tel++;
                }
            }
        }
Exemplo n.º 3
0
 public Connection(Heuristic h, TwoBodies tb)
 {
     V  = 0;
     TB = tb;
     H  = h;
 }
Exemplo n.º 4
0
 public virtual double Calc(TwoBodies tb, double f)
 {
     return(0.0);
 }
Exemplo n.º 5
0
        public TwoBodies Copy()
        {
            var res = new TwoBodies(A.Copy(), B.Copy());

            return(res);
        }