GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
xpow.cc File Reference
#include <cassert>
#include <limits>
#include "Array-util.h"
#include "CColVector.h"
#include "CDiagMatrix.h"
#include "fCDiagMatrix.h"
#include "fCMatrix.h"
#include "CMatrix.h"
#include "EIG.h"
#include "fEIG.h"
#include "dDiagMatrix.h"
#include "fDiagMatrix.h"
#include "dMatrix.h"
#include "PermMatrix.h"
#include "mx-cm-cdm.h"
#include "mx-fcm-fcdm.h"
#include "oct-cmplx.h"
#include "Range.h"
#include "quit.h"
#include "error.h"
#include "ovl.h"
#include "utils.h"
#include "xpow.h"
#include "bsxfun.h"
Include dependency graph for xpow.cc:

Go to the source code of this file.

Functions

octave_value elem_xpow (double a, const Matrix &b)
 
octave_value elem_xpow (double a, const ComplexMatrix &b)
 
octave_value elem_xpow (double a, const Range &r)
 
octave_value elem_xpow (const Matrix &a, double b)
 
octave_value elem_xpow (const Matrix &a, const Matrix &b)
 
octave_value elem_xpow (const Matrix &a, const Complex &b)
 
octave_value elem_xpow (const Matrix &a, const ComplexMatrix &b)
 
octave_value elem_xpow (const Complex &a, const Matrix &b)
 
octave_value elem_xpow (const Complex &a, const ComplexMatrix &b)
 
octave_value elem_xpow (const Complex &a, const Range &r)
 
octave_value elem_xpow (const ComplexMatrix &a, double b)
 
octave_value elem_xpow (const ComplexMatrix &a, const Matrix &b)
 
octave_value elem_xpow (const ComplexMatrix &a, const Complex &b)
 
octave_value elem_xpow (const ComplexMatrix &a, const ComplexMatrix &b)
 
octave_value elem_xpow (double a, const NDArray &b)
 
octave_value elem_xpow (double a, const ComplexNDArray &b)
 
octave_value elem_xpow (const NDArray &a, double b)
 
octave_value elem_xpow (const NDArray &a, const NDArray &b)
 
octave_value elem_xpow (const NDArray &a, const Complex &b)
 
octave_value elem_xpow (const NDArray &a, const ComplexNDArray &b)
 
octave_value elem_xpow (const Complex &a, const NDArray &b)
 
octave_value elem_xpow (const Complex &a, const ComplexNDArray &b)
 
octave_value elem_xpow (const ComplexNDArray &a, double b)
 
octave_value elem_xpow (const ComplexNDArray &a, const NDArray &b)
 
octave_value elem_xpow (const ComplexNDArray &a, const Complex &b)
 
octave_value elem_xpow (const ComplexNDArray &a, const ComplexNDArray &b)
 
octave_value elem_xpow (float a, const FloatMatrix &b)
 
octave_value elem_xpow (float a, const FloatComplexMatrix &b)
 
octave_value elem_xpow (const FloatMatrix &a, float b)
 
octave_value elem_xpow (const FloatMatrix &a, const FloatMatrix &b)
 
octave_value elem_xpow (const FloatMatrix &a, const FloatComplex &b)
 
octave_value elem_xpow (const FloatMatrix &a, const FloatComplexMatrix &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatMatrix &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatComplexMatrix &b)
 
octave_value elem_xpow (const FloatComplexMatrix &a, float b)
 
octave_value elem_xpow (const FloatComplexMatrix &a, const FloatMatrix &b)
 
octave_value elem_xpow (const FloatComplexMatrix &a, const FloatComplex &b)
 
octave_value elem_xpow (const FloatComplexMatrix &a, const FloatComplexMatrix &b)
 
octave_value elem_xpow (float a, const FloatNDArray &b)
 
octave_value elem_xpow (float a, const FloatComplexNDArray &b)
 
octave_value elem_xpow (const FloatNDArray &a, float b)
 
octave_value elem_xpow (const FloatNDArray &a, const FloatNDArray &b)
 
octave_value elem_xpow (const FloatNDArray &a, const FloatComplex &b)
 
octave_value elem_xpow (const FloatNDArray &a, const FloatComplexNDArray &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatNDArray &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatComplexNDArray &b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, float b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, const FloatNDArray &b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, const FloatComplex &b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, const FloatComplexNDArray &b)
 
static void err_failed_diagonalization (void)
 
static void err_nonsquare_matrix (void)
 
static bool same_sign (double a, double b)
 
template<typename T >
static bool xisint (T x)
 
octave_value xpow (double a, double b)
 
octave_value xpow (double a, const Matrix &b)
 
octave_value xpow (double a, const Complex &b)
 
octave_value xpow (double a, const ComplexMatrix &b)
 
octave_value xpow (const Matrix &a, double b)
 
octave_value xpow (const DiagMatrix &a, double b)
 
octave_value xpow (const PermMatrix &a, double b)
 
octave_value xpow (const Matrix &a, const Complex &b)
 
octave_value xpow (const Complex &a, double b)
 
octave_value xpow (const Complex &a, const Matrix &b)
 
octave_value xpow (const Complex &a, const Complex &b)
 
octave_value xpow (const Complex &a, const ComplexMatrix &b)
 
octave_value xpow (const ComplexMatrix &a, double b)
 
octave_value xpow (const ComplexMatrix &a, const Complex &b)
 
octave_value xpow (const ComplexDiagMatrix &a, const Complex &b)
 
octave_value xpow (const ComplexDiagMatrix &a, double b)
 
octave_value xpow (const DiagMatrix &a, const Complex &b)
 
octave_value xpow (float a, float b)
 
octave_value xpow (float a, const FloatMatrix &b)
 
octave_value xpow (float a, const FloatComplex &b)
 
octave_value xpow (float a, const FloatComplexMatrix &b)
 
octave_value xpow (const FloatMatrix &a, float b)
 
octave_value xpow (const FloatDiagMatrix &a, float b)
 
octave_value xpow (const FloatMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplex &a, float b)
 
octave_value xpow (const FloatComplex &a, const FloatMatrix &b)
 
octave_value xpow (const FloatComplex &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplex &a, const FloatComplexMatrix &b)
 
octave_value xpow (const FloatComplexMatrix &a, float b)
 
octave_value xpow (const FloatComplexMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplexDiagMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplexDiagMatrix &a, float b)
 
octave_value xpow (const FloatDiagMatrix &a, const FloatComplex &b)
 

Function Documentation

◆ elem_xpow() [1/50]

octave_value elem_xpow ( double  a,
const Matrix b 
)

Definition at line 645 of file xpow.cc.

References a, b, i, pow(), result, and retval.

Referenced by elem_xpow().

◆ elem_xpow() [2/50]

octave_value elem_xpow ( double  a,
const ComplexMatrix b 
)

Definition at line 687 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [3/50]

◆ elem_xpow() [4/50]

octave_value elem_xpow ( const Matrix a,
double  b 
)

Definition at line 751 of file xpow.cc.

References a, b, i, pow(), result, retval, and xisint().

◆ elem_xpow() [5/50]

octave_value elem_xpow ( const Matrix a,
const Matrix b 
)

Definition at line 793 of file xpow.cc.

References a, b, b_nc, b_nr, done, octave::err_nonconformant(), i, pow(), result, retval, and xisint().

◆ elem_xpow() [6/50]

octave_value elem_xpow ( const Matrix a,
const Complex b 
)

Definition at line 856 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [7/50]

octave_value elem_xpow ( const Matrix a,
const ComplexMatrix b 
)

Definition at line 875 of file xpow.cc.

References a, b, b_nc, b_nr, octave::err_nonconformant(), i, pow(), and result.

◆ elem_xpow() [8/50]

octave_value elem_xpow ( const Complex a,
const Matrix b 
)

Definition at line 900 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [9/50]

octave_value elem_xpow ( const Complex a,
const ComplexMatrix b 
)

Definition at line 923 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [10/50]

◆ elem_xpow() [11/50]

octave_value elem_xpow ( const ComplexMatrix a,
double  b 
)

Definition at line 981 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [12/50]

octave_value elem_xpow ( const ComplexMatrix a,
const Matrix b 
)

Definition at line 1013 of file xpow.cc.

References a, b, b_nc, b_nr, octave::err_nonconformant(), i, pow(), result, and xisint().

◆ elem_xpow() [13/50]

octave_value elem_xpow ( const ComplexMatrix a,
const Complex b 
)

Definition at line 1042 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [14/50]

octave_value elem_xpow ( const ComplexMatrix a,
const ComplexMatrix b 
)

Definition at line 1061 of file xpow.cc.

References a, b, b_nc, b_nr, octave::err_nonconformant(), i, pow(), and result.

◆ elem_xpow() [15/50]

octave_value elem_xpow ( double  a,
const NDArray b 
)

Definition at line 1114 of file xpow.cc.

References a, b, i, pow(), result, and retval.

◆ elem_xpow() [16/50]

octave_value elem_xpow ( double  a,
const ComplexNDArray b 
)

Definition at line 1147 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [17/50]

octave_value elem_xpow ( const NDArray a,
double  b 
)

Definition at line 1162 of file xpow.cc.

References a, b, i, pow(), result, retval, and xisint().

◆ elem_xpow() [18/50]

◆ elem_xpow() [19/50]

octave_value elem_xpow ( const NDArray a,
const Complex b 
)

Definition at line 1300 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [20/50]

octave_value elem_xpow ( const NDArray a,
const ComplexNDArray b 
)

Definition at line 1315 of file xpow.cc.

References a, b, bsxfun_pow(), octave::err_nonconformant(), i, is_valid_bsxfun(), pow(), and result.

◆ elem_xpow() [21/50]

octave_value elem_xpow ( const Complex a,
const NDArray b 
)

Definition at line 1341 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [22/50]

octave_value elem_xpow ( const Complex a,
const ComplexNDArray b 
)

Definition at line 1360 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [23/50]

octave_value elem_xpow ( const ComplexNDArray a,
double  b 
)

Definition at line 1375 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [24/50]

octave_value elem_xpow ( const ComplexNDArray a,
const NDArray b 
)

Definition at line 1410 of file xpow.cc.

References a, b, bsxfun_pow(), octave::err_nonconformant(), i, is_valid_bsxfun(), pow(), result, and xisint().

◆ elem_xpow() [25/50]

octave_value elem_xpow ( const ComplexNDArray a,
const Complex b 
)

Definition at line 1440 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [26/50]

octave_value elem_xpow ( const ComplexNDArray a,
const ComplexNDArray b 
)

Definition at line 1455 of file xpow.cc.

References a, b, bsxfun_pow(), octave::err_nonconformant(), i, is_valid_bsxfun(), pow(), and result.

◆ elem_xpow() [27/50]

octave_value elem_xpow ( float  a,
const FloatMatrix b 
)

Definition at line 2035 of file xpow.cc.

References a, b, i, pow(), result, and retval.

◆ elem_xpow() [28/50]

octave_value elem_xpow ( float  a,
const FloatComplexMatrix b 
)

Definition at line 2077 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [29/50]

octave_value elem_xpow ( const FloatMatrix a,
float  b 
)

Definition at line 2097 of file xpow.cc.

References a, b, i, pow(), result, retval, and xisint().

◆ elem_xpow() [30/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatMatrix b 
)

Definition at line 2139 of file xpow.cc.

References a, b, b_nc, b_nr, done, octave::err_nonconformant(), i, pow(), result, retval, and xisint().

◆ elem_xpow() [31/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplex b 
)

Definition at line 2202 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [32/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplexMatrix b 
)

Definition at line 2221 of file xpow.cc.

References a, b, b_nc, b_nr, octave::err_nonconformant(), i, pow(), and result.

◆ elem_xpow() [33/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatMatrix b 
)

Definition at line 2246 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [34/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexMatrix b 
)

Definition at line 2269 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [35/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
float  b 
)

Definition at line 2288 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [36/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatMatrix b 
)

Definition at line 2320 of file xpow.cc.

References a, b, b_nc, b_nr, octave::err_nonconformant(), i, pow(), result, and xisint().

◆ elem_xpow() [37/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplex b 
)

Definition at line 2349 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [38/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplexMatrix b 
)

Definition at line 2368 of file xpow.cc.

References a, b, b_nc, b_nr, octave::err_nonconformant(), i, pow(), and result.

◆ elem_xpow() [39/50]

octave_value elem_xpow ( float  a,
const FloatNDArray b 
)

Definition at line 2421 of file xpow.cc.

References a, b, i, pow(), result, and retval.

◆ elem_xpow() [40/50]

octave_value elem_xpow ( float  a,
const FloatComplexNDArray b 
)

Definition at line 2454 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [41/50]

octave_value elem_xpow ( const FloatNDArray a,
float  b 
)

Definition at line 2469 of file xpow.cc.

References a, b, i, pow(), result, retval, and xisint().

◆ elem_xpow() [42/50]

◆ elem_xpow() [43/50]

octave_value elem_xpow ( const FloatNDArray a,
const FloatComplex b 
)

Definition at line 2609 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [44/50]

octave_value elem_xpow ( const FloatNDArray a,
const FloatComplexNDArray b 
)

Definition at line 2624 of file xpow.cc.

References a, b, bsxfun_pow(), octave::err_nonconformant(), i, is_valid_bsxfun(), pow(), and result.

◆ elem_xpow() [45/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatNDArray b 
)

Definition at line 2650 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [46/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexNDArray b 
)

Definition at line 2669 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [47/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
float  b 
)

Definition at line 2684 of file xpow.cc.

References a, b, i, pow(), result, and xisint().

◆ elem_xpow() [48/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatNDArray b 
)

Definition at line 2719 of file xpow.cc.

References a, b, bsxfun_pow(), octave::err_nonconformant(), i, is_valid_bsxfun(), pow(), result, and xisint().

◆ elem_xpow() [49/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatComplex b 
)

Definition at line 2749 of file xpow.cc.

References a, b, i, pow(), and result.

◆ elem_xpow() [50/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatComplexNDArray b 
)

Definition at line 2764 of file xpow.cc.

References a, b, bsxfun_pow(), octave::err_nonconformant(), i, is_valid_bsxfun(), pow(), and result.

◆ err_failed_diagonalization()

static void err_failed_diagonalization ( void  )
static

Definition at line 59 of file xpow.cc.

References error().

Referenced by xpow().

◆ err_nonsquare_matrix()

static void err_nonsquare_matrix ( void  )
static

Definition at line 65 of file xpow.cc.

References error().

Referenced by xpow().

◆ same_sign()

static bool same_sign ( double  a,
double  b 
)
inlinestatic

Definition at line 706 of file xpow.cc.

References a, and b.

Referenced by elem_xpow().

◆ xisint()

template<typename T >
static bool xisint ( x)
inlinestatic

Definition at line 73 of file xpow.cc.

References max(), min(), x, and octave::math::x_nint().

Referenced by elem_xpow(), and xpow().

◆ xpow() [1/33]

octave_value xpow ( double  a,
double  b 
)

Definition at line 95 of file xpow.cc.

References a, b, pow(), retval, and xisint().

Referenced by xpow().

◆ xpow() [2/33]

◆ xpow() [3/33]

octave_value xpow ( double  a,
const Complex b 
)

Definition at line 156 of file xpow.cc.

References a, b, pow(), and result.

◆ xpow() [4/33]

◆ xpow() [5/33]

◆ xpow() [6/33]

octave_value xpow ( const DiagMatrix a,
double  b 
)

Definition at line 289 of file xpow.cc.

References a, b, DiagArray2< T >::dgelem(), err_nonsquare_matrix(), i, pow(), retval, and xisint().

◆ xpow() [7/33]

octave_value xpow ( const PermMatrix a,
double  b 
)

Definition at line 319 of file xpow.cc.

References a, b, xisint(), and xpow().

◆ xpow() [8/33]

octave_value xpow ( const Matrix a,
const Complex b 
)

◆ xpow() [9/33]

octave_value xpow ( const Complex a,
double  b 
)

Definition at line 363 of file xpow.cc.

References a, b, pow(), result, and xisint().

◆ xpow() [10/33]

octave_value xpow ( const Complex a,
const Matrix b 
)

◆ xpow() [11/33]

octave_value xpow ( const Complex a,
const Complex b 
)

Definition at line 416 of file xpow.cc.

References a, b, pow(), and result.

◆ xpow() [12/33]

octave_value xpow ( const Complex a,
const ComplexMatrix b 
)

◆ xpow() [13/33]

◆ xpow() [14/33]

octave_value xpow ( const ComplexMatrix a,
const Complex b 
)

◆ xpow() [15/33]

octave_value xpow ( const ComplexDiagMatrix a,
const Complex b 
)

Definition at line 584 of file xpow.cc.

References a, b, err_nonsquare_matrix(), i, pow(), and retval.

◆ xpow() [16/33]

octave_value xpow ( const ComplexDiagMatrix a,
double  b 
)

Definition at line 604 of file xpow.cc.

References a, b, and xpow().

◆ xpow() [17/33]

octave_value xpow ( const DiagMatrix a,
const Complex b 
)

Definition at line 610 of file xpow.cc.

References a, b, and xpow().

◆ xpow() [18/33]

octave_value xpow ( float  a,
float  b 
)

Definition at line 1494 of file xpow.cc.

References a, b, pow(), retval, and xisint().

◆ xpow() [19/33]

◆ xpow() [20/33]

octave_value xpow ( float  a,
const FloatComplex b 
)

Definition at line 1556 of file xpow.cc.

References a, b, pow(), and result.

◆ xpow() [21/33]

◆ xpow() [22/33]

◆ xpow() [23/33]

octave_value xpow ( const FloatDiagMatrix a,
float  b 
)

Definition at line 1689 of file xpow.cc.

References a, b, DiagArray2< T >::dgelem(), err_nonsquare_matrix(), i, pow(), retval, and xisint().

◆ xpow() [24/33]

◆ xpow() [25/33]

octave_value xpow ( const FloatComplex a,
float  b 
)

Definition at line 1753 of file xpow.cc.

References a, b, pow(), result, and xisint().

◆ xpow() [26/33]

◆ xpow() [27/33]

octave_value xpow ( const FloatComplex a,
const FloatComplex b 
)

Definition at line 1806 of file xpow.cc.

References a, b, pow(), and result.

◆ xpow() [28/33]

◆ xpow() [29/33]

◆ xpow() [30/33]

◆ xpow() [31/33]

octave_value xpow ( const FloatComplexDiagMatrix a,
const FloatComplex b 
)

Definition at line 1974 of file xpow.cc.

References a, b, err_nonsquare_matrix(), i, pow(), and retval.

◆ xpow() [32/33]

octave_value xpow ( const FloatComplexDiagMatrix a,
float  b 
)

Definition at line 1994 of file xpow.cc.

References a, b, and xpow().

◆ xpow() [33/33]

octave_value xpow ( const FloatDiagMatrix a,
const FloatComplex b 
)

Definition at line 2000 of file xpow.cc.

References a, b, and xpow().