functor (Weight_provider : WEIGHT_PROVIDER-> S