Пример #1
0
 /// <summary>
 /// Initializes a new instance
 /// </summary>
 public DiffEngine()
 {
     _source    = null;
     _dest      = null;
     _matchList = null;
     _stateList = null;
     _level     = DiffEngineLevel.FastImperfect;
 }
Пример #2
0
        /// <summary>
        /// Performs the difference computation
        /// </summary>
        /// <param name="source"></param>
        /// <param name="destination"></param>
        /// <returns>The total execution time in seconds</returns>
        public double ProcessDiff(IDiffList source, IDiffList destination)
        {
            DateTime dt = DateTime.Now;

            _source    = source;
            _dest      = destination;
            _matchList = new List <DiffResultSpan>();

            int dcount = _dest.Count();
            int scount = _source.Count();

            if ((dcount > 0) && (scount > 0))
            {
                _stateList = new DiffStateList(dcount);
                ProcessRange(0, dcount - 1, 0, scount - 1);
            }

            TimeSpan ts = DateTime.Now - dt;

            return(ts.TotalSeconds);
        }
Пример #3
0
        /// <summary>
        /// Performs the difference computation
        /// </summary>
        /// <param name="source"></param>
        /// <param name="destination"></param>
        /// <returns>The total execution time in seconds</returns>
        public double ProcessDiff(IDiffList source, IDiffList destination)
        {
            DateTime dt = DateTime.Now;
            _source = source;
            _dest = destination;
            _matchList = new List<DiffResultSpan>();

            int dcount = _dest.Count();
            int scount = _source.Count();

            if ((dcount > 0) && (scount > 0))
            {
                _stateList = new DiffStateList(dcount);
                ProcessRange(0, dcount - 1, 0, scount - 1);
            }

            TimeSpan ts = DateTime.Now - dt;
            return ts.TotalSeconds;
        }
Пример #4
0
 /// <summary>
 /// Initializes a new instance
 /// </summary>
 public DiffEngine()
 {
     _source = null;
     _dest = null;
     _matchList = null;
     _stateList = null;
     _level = DiffEngineLevel.FastImperfect;
 }