Linear transformations which map the classes of ω-matrices and τ-matrices into or onto themselves