k_nt_func_cpp function

c++ k space-time function