Package org.apache.lucene.facet.taxonomy
Class ParallelTaxonomyArrays
- java.lang.Object
-
- org.apache.lucene.facet.taxonomy.ParallelTaxonomyArrays
-
public abstract class ParallelTaxonomyArrays extends java.lang.ObjectReturns 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.
-
-
Constructor Summary
Constructors Constructor Description ParallelTaxonomyArrays()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract int[]children()Returns the children array, wherechildren[i]denotes a child of category ordinali.abstract int[]parents()Returns the parents array, whereparents[i]denotes the parent of category ordinali.abstract int[]siblings()Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-
-
-
Method Detail
-
parents
public abstract int[] parents()
Returns the parents array, whereparents[i]denotes the parent of category ordinali.
-
children
public abstract int[] children()
Returns the children array, wherechildren[i]denotes a child of category ordinali.
-
siblings
public abstract int[] siblings()
Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-
-