Functions to construct (non)additive genetic relatedness