A characterization of families of function sets described by constraints on the gradient