powered by
This calculates the Smith Normal Form of a Matrix.
smith(S)
A matrix of which one wants to calculate the Smith Normal Form.
A matrix.
This calculates the Smith Normal Form of a Matrix based on repeated calculation of the Hermite Normal Form of the matrix and its transpose.
check_more_push, push_down, hermiteNF
check_more_push
push_down
hermiteNF
# NOT RUN { test_mat <- matrix(c(2,4,4, -6,6,12, 10,-4,-16), nrow=3, ncol=3, byrow=TRUE) smith(test_mat) ####### #output: # 2 0 0 # 0 6 0 # 0 0 12 # }
Run the code above in your browser using DataLab