Example #1
0
        private static List <TRNode> aux_GetThinPartition(List <TRNode> path, double eps)
        {
            List <TRNode> ext = null;

            if (path != null && path.Count > 0)
            {
                ext = new List <TRNode>();
                ext.Add(path[0]);
                TRNode node_actual = path[0];
                for (int i = 1; i < path.Count; i++)
                {
                    TRPuente puente = new TRPuente(node_actual.Point, path[i].Point);
                    double   dx     = delta_x(puente, eps);
                    double   dy     = delta_y(puente, eps);

                    while (norma(node_actual.Point, path[i].Point) > eps)
                    {
                        TMPoint point_actual = new TMPoint(node_actual.Point.X + dx, node_actual.Point.Y + dy);
                        node_actual = new TRNode(point_actual);
                        ext.Add(node_actual);
                    }

                    ext.Add(new TRNode(path[i].Point));
                    node_actual = path[i];
                }
            }
            return(ext);
        }
Example #2
0
 public TRNode(TMPoint p, TRNode u, TRNode l, TRRange r)
 {
     this.Lower      = l;
     this.Upper      = u;
     this.Point      = p;
     this.state      = Node_State.Free;
     this.Y_Range    = r;
     this.IsObjetive = false;
 }
Example #3
0
 public TRNode(TMPoint p, TRNode u, TRNode l, TRRange r)
 {
     this.lower = l;
     this.upper = u;
     this.point = p;
     this.state = Node_State.Free;
     this.rango = r;
     this.obj   = false;
 }