Mercurial > hg > octave-lyh
comparison src/ls-mat5.cc @ 7198:4555c116b420
[project @ 2007-11-27 03:06:10 by jwe]
author | jwe |
---|---|
date | Tue, 27 Nov 2007 03:06:10 +0000 |
parents | a1dbe9d80eee |
children | 745a8299c2b5 |
comparison
equal
deleted
inserted
replaced
7197:e1c865f21751 | 7198:4555c116b420 |
---|---|
332 } \ | 332 } \ |
333 \ | 333 \ |
334 ComplexNDArray ctmp (dims); \ | 334 ComplexNDArray ctmp (dims); \ |
335 \ | 335 \ |
336 for (int i = 0; i < n; i++) \ | 336 for (int i = 0; i < n; i++) \ |
337 ctmp(i) = Complex (double (re(i)), im(i)); \ | 337 ctmp(i) = Complex (re(i).double_value (), im(i)); \ |
338 \ | 338 \ |
339 tc = ctmp; \ | 339 tc = ctmp; \ |
340 } \ | 340 } \ |
341 else \ | 341 else \ |
342 tc = re; \ | 342 tc = re; \ |
861 } | 861 } |
862 else if (ftype == "anonymous") | 862 else if (ftype == "anonymous") |
863 { | 863 { |
864 Octave_map m2 = m1.contents("workspace")(0).map_value(); | 864 Octave_map m2 = m1.contents("workspace")(0).map_value(); |
865 uint32NDArray MCOS = m2.contents("MCOS")(0).uint32_array_value(); | 865 uint32NDArray MCOS = m2.contents("MCOS")(0).uint32_array_value(); |
866 octave_idx_type off = static_cast<octave_idx_type>(double (MCOS (4))); | 866 octave_idx_type off = static_cast<octave_idx_type>(MCOS(4).double_value ()); |
867 m2 = subsys_ov.map_value(); | 867 m2 = subsys_ov.map_value(); |
868 m2 = m2.contents("MCOS")(0).map_value(); | 868 m2 = m2.contents("MCOS")(0).map_value(); |
869 tc2 = m2.contents("MCOS")(0).cell_value()(1 + off).cell_value()(1); | 869 tc2 = m2.contents("MCOS")(0).cell_value()(1 + off).cell_value()(1); |
870 m2 = tc2.map_value(); | 870 m2 = tc2.map_value(); |
871 symbol_table *local_sym_tab = 0; | 871 symbol_table *local_sym_tab = 0; |
1138 uint8NDArray in = tc.uint8_array_value (); | 1138 uint8NDArray in = tc.uint8_array_value (); |
1139 int nel = in.nelem (); | 1139 int nel = in.nelem (); |
1140 boolNDArray out (dims); | 1140 boolNDArray out (dims); |
1141 | 1141 |
1142 for (int i = 0; i < nel; i++) | 1142 for (int i = 0; i < nel; i++) |
1143 out (i) = static_cast<bool> (double (in (i))); | 1143 out (i) = in(i).bool_value (); |
1144 | 1144 |
1145 tc = out; | 1145 tc = out; |
1146 } | 1146 } |
1147 } | 1147 } |
1148 break; | 1148 break; |
1375 std::string outbuf (ilen - 7, ' '); | 1375 std::string outbuf (ilen - 7, ' '); |
1376 | 1376 |
1377 // FIXME -- find a way to avoid casting away const here | 1377 // FIXME -- find a way to avoid casting away const here |
1378 char *ctmp = const_cast<char *> (outbuf.c_str ()); | 1378 char *ctmp = const_cast<char *> (outbuf.c_str ()); |
1379 for (octave_idx_type j = 8; j < ilen; j++) | 1379 for (octave_idx_type j = 8; j < ilen; j++) |
1380 ctmp [j - 8] = itmp (j); | 1380 ctmp[j-8] = itmp(j).char_value (); |
1381 | 1381 |
1382 std::istringstream fh_ws (outbuf); | 1382 std::istringstream fh_ws (outbuf); |
1383 | 1383 |
1384 read_mat5_binary_element (fh_ws, filename, swap, global, subsys_ov); | 1384 read_mat5_binary_element (fh_ws, filename, swap, global, subsys_ov); |
1385 | 1385 |