Implement set and get of matrix.
Add javadoc.