Mercurial > octave
diff src/xdiv.cc @ 3195:7a5a5da64756
[project @ 1998-10-28 22:54:04 by jwe]
author | jwe |
---|---|
date | Wed, 28 Oct 1998 23:01:17 +0000 |
parents | c17387059fd3 |
children | 45742a3b1f7c |
line wrap: on
line diff
--- a/src/xdiv.cc Wed Oct 28 17:51:09 1998 +0000 +++ b/src/xdiv.cc Wed Oct 28 23:01:17 1998 +0000 @@ -53,7 +53,7 @@ template <class T1, class T2> bool -mx_leftdiv_conform (T1 a, T2 b) +mx_leftdiv_conform (const T1& a, const T2& b) { int a_nr = a.rows (); int b_nr = b.rows (); @@ -70,14 +70,17 @@ return true; } -template bool mx_leftdiv_conform (Matrix&, Matrix&); -template bool mx_leftdiv_conform (Matrix&, ComplexMatrix&); -template bool mx_leftdiv_conform (ComplexMatrix&, ComplexMatrix&); -template bool mx_leftdiv_conform (ComplexMatrix&, Matrix&); +#define INSTANTIATE_MX_LEFTDIV_CONFORM(T1, T2) \ + template bool mx_leftdiv_conform (const T1&, const T2&) + +INSTANTIATE_MX_LEFTDIV_CONFORM (Matrix, Matrix); +INSTANTIATE_MX_LEFTDIV_CONFORM (Matrix, ComplexMatrix); +INSTANTIATE_MX_LEFTDIV_CONFORM (ComplexMatrix, Matrix); +INSTANTIATE_MX_LEFTDIV_CONFORM (ComplexMatrix, ComplexMatrix); template <class T1, class T2> bool -mx_div_conform (T1 a, T2 b) +mx_div_conform (const T1& a, const T2& b) { int a_nc = a.cols (); int b_nc = b.cols (); @@ -94,10 +97,13 @@ return true; } -template bool mx_div_conform (Matrix&, Matrix&); -template bool mx_div_conform (Matrix&, ComplexMatrix&); -template bool mx_div_conform (ComplexMatrix&, ComplexMatrix&); -template bool mx_div_conform (ComplexMatrix&, Matrix&); +#define INSTANTIATE_MX_DIV_CONFORM(T1, T2) \ + template bool mx_div_conform (const T1&, const T2&) + +INSTANTIATE_MX_DIV_CONFORM (Matrix, Matrix); +INSTANTIATE_MX_DIV_CONFORM (Matrix, ComplexMatrix); +INSTANTIATE_MX_DIV_CONFORM (ComplexMatrix, Matrix); +INSTANTIATE_MX_DIV_CONFORM (ComplexMatrix, ComplexMatrix); // Right division functions. //