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
Functions
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)
 
static int xisint (double x)
 
static int xisint (float 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

octave_value elem_xpow ( double  a,
const Matrix b 
)

Definition at line 640 of file xpow.cc.

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

Referenced by elem_xpow().

octave_value elem_xpow ( double  a,
const ComplexMatrix b 
)

Definition at line 682 of file xpow.cc.

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

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 
)

Definition at line 851 of file xpow.cc.

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

octave_value elem_xpow ( const Matrix a,
const ComplexMatrix b 
)
octave_value elem_xpow ( const Complex a,
const Matrix b 
)

Definition at line 895 of file xpow.cc.

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

octave_value elem_xpow ( const Complex a,
const ComplexMatrix b 
)

Definition at line 918 of file xpow.cc.

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

octave_value elem_xpow ( const Complex a,
const Range r 
)
octave_value elem_xpow ( const ComplexMatrix a,
double  b 
)

Definition at line 976 of file xpow.cc.

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

octave_value elem_xpow ( const ComplexMatrix a,
const Matrix b 
)
octave_value elem_xpow ( const ComplexMatrix a,
const Complex b 
)

Definition at line 1036 of file xpow.cc.

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

octave_value elem_xpow ( const ComplexMatrix a,
const ComplexMatrix b 
)
octave_value elem_xpow ( double  a,
const NDArray b 
)

Definition at line 1108 of file xpow.cc.

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

octave_value elem_xpow ( double  a,
const ComplexNDArray b 
)

Definition at line 1141 of file xpow.cc.

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

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 
)

Definition at line 1296 of file xpow.cc.

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

octave_value elem_xpow ( const NDArray a,
const ComplexNDArray b 
)
octave_value elem_xpow ( const Complex a,
const NDArray b 
)

Definition at line 1337 of file xpow.cc.

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

octave_value elem_xpow ( const Complex a,
const ComplexNDArray b 
)

Definition at line 1356 of file xpow.cc.

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

octave_value elem_xpow ( const ComplexNDArray a,
double  b 
)

Definition at line 1371 of file xpow.cc.

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

octave_value elem_xpow ( const ComplexNDArray a,
const NDArray b 
)
octave_value elem_xpow ( const ComplexNDArray a,
const Complex b 
)

Definition at line 1435 of file xpow.cc.

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

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 
)

Definition at line 2077 of file xpow.cc.

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

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 
)

Definition at line 2202 of file xpow.cc.

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

octave_value elem_xpow ( const FloatMatrix a,
const FloatComplexMatrix b 
)
octave_value elem_xpow ( const FloatComplex a,
const FloatMatrix b 
)

Definition at line 2246 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexMatrix b 
)

Definition at line 2269 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplexMatrix a,
float  b 
)

Definition at line 2288 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatMatrix b 
)
octave_value elem_xpow ( const FloatComplexMatrix a,
const FloatComplex b 
)

Definition at line 2348 of file xpow.cc.

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

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 
)

Definition at line 2453 of file xpow.cc.

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

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 
)

Definition at line 2608 of file xpow.cc.

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

octave_value elem_xpow ( const FloatNDArray a,
const FloatComplexNDArray b 
)
octave_value elem_xpow ( const FloatComplex a,
const FloatNDArray b 
)

Definition at line 2649 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplex a,
const FloatComplexNDArray b 
)

Definition at line 2668 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplexNDArray a,
float  b 
)

Definition at line 2683 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatNDArray b 
)
octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatComplex b 
)

Definition at line 2747 of file xpow.cc.

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

octave_value elem_xpow ( const FloatComplexNDArray a,
const FloatComplexNDArray b 
)
static void err_failed_diagonalization ( void  )
static

Definition at line 59 of file xpow.cc.

References error().

Referenced by xpow().

static void err_nonsquare_matrix ( void  )
static

Definition at line 65 of file xpow.cc.

References error().

Referenced by xpow().

static bool same_sign ( double  a,
double  b 
)
inlinestatic

Definition at line 701 of file xpow.cc.

Referenced by elem_xpow().

static int xisint ( double  x)
inlinestatic

Definition at line 71 of file xpow.cc.

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

Referenced by elem_xpow(), and xpow().

static int xisint ( float  x)
inlinestatic

Definition at line 1475 of file xpow.cc.

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

octave_value xpow ( double  a,
double  b 
)

Definition at line 93 of file xpow.cc.

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

Referenced by xpow().

octave_value xpow ( double  a,
const Matrix b 
)
octave_value xpow ( double  a,
const Complex b 
)

Definition at line 154 of file xpow.cc.

References pow(), and result.

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 
)

Definition at line 315 of file xpow.cc.

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

octave_value xpow ( const Matrix a,
const Complex b 
)
octave_value xpow ( const Complex a,
double  b 
)

Definition at line 360 of file xpow.cc.

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

octave_value xpow ( const Complex a,
const Matrix b 
)
octave_value xpow ( const Complex a,
const Complex b 
)

Definition at line 413 of file xpow.cc.

References pow(), and result.

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 
)

Definition at line 599 of file xpow.cc.

References xpow().

octave_value xpow ( const DiagMatrix a,
const Complex b 
)

Definition at line 605 of file xpow.cc.

References xpow().

octave_value xpow ( float  a,
float  b 
)

Definition at line 1497 of file xpow.cc.

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

octave_value xpow ( float  a,
const FloatMatrix b 
)
octave_value xpow ( float  a,
const FloatComplex b 
)

Definition at line 1559 of file xpow.cc.

References pow(), and result.

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 
)

Definition at line 1755 of file xpow.cc.

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

octave_value xpow ( const FloatComplex a,
const FloatMatrix b 
)
octave_value xpow ( const FloatComplex a,
const FloatComplex b 
)

Definition at line 1808 of file xpow.cc.

References pow(), and result.

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 
)

Definition at line 1994 of file xpow.cc.

References xpow().

octave_value xpow ( const FloatDiagMatrix a,
const FloatComplex b 
)

Definition at line 2000 of file xpow.cc.

References xpow().