Ejemplo n.º 1
0
        public override void DistributionComplete()
        {
            if (_component.Count == 0)
            {
                throw new Exception("Mixture distribution has no components");
            }

            if (totalWeight() <= 0.0)
            {
                throw new Exception("Mixture distribution has non-positive totalWeight");
            }

            foreach (MixtureComponent mc in _component)
            {
                IDistribution d = mc.Distribution;
                d.DistributionComplete();
            }

            normalize();
            _completed = true;
        }