s-d-type exchange interactions in inhomogeneous ferromagnets