A C++ implementation of BATS codes for academic and research