On the generalization of quasiarithmetic means with weight function