Exemple #1
0
        /// <summary>
        /// Returns an iterator over the children of the given ordinal. </summary>
        public virtual ChildrenIterator GetChildren(int ordinal)
        {
            ParallelTaxonomyArrays arrays = ParallelTaxonomyArrays;
            int child = ordinal >= 0 ? arrays.Children()[ordinal] : INVALID_ORDINAL;

            return(new ChildrenIterator(child, arrays.Siblings()));
        }
Exemple #2
0
        /// <summary>
        /// Sole constructor.
        /// </summary>
        protected internal TaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config)
        {
            this.IndexFieldName = indexFieldName;
            this.TaxoReader     = taxoReader;
            this.Config         = config;
            ParallelTaxonomyArrays pta = taxoReader.ParallelTaxonomyArrays;

            Children = pta.Children();
            Siblings = pta.Siblings();
        }