Esempio n. 1
0
        public void AddChainLink(ChainLink chainLink)
        {
            var longitudinalDistance = LongitudinalDistance.Initial;

            if (_chainLinks.Any())
            {
                var previousLink = _chainLinks[_chainLinks.Count - 1];

                var distance = chainLink.MarkovEvent.OccurredOn - previousLink.MarkovEvent.OccurredOn;

                longitudinalDistance = LongitudinalDistance.Build(distance);
            }

            var position = new ChainPosition(this, _chainLinks.Count, longitudinalDistance);

            chainLink.AddToChain(position);

            _chainLinks.Add(chainLink);

            _longitudinalEvaluators.Evaluate(chainLink);
        }
Esempio n. 2
0
 public ChainPosition(Chain chain, int position, LongitudinalDistance distance)
 {
     Chain    = chain;
     Position = position;
     Distance = distance;
 }