コード例 #1
0
        public virtual void Merge(CovariateValuesCache covariateValuesCache)
        {
            var numberOfNewItems = covariateValuesCache.Count;
            var currentCount     = Count;

            foreach (var covariateName in covariateValuesCache.AllCovariateNames())
            {
                if (!Has(covariateName))
                {
                    addDefaultValues(covariateName, currentCount);
                }

                CovariateValuesFor(covariateName).Merge(covariateValuesCache.CovariateValuesFor(covariateName));
            }

            //fill up the one missing
            foreach (var covariateName in AllCovariateNames())
            {
                if (!covariateValuesCache.Has(covariateName))
                {
                    addDefaultValues(covariateName, numberOfNewItems);
                }
            }
        }
コード例 #2
0
 public virtual string[] AllCovariatesNames() => CovariateValuesCache.AllCovariateNames();