added sparseN

add sparseN function, export sparseN
edit gitignore for test/