Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-01-13 20:35:25

Hi Doug,

Thanks for the explanation.

How about the case when the matrix size is a run-time value, instead
of compile-time as in your example?

On Sat, 13 Jan 2001, Doug Gregor wrote:
gregod> The "literals" array for this type could be:
gregod> template<typename T, int N>
gregod> Matrix<T, N, N> LiteralTable< Matrix<T, N, N> >::literals[] = {
gregod> Matrix<T, N, N>(Matrix<T, N, N>::zero),
gregod> Matrix<T, N, N>(Matrix<T, N, N>::identity)
gregod> };
gregod> Which lets the ID(Matrix<T, N, N>, 0) <-> the NxN zero matrix and
gregod> ID(Matrix<T, N, N>, 1) <-> the NxN identity matrix.

 Jeremy Siek www:
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906

Boost list run by bdawes at, gregod at, cpdaniel at, john at