GNU Octave  4.2.1
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
xpow.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1993-2017 John W. Eaton
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 #if ! defined (octave_xpow_h)
24 #define octave_xpow_h 1
25 
26 #include "octave-config.h"
27 
28 #include "oct-cmplx.h"
29 
30 class Matrix;
31 class ComplexMatrix;
32 class FloatMatrix;
33 class FloatComplexMatrix;
34 class DiagMatrix;
35 class ComplexDiagMatrix;
36 class FloatDiagMatrix;
38 class PermMatrix;
39 class NDArray;
40 class FloatNDArray;
41 class ComplexNDArray;
43 class octave_value;
44 class Range;
45 
46 extern OCTINTERP_API octave_value xpow (double a, double b);
47 extern OCTINTERP_API octave_value xpow (double a, const Matrix& b);
48 extern OCTINTERP_API octave_value xpow (double a, const Complex& b);
49 extern OCTINTERP_API octave_value xpow (double a, const ComplexMatrix& b);
50 
51 extern OCTINTERP_API octave_value xpow (const Matrix& a, double b);
52 extern OCTINTERP_API octave_value xpow (const Matrix& a, const Complex& b);
53 
54 extern OCTINTERP_API octave_value xpow (const DiagMatrix& a, double b);
55 extern OCTINTERP_API octave_value xpow (const DiagMatrix& a, const Complex& b);
56 
57 extern OCTINTERP_API octave_value xpow (const PermMatrix& a, double b);
58 
59 extern OCTINTERP_API octave_value xpow (const Complex& a, double b);
60 extern OCTINTERP_API octave_value xpow (const Complex& a, const Matrix& b);
61 extern OCTINTERP_API octave_value xpow (const Complex& a, const Complex& b);
62 extern OCTINTERP_API octave_value xpow (const Complex& a,
63  const ComplexMatrix& b);
64 
65 extern OCTINTERP_API octave_value xpow (const ComplexMatrix& a, double b);
67  const Complex& b);
68 
69 extern OCTINTERP_API octave_value xpow (const ComplexDiagMatrix& a, double b);
71  const Complex& b);
72 
73 extern OCTINTERP_API octave_value elem_xpow (double a, const Matrix& b);
74 extern OCTINTERP_API octave_value elem_xpow (double a, const ComplexMatrix& b);
75 extern OCTINTERP_API octave_value elem_xpow (double a, const Range& r);
76 
77 extern OCTINTERP_API octave_value elem_xpow (const Matrix& a, double b);
78 extern OCTINTERP_API octave_value elem_xpow (const Matrix& a, const Matrix& b);
79 extern OCTINTERP_API octave_value elem_xpow (const Matrix& a, const Complex& b);
81  const ComplexMatrix& b);
82 
83 extern OCTINTERP_API octave_value elem_xpow (const Complex& a, const Matrix& b);
85  const ComplexMatrix& b);
86 extern OCTINTERP_API octave_value elem_xpow (const Complex& a, const Range& r);
87 
88 extern OCTINTERP_API octave_value elem_xpow (const ComplexMatrix& a, double b);
90  const Matrix& b);
92  const Complex& b);
94  const ComplexMatrix& b);
95 
96 extern OCTINTERP_API octave_value elem_xpow (double a, const NDArray& b);
97 extern OCTINTERP_API octave_value elem_xpow (double a, const ComplexNDArray& b);
98 
99 extern OCTINTERP_API octave_value elem_xpow (const NDArray& a, double b);
101  const NDArray& b);
103  const Complex& b);
105  const ComplexNDArray& b);
106 
108  const NDArray& b);
110  const ComplexNDArray& b);
111 
113  double b);
115  const NDArray& b);
117  const Complex& b);
119  const ComplexNDArray& b);
120 
121 extern OCTINTERP_API octave_value xpow (float a, float b);
122 extern OCTINTERP_API octave_value xpow (float a, const FloatMatrix& b);
123 extern OCTINTERP_API octave_value xpow (float a, const FloatComplex& b);
124 extern OCTINTERP_API octave_value xpow (float a, const FloatComplexMatrix& b);
125 
126 extern OCTINTERP_API octave_value xpow (const FloatMatrix& a, float b);
128  const FloatComplex& b);
129 
130 extern OCTINTERP_API octave_value xpow (const FloatDiagMatrix& a, float b);
132  const FloatComplex& b);
133 
134 extern OCTINTERP_API octave_value xpow (const FloatComplex& a, float b);
136  const FloatMatrix& b);
138  const FloatComplex& b);
140  const FloatComplexMatrix& b);
141 
142 extern OCTINTERP_API octave_value xpow (const FloatComplexMatrix& a, float b);
144  const FloatComplex& b);
145 
147  float b);
149  const FloatComplex& b);
150 
151 extern OCTINTERP_API octave_value elem_xpow (float a, const FloatMatrix& b);
152 extern OCTINTERP_API octave_value elem_xpow (float a,
153  const FloatComplexMatrix& b);
154 
155 extern OCTINTERP_API octave_value elem_xpow (const FloatMatrix& a, float b);
157  const FloatMatrix& b);
159  const FloatComplex& b);
161  const FloatComplexMatrix& b);
162 
164  const FloatMatrix& b);
166  const FloatComplexMatrix& b);
167 
169  float b);
171  const FloatMatrix& b);
173  const FloatComplex& b);
175  const FloatComplexMatrix& b);
176 
177 extern OCTINTERP_API octave_value elem_xpow (float a, const FloatNDArray& b);
178 extern OCTINTERP_API octave_value elem_xpow (float a,
179  const FloatComplexNDArray& b);
180 
181 extern OCTINTERP_API octave_value elem_xpow (const FloatNDArray& a, float b);
183  const FloatNDArray& b);
185  const FloatComplex& b);
187  const FloatComplexNDArray& b);
188 
190  const FloatNDArray& b);
192  const FloatComplexNDArray& b);
193 
195  float b);
197  const FloatNDArray& b);
199  const FloatComplex& b);
201  const FloatComplexNDArray& b);
202 
203 #endif
Definition: Range.h:33
OCTINTERP_API octave_value xpow(double a, double b)
Definition: xpow.cc:93
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
#define OCTINTERP_API
Definition: mexproto.h:69
Definition: dMatrix.h:37
b
Definition: cellfun.cc:398
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
OCTINTERP_API octave_value elem_xpow(double a, const Matrix &b)
Definition: xpow.cc:640
std::complex< double > Complex
Definition: oct-cmplx.h:31