Package org.apache.lucene.facet.taxonomy
Class ParallelTaxonomyArrays
java.lang.Object
org.apache.lucene.facet.taxonomy.ParallelTaxonomyArrays
Returns 3 arrays for traversing the taxonomy:
parents:parents[i]denotes the parent of category ordinali.children:children[i]denotes a child of category ordinali.siblings:siblings[i]denotes the sibling of category ordinali.
children[0] (ordinal 0 is
reserved for ROOT), and then depends if you want to do DFS or BFS, you call
children[children[0]] or siblings[children[0]] and so forth, respectively.
NOTE: you are not expected to modify the values of the arrays, since the arrays are shared with other threads.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstraction that looks like an int[], but read-only. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ParallelTaxonomyArrays.IntArraychildren()Returns the children array, wherechildren[i]denotes a child of category ordinali.abstract ParallelTaxonomyArrays.IntArrayparents()Returns the parents array, whereparents[i]denotes the parent of category ordinali.abstract ParallelTaxonomyArrays.IntArraysiblings()Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-
Constructor Details
-
ParallelTaxonomyArrays
public ParallelTaxonomyArrays()Sole constructor.
-
-
Method Details
-
parents
Returns the parents array, whereparents[i]denotes the parent of category ordinali. -
children
Returns the children array, wherechildren[i]denotes a child of category ordinali. -
siblings
Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-