A Hard thresholding operator $H_k:\mathbb{R}^n\rightarrow \mathbb{R}^n$ is defined as a vector-valued function that maintains the top-k entries of a given vector in an absolute value sense and zero out the rest. As an example $H_2(x)=[-5,0,-3,0]^{\top}$ where $x=[-5,2,-3,1]^{\top}$ and $k=2$. (In a case where two entries are equal we keep the value with smallest index or any other mechanism that make the output unique to have a function)
Question: Is $H_k$ described above a continuous function?
My try:
Given $H_k:\mathbb{R}^n\rightarrow \mathbb{R}^n$, we say that $H_k$ is continuous at $a$ if $H_k(a)$ exists and for all $\epsilon > 0$, there exists a $\delta > 0$ such that $||H_k(x)- H_k(a)||_2 < \epsilon$ whenever $||x-a||_2 < \delta$. Can we satisfy it?