comparison src/DLD-FUNCTIONS/det.cc @ 8960:93f18f166aba

remove float perm matrices
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 12 Mar 2009 09:24:37 +0100
parents eb63fbe60fab
children 923c7cb7f13f
comparison
equal deleted inserted replaced
8959:089abf117499 8960:93f18f166aba
41 #include "ov-re-diag.h" 41 #include "ov-re-diag.h"
42 #include "ov-cx-diag.h" 42 #include "ov-cx-diag.h"
43 #include "ov-flt-re-diag.h" 43 #include "ov-flt-re-diag.h"
44 #include "ov-flt-cx-diag.h" 44 #include "ov-flt-cx-diag.h"
45 #include "ov-perm.h" 45 #include "ov-perm.h"
46 #include "ov-flt-perm.h"
47 46
48 #define MAYBE_CAST(VAR, CLASS) \ 47 #define MAYBE_CAST(VAR, CLASS) \
49 const CLASS *VAR = arg.type_id () == CLASS::static_type_id () ? \ 48 const CLASS *VAR = arg.type_id () == CLASS::static_type_id () ? \
50 dynamic_cast<const CLASS *> (&arg.get_rep ()) : 0 49 dynamic_cast<const CLASS *> (&arg.get_rep ()) : 0
51 50
126 } 125 }
127 } 126 }
128 } 127 }
129 else if (arg.is_perm_matrix ()) 128 else if (arg.is_perm_matrix ())
130 { 129 {
131 if (isfloat) 130 retval(0) = static_cast<double> (arg.perm_matrix_value ().determinant ());
132 { 131 if (nargout > 1)
133 retval(0) = static_cast<float> (arg.perm_matrix_value ().determinant ()); 132 retval(1) = 1.0;
134 if (nargout > 1)
135 retval(1) = 1.0;
136 }
137 else
138 {
139 retval(0) = static_cast<double> (arg.perm_matrix_value ().determinant ());
140 if (nargout > 1)
141 retval(1) = 1.0f;
142 }
143 } 133 }
144 else if (arg.is_single_type ()) 134 else if (arg.is_single_type ())
145 { 135 {
146 if (arg.is_real_type ()) 136 if (arg.is_real_type ())
147 { 137 {