added extractor for the diagonal of a Matrix
adapted test files for changed api
added simple conversions of square matrices and vectors