# RaggedGather

public final class **RaggedGather** Gather ragged slices from \`params\` axis \`0\` according to \`indices\`.


Outputs a \`RaggedTensor\` output composed from \`output_dense_values\` and
\`output_nested_splits\`, such that:

    output.shape = indices.shape + params.shape[1:]
     output.ragged_rank = indices.shape.ndims + params.ragged_rank
     output[i...j, d0...dn] = params[indices[i...j], d0...dn]
     
where

- \`params = ragged.from_nested_row_splits(params_dense_values, params_nested_splits)\` provides the values that should be gathered.
- \`indices\` ia a dense tensor with dtype \`int32\` or \`int64\`, indicating which values should be gathered.
- \`output = ragged.from_nested_row_splits(output_dense_values, output_nested_splits)\` is the output tensor.

(Note: This c++ op is used to implement the higher-level python \`tf.ragged.gather\` op, which also supports ragged indices.)

<br />

<br />

### Public Methods

|---|---|
| static \<T extends Number, U, V extends Number\> [RaggedGather](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedGather)\<T, U\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedGather#create(org.tensorflow.op.Scope,%20java.lang.Iterable<org.tensorflow.Operand<T>>,%20org.tensorflow.Operand<U>,%20org.tensorflow.Operand<V>,%20java.lang.Long))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\>\> paramsNestedSplits, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<U\> paramsDenseValues, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<V\> indices, Long OUTPUTRAGGEDRANK) Factory method to create a class wrapping a new RaggedGather operation. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [outputDenseValues](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedGather#outputDenseValues())() The \`flat_values\` for the returned RaggedTensor. |
| List\<[Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>\> | [outputNestedSplits](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedGather#outputNestedSplits())() The \`nested_row_splits\` tensors that define the row-partitioning for the returned RaggedTensor. |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Methods

#### public static [RaggedGather](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/RaggedGather)\<T, U\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\>\> paramsNestedSplits, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<U\> paramsDenseValues, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<V\> indices, Long OUTPUTRAGGEDRANK)

Factory method to create a class wrapping a new RaggedGather operation.

##### Parameters

| scope | current scope |
| paramsNestedSplits | The \`nested_row_splits\` tensors that define the row-partitioning for the \`params\` RaggedTensor input. |
| paramsDenseValues | The \`flat_values\` for the \`params\` RaggedTensor. There was a terminology change at the python level from dense_values to flat_values, so dense_values is the deprecated name. |
| indices | Indices in the outermost dimension of \`params\` of the values that should be gathered. |
| OUTPUTRAGGEDRANK | The ragged rank of the output RaggedTensor. \`output_nested_splits\` will contain this number of \`row_splits\` tensors. This value should equal \`indices.shape.ndims + params.ragged_rank - 1\`. |
|---|---|

##### Returns

- a new instance of RaggedGather

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>
**outputDenseValues**
()

The \`flat_values\` for the returned RaggedTensor.

#### public List\<[Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>\>
**outputNestedSplits**
()

The \`nested_row_splits\` tensors that define the row-partitioning for the
returned RaggedTensor.