Skip to content
Snippets Groups Projects
Commit 8af08842 authored by Oliver Sander's avatar Oliver Sander
Browse files

Document the precise behavior of the constructor taking an initializer_list

parent 3af16593
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,14 @@ namespace Dune {
: diag_(diag)
{}
/** \brief Construct diagonal matrix from an initializer list
*
* The elements of the list are copied into the diagonal elements of the matrix.
* If the initializer list is shorter than the matrix diagonal (which has n elements),
* the remaining matrix diagonal elements are left uninitialized. If the initializer
* list is longer, than only the first n elements will be copied into the matrix
* diagonal.
*/
DiagonalMatrix (std::initializer_list<K> const &l)
{
std::copy_n(l.begin(), std::min(static_cast<std::size_t>(rows),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment