Macro nalgebra_macros::dmatrix[][src]

dmatrix!() { /* proc-macro */ }
Expand description

Construct a dynamic matrix directly from data.

Note: Requires the macro feature to be enabled (enabled by default).

The syntax is exactly the same as for matrix!, but instead of producing instances of SMatrix, it produces instances of DMatrix. At the moment it is not usable in const fn contexts.

use nalgebra::dmatrix;

// Produces a DMatrix<_>
let a = dmatrix![1, 2, 3;
                 4, 5, 6;
                 7, 8, 9];