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); } } }
public virtual string[] AllCovariatesNames() => CovariateValuesCache.AllCovariateNames();