<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.math.piecewise" />
<meta itemprop="path" content="Stable" />
</div>

# Module: tf_quant_finance.math.piecewise

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/math/piecewise.py">View source</a>



Piecewise utility functions.



## Classes

[`class PiecewiseConstantFunc`](../../tf_quant_finance/math/piecewise/PiecewiseConstantFunc.md): Creates a piecewise constant function.

## Functions

[`convert_to_tensor_or_func(...)`](../../tf_quant_finance/math/piecewise/convert_to_tensor_or_func.md): Returns either a `PiecewiseConstantFunc` or x converted to a `Tensor`.

[`find_interval_index(...)`](../../tf_quant_finance/math/piecewise/find_interval_index.md): Function to find the index of the interval where query points lies.

