GNU Octave  6.2.0
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 (const Complex &a, const ComplexMatrix &b)
 
octave_value elem_xpow (const Complex &a, const ComplexNDArray &b)
 
octave_value elem_xpow (const Complex &a, const Matrix &b)
 
octave_value elem_xpow (const Complex &a, const NDArray &b)
 
octave_value elem_xpow (const Complex &a, const Range &r)
 
octave_value elem_xpow (const ComplexMatrix &a, const Complex &b)
 
octave_value elem_xpow (const ComplexMatrix &a, const ComplexMatrix &b)
 
octave_value elem_xpow (const ComplexMatrix &a, const Matrix &b)
 
octave_value elem_xpow (const ComplexMatrix &a, double 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 (const ComplexNDArray &a, const NDArray &b)
 
octave_value elem_xpow (const ComplexNDArray &a, double b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatComplexMatrix &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatComplexNDArray &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatMatrix &b)
 
octave_value elem_xpow (const FloatComplex &a, const FloatNDArray &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 (const FloatComplexMatrix &a, const FloatMatrix &b)
 
octave_value elem_xpow (const FloatComplexMatrix &a, float b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, const FloatComplex &b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, const FloatComplexNDArray &b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, const FloatNDArray &b)
 
octave_value elem_xpow (const FloatComplexNDArray &a, float 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 FloatMatrix &a, const FloatMatrix &b)
 
octave_value elem_xpow (const FloatMatrix &a, float 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 FloatNDArray &a, const FloatNDArray &b)
 
octave_value elem_xpow (const FloatNDArray &a, float 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 Matrix &a, const Matrix &b)
 
octave_value elem_xpow (const Matrix &a, double 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 NDArray &a, const NDArray &b)
 
octave_value elem_xpow (const NDArray &a, double b)
 
octave_value elem_xpow (double a, const ComplexMatrix &b)
 
octave_value elem_xpow (double a, const ComplexNDArray &b)
 
octave_value elem_xpow (double a, const Matrix &b)
 
octave_value elem_xpow (double a, const NDArray &b)
 
octave_value elem_xpow (double a, const Range &r)
 
octave_value elem_xpow (float a, const FloatComplexMatrix &b)
 
octave_value elem_xpow (float a, const FloatComplexNDArray &b)
 
octave_value elem_xpow (float a, const FloatMatrix &b)
 
octave_value elem_xpow (float a, const FloatNDArray &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 (const Complex &a, const Complex &b)
 
octave_value xpow (const Complex &a, const ComplexMatrix &b)
 
octave_value xpow (const Complex &a, const Matrix &b)
 
octave_value xpow (const Complex &a, double b)
 
octave_value xpow (const ComplexDiagMatrix &a, const Complex &b)
 
octave_value xpow (const ComplexDiagMatrix &a, double b)
 
octave_value xpow (const ComplexMatrix &a, const Complex &b)
 
octave_value xpow (const ComplexMatrix &a, double b)
 
octave_value xpow (const DiagMatrix &a, const Complex &b)
 
octave_value xpow (const DiagMatrix &a, double b)
 
octave_value xpow (const FloatComplex &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplex &a, const FloatComplexMatrix &b)
 
octave_value xpow (const FloatComplex &a, const FloatMatrix &b)
 
octave_value xpow (const FloatComplex &a, float b)
 
octave_value xpow (const FloatComplexDiagMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplexDiagMatrix &a, float b)
 
octave_value xpow (const FloatComplexMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatComplexMatrix &a, float b)
 
octave_value xpow (const FloatDiagMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatDiagMatrix &a, float b)
 
octave_value xpow (const FloatMatrix &a, const FloatComplex &b)
 
octave_value xpow (const FloatMatrix &a, float b)
 
octave_value xpow (const Matrix &a, const Complex &b)
 
octave_value xpow (const Matrix &a, double b)
 
octave_value xpow (const PermMatrix &a, double b)
 
octave_value xpow (double a, const Complex &b)
 
octave_value xpow (double a, const ComplexMatrix &b)
 
octave_value xpow (double a, const Matrix &b)
 
octave_value xpow (double a, double b)
 
octave_value xpow (float a, const FloatComplex &b)
 
octave_value xpow (float a, const FloatComplexMatrix &b)
 
octave_value xpow (float a, const FloatMatrix &b)
 
octave_value xpow (float a, float b)
 

Function Documentation

◆ elem_xpow() [1/50]

octave_value elem_xpow ( const Complex a,
const ComplexMatrix b 
)

Definition at line 925 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [2/50]

octave_value elem_xpow ( const Complex a,
const ComplexNDArray b 
)

Definition at line 1362 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [3/50]

octave_value elem_xpow ( const Complex a,
const Matrix b 
)

Definition at line 902 of file xpow.cc.

References Array< T >::cols(), pow(), Array< T >::rows(), and xisint().

◆ elem_xpow() [4/50]

octave_value elem_xpow ( const Complex a,
const NDArray b 
)

Definition at line 1343 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), pow(), and xisint().

◆ elem_xpow() [5/50]

octave_value elem_xpow ( const Complex a,
const Range r 
)

Definition at line 943 of file xpow.cc.

References elem_xpow(), n, pow(), r, retval, and same_sign().

◆ elem_xpow() [6/50]

octave_value elem_xpow ( const ComplexMatrix a,
const Complex b 
)

Definition at line 1044 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [7/50]

octave_value elem_xpow ( const ComplexMatrix a,
const ComplexMatrix b 
)

Definition at line 1063 of file xpow.cc.

References Array< T >::cols(), octave::err_nonconformant(), pow(), and Array< T >::rows().

◆ elem_xpow() [8/50]

octave_value elem_xpow ( const ComplexMatrix a,
const Matrix b 
)

◆ elem_xpow() [9/50]

octave_value elem_xpow ( const ComplexMatrix a,
double  b 
)

Definition at line 983 of file xpow.cc.

References Array< T >::cols(), pow(), Array< T >::rows(), and xisint().

◆ elem_xpow() [10/50]

octave_value elem_xpow ( const ComplexNDArray a,
const Complex b 
)

Definition at line 1442 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [11/50]

octave_value elem_xpow ( const ComplexNDArray a,
const ComplexNDArray b 
)

◆ elem_xpow() [12/50]

octave_value elem_xpow ( const ComplexNDArray a,
const NDArray b 
)

◆ elem_xpow() [13/50]

octave_value elem_xpow ( const ComplexNDArray a,
double  b 
)

Definition at line 1377 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), pow(), Array< T >::xelem(), and xisint().

◆ elem_xpow() [14/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexMatrix b 
)

Definition at line 2271 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [15/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexNDArray b 
)

Definition at line 2671 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [16/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatMatrix b 
)

Definition at line 2248 of file xpow.cc.

References Array< T >::cols(), pow(), Array< T >::rows(), and xisint().

◆ elem_xpow() [17/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatNDArray b 
)

Definition at line 2652 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), pow(), and xisint().

◆ elem_xpow() [18/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplex b 
)

Definition at line 2351 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [19/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplexMatrix b 
)

Definition at line 2370 of file xpow.cc.

References Array< T >::cols(), octave::err_nonconformant(), pow(), and Array< T >::rows().

◆ elem_xpow() [20/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatMatrix b 
)

◆ elem_xpow() [21/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
float  b 
)

Definition at line 2290 of file xpow.cc.

References Array< T >::cols(), pow(), Array< T >::rows(), and xisint().

◆ elem_xpow() [22/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatComplex b 
)

Definition at line 2751 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [23/50]

◆ elem_xpow() [24/50]

◆ elem_xpow() [25/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
float  b 
)

Definition at line 2686 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), pow(), Array< T >::xelem(), and xisint().

◆ elem_xpow() [26/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplex b 
)

Definition at line 2204 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [27/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplexMatrix b 
)

Definition at line 2223 of file xpow.cc.

References Array< T >::cols(), octave::err_nonconformant(), pow(), and Array< T >::rows().

◆ elem_xpow() [28/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatMatrix b 
)

◆ elem_xpow() [29/50]

octave_value elem_xpow ( const FloatMatrix a,
float  b 
)

◆ elem_xpow() [30/50]

octave_value elem_xpow ( const FloatNDArray a,
const FloatComplex b 
)

Definition at line 2611 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [31/50]

octave_value elem_xpow ( const FloatNDArray a,
const FloatComplexNDArray b 
)

◆ elem_xpow() [32/50]

◆ elem_xpow() [33/50]

octave_value elem_xpow ( const FloatNDArray a,
float  b 
)

◆ elem_xpow() [34/50]

octave_value elem_xpow ( const Matrix a,
const Complex b 
)

Definition at line 858 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [35/50]

octave_value elem_xpow ( const Matrix a,
const ComplexMatrix b 
)

Definition at line 877 of file xpow.cc.

References Array< T >::cols(), octave::err_nonconformant(), pow(), and Array< T >::rows().

◆ elem_xpow() [36/50]

octave_value elem_xpow ( const Matrix a,
const Matrix b 
)

◆ elem_xpow() [37/50]

octave_value elem_xpow ( const Matrix a,
double  b 
)

◆ elem_xpow() [38/50]

octave_value elem_xpow ( const NDArray a,
const Complex b 
)

Definition at line 1302 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [39/50]

octave_value elem_xpow ( const NDArray a,
const ComplexNDArray b 
)

◆ elem_xpow() [40/50]

◆ elem_xpow() [41/50]

octave_value elem_xpow ( const NDArray a,
double  b 
)

◆ elem_xpow() [42/50]

octave_value elem_xpow ( double  a,
const ComplexMatrix b 
)

Definition at line 689 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [43/50]

octave_value elem_xpow ( double  a,
const ComplexNDArray b 
)

Definition at line 1149 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [44/50]

octave_value elem_xpow ( double  a,
const Matrix b 
)

Definition at line 647 of file xpow.cc.

References NDArray::all_integers(), Array< T >::cols(), pow(), retval, and Array< T >::rows().

Referenced by elem_xpow().

◆ elem_xpow() [45/50]

octave_value elem_xpow ( double  a,
const NDArray b 
)

Definition at line 1116 of file xpow.cc.

References NDArray::all_integers(), Array< T >::dims(), Array< T >::numel(), pow(), and retval.

◆ elem_xpow() [46/50]

octave_value elem_xpow ( double  a,
const Range r 
)

Definition at line 714 of file xpow.cc.

References elem_xpow(), n, pow(), r, retval, and same_sign().

◆ elem_xpow() [47/50]

octave_value elem_xpow ( float  a,
const FloatComplexMatrix b 
)

Definition at line 2079 of file xpow.cc.

References Array< T >::cols(), pow(), and Array< T >::rows().

◆ elem_xpow() [48/50]

octave_value elem_xpow ( float  a,
const FloatComplexNDArray b 
)

Definition at line 2456 of file xpow.cc.

References Array< T >::dims(), Array< T >::numel(), and pow().

◆ elem_xpow() [49/50]

octave_value elem_xpow ( float  a,
const FloatMatrix b 
)

◆ elem_xpow() [50/50]

octave_value elem_xpow ( float  a,
const FloatNDArray b 
)

◆ err_failed_diagonalization()

static void err_failed_diagonalization ( void  )
static

Definition at line 61 of file xpow.cc.

References error().

Referenced by xpow().

◆ err_nonsquare_matrix()

static void err_nonsquare_matrix ( void  )
static

Definition at line 67 of file xpow.cc.

References error().

Referenced by xpow().

◆ same_sign()

static bool same_sign ( double  a,
double  b 
)
inlinestatic

Definition at line 708 of file xpow.cc.

Referenced by elem_xpow().

◆ xisint()

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

Definition at line 75 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 ( const Complex a,
const Complex b 
)

Definition at line 418 of file xpow.cc.

References pow().

◆ xpow() [2/33]

◆ xpow() [3/33]

◆ xpow() [4/33]

octave_value xpow ( const Complex a,
double  b 
)

Definition at line 365 of file xpow.cc.

References pow(), and xisint().

◆ xpow() [5/33]

octave_value xpow ( const ComplexDiagMatrix a,
const Complex b 
)

◆ xpow() [6/33]

octave_value xpow ( const ComplexDiagMatrix a,
double  b 
)

Definition at line 606 of file xpow.cc.

References xpow().

◆ xpow() [7/33]

◆ xpow() [8/33]

◆ xpow() [9/33]

octave_value xpow ( const DiagMatrix a,
const Complex b 
)

Definition at line 612 of file xpow.cc.

References xpow().

◆ xpow() [10/33]

octave_value xpow ( const DiagMatrix a,
double  b 
)

◆ xpow() [11/33]

octave_value xpow ( const FloatComplex a,
const FloatComplex b 
)

Definition at line 1808 of file xpow.cc.

References pow().

◆ xpow() [12/33]

◆ xpow() [13/33]

◆ xpow() [14/33]

octave_value xpow ( const FloatComplex a,
float  b 
)

Definition at line 1755 of file xpow.cc.

References pow(), and xisint().

◆ xpow() [15/33]

octave_value xpow ( const FloatComplexDiagMatrix a,
const FloatComplex b 
)

◆ xpow() [16/33]

octave_value xpow ( const FloatComplexDiagMatrix a,
float  b 
)

Definition at line 1996 of file xpow.cc.

References xpow().

◆ xpow() [17/33]

◆ xpow() [18/33]

◆ xpow() [19/33]

octave_value xpow ( const FloatDiagMatrix a,
const FloatComplex b 
)

Definition at line 2002 of file xpow.cc.

References xpow().

◆ xpow() [20/33]

◆ xpow() [21/33]

◆ xpow() [22/33]

◆ xpow() [23/33]

◆ xpow() [24/33]

◆ xpow() [25/33]

octave_value xpow ( const PermMatrix a,
double  b 
)

Definition at line 321 of file xpow.cc.

References PermMatrix::power(), xisint(), and xpow().

◆ xpow() [26/33]

octave_value xpow ( double  a,
const Complex b 
)

Definition at line 158 of file xpow.cc.

References pow().

◆ xpow() [27/33]

◆ xpow() [28/33]

◆ xpow() [29/33]

octave_value xpow ( double  a,
double  b 
)

Definition at line 97 of file xpow.cc.

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

Referenced by xpow().

◆ xpow() [30/33]

octave_value xpow ( float  a,
const FloatComplex b 
)

Definition at line 1558 of file xpow.cc.

References pow().

◆ xpow() [31/33]

◆ xpow() [32/33]

◆ xpow() [33/33]

octave_value xpow ( float  a,
float  b 
)

Definition at line 1496 of file xpow.cc.

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