wwz2kww function

Koopman-Wang-Wei from Wang-Wei-Zhu Decomposition