Constrained mock-Chebyshev least squares operator and its applications