You're right with the repetitive implementation. But I think the problem is, that for Kernels like Gaussian and MexicanHat the actual size of the mask is not properly defined (It depends on what accuracy you want) Or even for Box and Trapezoid the actual size of the mask differs, even if they have the same width. And so for every kernel the default size of the mask is computed differently. Thats why I decided to implement them as seperate classes. This is also related to my comment above on the truncation. 

One could pass the size of the mask to the constructor as a non default argument and leave it to the user. But I think the size of the kernel mask should be optimized in the following sense: As large as necessary for accuracy and as small as possible for performance. And I think this trade-off is different for every kernel type.