piecewiseconstant
Piecewiseconstant refers to a class of functions that are constant on each member of a partition of their domain. More precisely, let I be an interval and {I_k} a partition of I into pairwise disjoint subintervals such that I = ⋃ I_k. A function f is piecewiseconstant if there exist constants c_k with f(x) = c_k for all x in I_k. The partition can be finite or countably infinite, and when endpoints are shared between subintervals, one must specify whether f is left- or right-continuous at those points; the Heaviside step function is a canonical single-jump example.
A convenient representation is f(x) = ∑_k c_k · χ_{I_k}(x), where χ_{I_k} is the indicator function of I_k.
Key properties include that all discontinuities are jumps at the partition boundaries, and such functions are
Applications of piecewiseconstant functions are common in numerical analysis and signal processing. They arise as stair-step