Package org.apache.lucene.facet.taxonomy
Class ParallelTaxonomyArrays
- java.lang.Object
-
- org.apache.lucene.facet.taxonomy.ParallelTaxonomyArrays
-
public abstract class ParallelTaxonomyArrays extends Object
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 callchildren[children[0]]orsiblings[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 Classes Modifier and Type Class Description static classParallelTaxonomyArrays.IntArrayAbstraction that looks like an int[], but read-only.
-
Constructor Summary
Constructors Constructor Description ParallelTaxonomyArrays()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract 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.
-
-
-
Method Detail
-
parents
public abstract ParallelTaxonomyArrays.IntArray parents()
Returns the parents array, whereparents[i]denotes the parent of category ordinali.
-
children
public abstract ParallelTaxonomyArrays.IntArray children()
Returns the children array, wherechildren[i]denotes a child of category ordinali.
-
siblings
public abstract ParallelTaxonomyArrays.IntArray siblings()
Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-
-