/// <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 (PartialThinning.AdditionalCohortSelectors.Count == 0)
            {
                cohortCutter = new WholeCohortCutter(cohortSelector, extensionType);
            }
            else
            {
                cohortCutter = new PartialCohortCutter(cohortSelector,
                                                       PartialThinning.AdditionalCohortSelectors,
                                                       extensionType);
            }
            return(cohortCutter);
        }
Esempio n. 2
0
        /// <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 CreateCutter(ICohortSelector cohortSelector,
                                                 ExtensionType extensionType)
        {
            ICohortCutter cohortCutter;

            if (DensityThinning.CohortSelectors.Count == 0)
            {
                cohortCutter = new WholeCohortCutter(cohortSelector, extensionType);
            }
            else
            {
                cohortCutter = new PartialCohortCutter(cohortSelector,
                                                       DensityThinning.CohortSelectors,
                                                       extensionType);
                DensityThinning.ClearCohortSelectors();
            }
            return(cohortCutter);
        }