ParallelTaxonomyArrays (Lucene 10.5.0 facet API)
Description: declaration: package: org.apache.lucene.facet.taxonomy, class: ParallelTaxonomyArrays

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 ordinal `i`.
- `children`: `children[i]` denotes a child of category ordinal `i`.
- `siblings`: `siblings[i]` denotes the sibling of category ordinal `i`.

To traverse the taxonomy tree, you typically start with `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 Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ParallelTaxonomyArrays.IntArray`
  Abstraction that looks like an int[], but read-only.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ParallelTaxonomyArrays()`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract ParallelTaxonomyArrays.IntArray`
  `children()`
  Returns the children array, where `children[i]` denotes a child of category ordinal `i`.
  `abstract ParallelTaxonomyArrays.IntArray`
  `parents()`
  Returns the parents array, where `parents[i]` denotes the parent of category ordinal `i`.
  `abstract ParallelTaxonomyArrays.IntArray`
  `siblings()`
  Returns the siblings array, where `siblings[i]` denotes the sibling of category ordinal `i`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ParallelTaxonomyArrays

    public ParallelTaxonomyArrays()
    Sole constructor.

- ## Method Details

  - ### parents

    public abstract ParallelTaxonomyArrays.IntArray parents()
    Returns the parents array, where `parents[i]` denotes the parent of category ordinal `i`.

  - ### children

    public abstract ParallelTaxonomyArrays.IntArray children()
    Returns the children array, where `children[i]` denotes a child of category ordinal `i`.

  - ### siblings

    public abstract ParallelTaxonomyArrays.IntArray siblings()
    Returns the siblings array, where `siblings[i]` denotes the sibling of category ordinal `i`.