]>
Dogcows Code - chaz/yoink/blob - src/Moof/cml/matrix/matrix_functions.h
1 /* -*- C++ -*- ------------------------------------------------------------
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
8 *-----------------------------------------------------------------------*/
13 #ifndef matrix_functions_h
14 #define matrix_functions_h
18 /** Set the given matrix to the identity matrix.
20 * This only makes sense for a square matrix, but no error will be
21 * signaled if the matrix is not square.
23 * @todo This should return a MatrixXpr to allow loop unrolling, as should
26 template<typename E
, class AT
, typename BO
, typename L
>
27 inline matrix
<E
,AT
,BO
,L
>
28 identity(const matrix
<E
,AT
,BO
,L
>& m
)
30 typename matrix
<E
,AT
,BO
,L
>::temporary_type result
;
32 /* This is a no-op for fixed-size matrices: */
33 cml::et::detail::Resize(result
, m
.size());
42 // -------------------------------------------------------------------------
This page took 0.035183 seconds and 4 git commands to generate.