GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
op-dm-template.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2008-2013 Jaroslav Hajek
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
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
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
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26 
27 #include "ops.h"
28 #include "xdiv.h"
29 #include LINCLUDE
30 #include RINCLUDE
31 #ifdef DEFINENULLASSIGNCONV
32 #include "ov-null-mat.h"
33 #endif
34 
35 // matrix by diag matrix ops.
36 
39 DEFBINOP_OP (mul, LMATRIX, RMATRIX, *)
40 
41 #ifndef LDMATRIX
42 #define LDMATRIX LMATRIX
43 #endif
44 
45 #ifndef RDMATRIX
46 #define RDMATRIX RMATRIX
47 #endif
48 
49 #define OCTAVE_LMATRIX CONCAT2(octave_, LMATRIX)
50 #define OCTAVE_LDMATRIX CONCAT2(octave_, LDMATRIX)
51 #define OCTAVE_RMATRIX CONCAT2(octave_, RMATRIX)
52 #define LMATRIX_VALUE CONCAT2(LMATRIX, _value)
53 #define RMATRIX_VALUE CONCAT2(RMATRIX, _value)
54 #define LDMATRIX_VALUE CONCAT2(LDMATRIX, _value)
55 #define RDMATRIX_VALUE CONCAT2(RDMATRIX, _value)
56 
57 #ifdef DEFINEDIV
58 DEFBINOP (div, LMATRIX, RMATRIX)
59 {
61 
62  return xdiv (v1.LDMATRIX_VALUE (), v2.RMATRIX_VALUE ());
63 }
64 #endif
65 
66 #ifdef DEFINELDIV
67 DEFBINOP (ldiv, LMATRIX, RMATRIX)
68 {
70 
71  return xleftdiv (v1.LMATRIX_VALUE (), v2.RDMATRIX_VALUE ());
72 }
73 #endif
74 
75 #define SHORT_NAME CONCAT3(LSHORT, _, RSHORT)
76 #define INST_NAME CONCAT3(install_, SHORT_NAME, _ops)
77 
78 void
79 INST_NAME (void)
80 {
84 #ifdef DEFINEDIV
86 #endif
87 #ifdef DEFINELDIV
89 #endif
90 #ifdef DEFINENULLASSIGNCONV
94 #endif
95 }