Closed m-tosch closed 3 years ago
Also provide a diag() function that takes a vector as an input argument and builds a diagonal Matrix that has 0 values everywhere else but on the diagonal.
As of now it is unclear where this function should be put. implementation done. currently in Matrix header file. Problem is that for testing, this needs to be tested with different Vectors, so it would fit into the vector_type.h
test header. Therefore it should probably be in the Vector header file, i thought... but of course this introduces a circular dependency between the Vector and Matrix header files. Will postpone this to another issue
Example 1
For a matrix
the
diag()
function should returnas a Vector.
Example 2
For a matrix
the
diag()
function should returnas a Vector.
Example 3
For a matrix
the
diag()
function should returnas a Vector.
Also provide a
diag()
function that takes a vector as an input argument and builds a diagonal Matrix that has 0 values everywhere else but on the diagonal. TBD: free functions or member functions too?