A precoding scheme with generation crossing for network coding