Mercurial > octave-nkf
comparison src/ov-str-mat.cc @ 5400:c7e3cf2fce3e
[project @ 2005-07-05 15:01:32 by jwe]
author | jwe |
---|---|
date | Tue, 05 Jul 2005 15:01:32 +0000 |
parents | 4c8a2e4e0717 |
children | 66ad03c58880 |
comparison
equal
deleted
inserted
replaced
5399:db34dff19947 | 5400:c7e3cf2fce3e |
---|---|
79 { | 79 { |
80 return default_numeric_conversion_function; | 80 return default_numeric_conversion_function; |
81 } | 81 } |
82 | 82 |
83 octave_value | 83 octave_value |
84 octave_char_matrix_str::do_index_op (const octave_value_list& idx, | 84 octave_char_matrix_str::do_index_op_internal (const octave_value_list& idx, |
85 int resize_ok) | 85 int resize_ok, char type) |
86 { | 86 { |
87 octave_value retval; | 87 octave_value retval; |
88 | 88 |
89 octave_idx_type len = idx.length (); | 89 octave_idx_type len = idx.length (); |
90 | 90 |
95 idx_vector i = idx (0).index_vector (); | 95 idx_vector i = idx (0).index_vector (); |
96 idx_vector j = idx (1).index_vector (); | 96 idx_vector j = idx (1).index_vector (); |
97 | 97 |
98 if (! error_state) | 98 if (! error_state) |
99 retval = octave_value (charNDArray (matrix.index (i, j, resize_ok)), | 99 retval = octave_value (charNDArray (matrix.index (i, j, resize_ok)), |
100 true); | 100 true, type); |
101 } | 101 } |
102 break; | 102 break; |
103 | 103 |
104 case 1: | 104 case 1: |
105 { | 105 { |
106 idx_vector i = idx (0).index_vector (); | 106 idx_vector i = idx (0).index_vector (); |
107 | 107 |
108 if (! error_state) | 108 if (! error_state) |
109 retval = octave_value (charNDArray (matrix.index (i, resize_ok)), | 109 retval = octave_value (charNDArray (matrix.index (i, resize_ok)), |
110 true); | 110 true, type); |
111 } | 111 } |
112 break; | 112 break; |
113 | 113 |
114 default: | 114 default: |
115 { | 115 { |
118 for (octave_idx_type i = 0; i < len; i++) | 118 for (octave_idx_type i = 0; i < len; i++) |
119 idx_vec(i) = idx(i).index_vector (); | 119 idx_vec(i) = idx(i).index_vector (); |
120 | 120 |
121 if (! error_state) | 121 if (! error_state) |
122 retval = octave_value (charNDArray (matrix.index (idx_vec, resize_ok)), | 122 retval = octave_value (charNDArray (matrix.index (idx_vec, resize_ok)), |
123 true); | 123 true, type); |
124 } | 124 } |
125 break; | 125 break; |
126 } | 126 } |
127 | 127 |
128 return retval; | 128 return retval; |