Impact of social punishment on networked evolutionary games via semi-tensor product method