/// <summary> /// Initialize the library for use by client code. /// </summary> public static void InitializeLib(ICore modelCore) { Landis.Library.SiteHarvest.Main.InitializeLib(modelCore); Model.Core = modelCore; SiteVars.Initialize(); DensityThinning.InitializeClass(); }
/// <summary> /// Creates a cohort cutter instance. /// </summary> /// <returns> /// An instance of WholeCohortCutter if no species is partially thinned /// by the cohort selector. If the selector has a percentage for at /// least one species, then an instance of PartialCohortCutter is /// returned. /// </returns> public static ICohortCutter CreateAdditionalCutter(ICohortSelector cohortSelector, ExtensionType extensionType) { ICohortCutter cohortCutter; if (DensityThinning.AdditionalCohortSelectors.Count == 0) { cohortCutter = new WholeCohortCutter(cohortSelector, extensionType); } else { cohortCutter = new PartialCohortCutter(cohortSelector, DensityThinning.AdditionalCohortSelectors, extensionType); DensityThinning.ClearCohortSelectors(); } return(cohortCutter); }