GNU Octave  8.1.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 octave::range< double > &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 octave::range< double > &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)
 
static bool xisint (float x)
 
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 949 of file xpow.cc.

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

◆ elem_xpow() [2/50]

octave_value elem_xpow ( const Complex a,
const ComplexNDArray b 
)

Definition at line 1388 of file xpow.cc.

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

◆ elem_xpow() [3/50]

octave_value elem_xpow ( const Complex a,
const Matrix b 
)

Definition at line 926 of file xpow.cc.

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

◆ elem_xpow() [4/50]

octave_value elem_xpow ( const Complex a,
const NDArray b 
)

Definition at line 1369 of file xpow.cc.

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

◆ elem_xpow() [5/50]

octave_value elem_xpow ( const Complex a,
const octave::range< double > &  r 
)

Definition at line 967 of file xpow.cc.

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

◆ elem_xpow() [6/50]

octave_value elem_xpow ( const ComplexMatrix a,
const Complex b 
)

Definition at line 1070 of file xpow.cc.

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

◆ elem_xpow() [7/50]

octave_value elem_xpow ( const ComplexMatrix a,
const ComplexMatrix b 
)

◆ 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 1009 of file xpow.cc.

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

◆ elem_xpow() [10/50]

octave_value elem_xpow ( const ComplexNDArray a,
const Complex b 
)

Definition at line 1468 of file xpow.cc.

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

◆ elem_xpow() [11/50]

◆ 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 
)

◆ elem_xpow() [14/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexMatrix b 
)

Definition at line 2308 of file xpow.cc.

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

◆ elem_xpow() [15/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexNDArray b 
)

Definition at line 2708 of file xpow.cc.

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

◆ elem_xpow() [16/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatMatrix b 
)

Definition at line 2285 of file xpow.cc.

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

◆ elem_xpow() [17/50]

octave_value elem_xpow ( const FloatComplex a,
const FloatNDArray b 
)

Definition at line 2689 of file xpow.cc.

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

◆ elem_xpow() [18/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplex b 
)

Definition at line 2388 of file xpow.cc.

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

◆ elem_xpow() [19/50]

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplexMatrix b 
)

◆ 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 2327 of file xpow.cc.

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

◆ elem_xpow() [22/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatComplex b 
)

Definition at line 2788 of file xpow.cc.

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

◆ elem_xpow() [23/50]

◆ elem_xpow() [24/50]

◆ elem_xpow() [25/50]

octave_value elem_xpow ( const FloatComplexNDArray a,
float  b 
)

◆ elem_xpow() [26/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplex b 
)

Definition at line 2241 of file xpow.cc.

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

◆ elem_xpow() [27/50]

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplexMatrix b 
)

◆ 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 2648 of file xpow.cc.

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

◆ elem_xpow() [31/50]

◆ elem_xpow() [32/50]

◆ elem_xpow() [33/50]

◆ elem_xpow() [34/50]

octave_value elem_xpow ( const Matrix a,
const Complex b 
)

Definition at line 882 of file xpow.cc.

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

◆ elem_xpow() [35/50]

octave_value elem_xpow ( const Matrix a,
const ComplexMatrix b 
)

◆ 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 1328 of file xpow.cc.

References Array< T, Alloc >::dims(), Array< T, Alloc >::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]

◆ elem_xpow() [42/50]

octave_value elem_xpow ( double  a,
const ComplexMatrix b 
)

Definition at line 711 of file xpow.cc.

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

◆ elem_xpow() [43/50]

octave_value elem_xpow ( double  a,
const ComplexNDArray b 
)

Definition at line 1175 of file xpow.cc.

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

◆ elem_xpow() [44/50]

octave_value elem_xpow ( double  a,
const Matrix b 
)

Definition at line 669 of file xpow.cc.

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

Referenced by elem_xpow().

◆ elem_xpow() [45/50]

octave_value elem_xpow ( double  a,
const NDArray b 
)

◆ elem_xpow() [46/50]

octave_value elem_xpow ( double  a,
const octave::range< double > &  r 
)

Definition at line 736 of file xpow.cc.

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

◆ elem_xpow() [47/50]

octave_value elem_xpow ( float  a,
const FloatComplexMatrix b 
)

Definition at line 2116 of file xpow.cc.

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

◆ elem_xpow() [48/50]

octave_value elem_xpow ( float  a,
const FloatComplexNDArray b 
)

Definition at line 2493 of file xpow.cc.

References Array< T, Alloc >::dims(), Array< T, Alloc >::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 62 of file xpow.cc.

References error().

Referenced by xpow().

◆ err_nonsquare_matrix()

static void err_nonsquare_matrix ( void  )
static

Definition at line 68 of file xpow.cc.

References error().

Referenced by xpow().

◆ same_sign()

static bool same_sign ( double  a,
double  b 
)
inlinestatic

Definition at line 730 of file xpow.cc.

Referenced by elem_xpow().

◆ xisint() [1/2]

static bool xisint ( float  x)
inlinestatic

Definition at line 84 of file xpow.cc.

References max(), min(), x, and x_nint().

◆ xisint() [2/2]

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

Definition at line 76 of file xpow.cc.

References max(), min(), x, and x_nint().

Referenced by elem_xpow(), and xpow().

◆ xpow() [1/33]

octave_value xpow ( const Complex a,
const Complex b 
)

Definition at line 433 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 382 of file xpow.cc.

References pow(), and xisint().

◆ xpow() [5/33]

◆ xpow() [6/33]

octave_value xpow ( const ComplexDiagMatrix a,
double  b 
)

Definition at line 628 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 634 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 1838 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 1787 of file xpow.cc.

References pow(), and xisint().

◆ xpow() [15/33]

◆ xpow() [16/33]

octave_value xpow ( const FloatComplexDiagMatrix a,
float  b 
)

Definition at line 2033 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 2039 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 335 of file xpow.cc.

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

◆ xpow() [26/33]

octave_value xpow ( double  a,
const Complex b 
)

Definition at line 167 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 108 of file xpow.cc.

References pow(), and xisint().

Referenced by xpow().

◆ xpow() [30/33]

octave_value xpow ( float  a,
const FloatComplex b 
)

Definition at line 1582 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 1522 of file xpow.cc.

References pow(), and xisint().