Fast and fully sparse 'cpp' implementations to compute the genetic covariance matrix, the genomic relationship matrix, the Jaccard matrix, and the s-matrix of an input matrix. Full support for sparse matrices from the R-package 'Matrix'. Additionally, a 'cpp' implementation of the power method (von Mises iteration) algorithm to compute the largest eigenvector of a matrix is included, and a function to compute sliding windows.