---
title: "searchsorted"
sidebar_label: "searchsorted"
description: "Kotlin binding reference: searchsorted."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[searchsorted](searchsorted.md)

# searchsorted

[common]\
fun [searchsorted](searchsorted.md)(sortedSequence: [Tensor](../Tensor/index.md), values: [Tensor](../Tensor/index.md), outInt32: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false, right: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false, side: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)? = null, sorter: [Tensor](../Tensor/index.md)? = null): [Tensor](../Tensor/index.md)

`searchsorted(sortedSequence: Tensor, values: Tensor, outInt32: Boolean = false, right: Boolean = false, side: Boolean? = null, sorter: Tensor? = null)`: the `searchsorted` operator. Insertion points of `values` into a sorted sequence. For each value, the index in `sorted_sequence`'s last axis where it would insert to keep the order: `right == false` gives the leftmost admissible slot, `true` the rightmost. `side`, when present, must AGREE with `right` (it is the same switch under its string-API name); `sorter` supplies indices that sort an unsorted sequence.