Kaiser-Yang/matrix-calculation-accelerator

Add a class called Diag for constructing diagonal matrices

Closed this issue · 0 comments

When constructing a diagonal matrix by Matrix<>({1, 2}) this will be ambiguous: the matrix's shape is 1 * 2 or the matrix's shape is 2 * 2 and the diagonal elements are 1 and 2. Using a struct whose constructor is explicit can solve this problem.