1. Remove Ordered for performance issue
Use generic Scalar_Type rather than ML.Real, and remove ML.Real