Mercurial > octave-nkf
annotate src/OPERATORS/op-double-conv.cc @ 14138:72c96de7a403 stable
maint: update copyright notices for 2012
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 02 Jan 2012 14:25:41 -0500 |
parents | fd0a3ac60b0e |
children |
rev | line source |
---|---|
4901 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
3 Copyright (C) 2004-2012 John W. Eaton |
4901 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
4901 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
4901 | 20 |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
27 #include "gripes.h" | |
28 #include "oct-obj.h" | |
29 #include "ov.h" | |
30 #include "ov-int8.h" | |
31 #include "ov-int16.h" | |
32 #include "ov-int32.h" | |
33 #include "ov-int64.h" | |
34 #include "ov-uint8.h" | |
35 #include "ov-uint16.h" | |
36 #include "ov-uint32.h" | |
37 #include "ov-uint64.h" | |
5002 | 38 #include "ov-bool.h" |
39 #include "ov-bool-mat.h" | |
5164 | 40 #include "ov-re-sparse.h" |
41 #include "ov-bool-sparse.h" | |
5032 | 42 #include "ov-range.h" |
4901 | 43 #include "ov-scalar.h" |
44 #include "ov-re-mat.h" | |
5032 | 45 #include "ov-str-mat.h" |
4901 | 46 #include "ov-typeinfo.h" |
47 #include "ops.h" | |
48 | |
49 // conversion ops | |
50 | |
51 DEFDBLCONVFN (int8_matrix_to_double_matrix, int8_matrix, int8_array) | |
52 DEFDBLCONVFN (int16_matrix_to_double_matrix, int16_matrix, int16_array) | |
53 DEFDBLCONVFN (int32_matrix_to_double_matrix, int32_matrix, int32_array) | |
54 DEFDBLCONVFN (int64_matrix_to_double_matrix, int64_matrix, int64_array) | |
55 | |
56 DEFDBLCONVFN (uint8_matrix_to_double_matrix, uint8_matrix, uint8_array) | |
57 DEFDBLCONVFN (uint16_matrix_to_double_matrix, uint16_matrix, uint16_array) | |
58 DEFDBLCONVFN (uint32_matrix_to_double_matrix, uint32_matrix, uint32_array) | |
59 DEFDBLCONVFN (uint64_matrix_to_double_matrix, uint64_matrix, uint64_array) | |
60 | |
61 DEFDBLCONVFN (int8_scalar_to_double_matrix, int8_scalar, int8_array) | |
62 DEFDBLCONVFN (int16_scalar_to_double_matrix, int16_scalar, int16_array) | |
63 DEFDBLCONVFN (int32_scalar_to_double_matrix, int32_scalar, int32_array) | |
64 DEFDBLCONVFN (int64_scalar_to_double_matrix, int64_scalar, int64_array) | |
65 | |
66 DEFDBLCONVFN (uint8_scalar_to_double_matrix, uint8_scalar, uint8_array) | |
67 DEFDBLCONVFN (uint16_scalar_to_double_matrix, uint16_scalar, uint16_array) | |
68 DEFDBLCONVFN (uint32_scalar_to_double_matrix, uint32_scalar, uint32_array) | |
69 DEFDBLCONVFN (uint64_scalar_to_double_matrix, uint64_scalar, uint64_array) | |
70 | |
5002 | 71 DEFDBLCONVFN (bool_matrix_to_double_matrix, bool_matrix, bool_array) |
72 DEFDBLCONVFN (bool_scalar_to_double_matrix, bool, bool_array) | |
73 | |
5164 | 74 DEFDBLCONVFN (sparse_matrix_to_double_matrix, sparse_matrix, array) |
75 DEFDBLCONVFN (sparse_bool_matrix_to_double_matrix, sparse_bool_matrix, array) | |
76 | |
5032 | 77 DEFDBLCONVFN (range_to_double_matrix, range, array) |
78 | |
5992 | 79 DEFSTRDBLCONVFN(char_matrix_str_to_double_matrix, char_matrix_str) |
80 DEFSTRDBLCONVFN(char_matrix_sq_str_to_double_matrix, char_matrix_sq_str) | |
5032 | 81 |
4901 | 82 DEFDBLCONVFN (double_scalar_to_double_matrix, scalar, array) |
83 | |
84 void | |
85 install_double_conv_ops (void) | |
86 { | |
87 INSTALL_CONVOP (octave_int8_matrix, octave_matrix, int8_matrix_to_double_matrix); | |
88 INSTALL_CONVOP (octave_int16_matrix, octave_matrix, int16_matrix_to_double_matrix); | |
89 INSTALL_CONVOP (octave_int32_matrix, octave_matrix, int32_matrix_to_double_matrix); | |
90 INSTALL_CONVOP (octave_int64_matrix, octave_matrix, int64_matrix_to_double_matrix); | |
91 | |
92 INSTALL_CONVOP (octave_uint8_matrix, octave_matrix, uint8_matrix_to_double_matrix); | |
93 INSTALL_CONVOP (octave_uint16_matrix, octave_matrix, uint16_matrix_to_double_matrix); | |
94 INSTALL_CONVOP (octave_uint32_matrix, octave_matrix, uint32_matrix_to_double_matrix); | |
95 INSTALL_CONVOP (octave_uint64_matrix, octave_matrix, uint64_matrix_to_double_matrix); | |
96 | |
97 INSTALL_CONVOP (octave_int8_scalar, octave_matrix, int8_scalar_to_double_matrix); | |
98 INSTALL_CONVOP (octave_int16_scalar, octave_matrix, int16_scalar_to_double_matrix); | |
99 INSTALL_CONVOP (octave_int32_scalar, octave_matrix, int32_scalar_to_double_matrix); | |
100 INSTALL_CONVOP (octave_int64_scalar, octave_matrix, int64_scalar_to_double_matrix); | |
101 | |
102 INSTALL_CONVOP (octave_uint8_scalar, octave_matrix, uint8_scalar_to_double_matrix); | |
103 INSTALL_CONVOP (octave_uint16_scalar, octave_matrix, uint16_scalar_to_double_matrix); | |
104 INSTALL_CONVOP (octave_uint32_scalar, octave_matrix, uint32_scalar_to_double_matrix); | |
105 INSTALL_CONVOP (octave_uint64_scalar, octave_matrix, uint64_scalar_to_double_matrix); | |
106 | |
5002 | 107 INSTALL_CONVOP (octave_bool_matrix, octave_matrix, bool_matrix_to_double_matrix); |
108 INSTALL_CONVOP (octave_bool, octave_matrix, bool_scalar_to_double_matrix); | |
109 | |
5164 | 110 INSTALL_CONVOP (octave_sparse_matrix, octave_matrix, sparse_matrix_to_double_matrix); |
111 INSTALL_CONVOP (octave_sparse_bool_matrix, octave_matrix, sparse_bool_matrix_to_double_matrix); | |
112 | |
5032 | 113 INSTALL_CONVOP (octave_range, octave_matrix, range_to_double_matrix); |
114 | |
115 INSTALL_CONVOP (octave_char_matrix_str, octave_matrix, char_matrix_str_to_double_matrix); | |
5992 | 116 INSTALL_CONVOP (octave_char_matrix_sq_str, octave_matrix, char_matrix_sq_str_to_double_matrix); |
5032 | 117 |
4901 | 118 INSTALL_CONVOP (octave_scalar, octave_matrix, double_scalar_to_double_matrix); |
119 } |