Exemple #1
0
 public override bool Equals(object obj)
 {
     if (obj == null || !this.GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         ModelTimeDomain domain = (ModelTimeDomain)obj;
         return(this == domain);
     }
 }
Exemple #2
0
        /// <summary>
        /// Based on given points, construct dictionary relating lines to their domains
        /// </summary>
        public MagnitudeDropoffModel(ModelPointList pointList)
        {
            //_modelPoints = pointList;

            _points = pointList.ToArray();
            _lines  = new Dictionary <ModelTimeDomain, ModelLine>();

            // calculate model's lines and their corresponding time domains
            for (int i = 0; i < _points.Length - 1; i++)
            {
                ModelPoint p1 = _points[i];
                ModelPoint p2 = _points[i + 1];

                ModelLine       line   = new ModelLine(p1, p2);
                ModelTimeDomain domain = new ModelTimeDomain(p1.Time, p2.Time);
                _lines.Add(domain, line);
            }
        }