GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lo-mappers.h File Reference
#include "octave-config.h"
#include <cmath>
#include <limits>
#include "lo-ieee.h"
#include "oct-cmplx.h"
#include "oct-inttypes-fwd.h"
Include dependency graph for lo-mappers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

OCTAVE_API Complex acos (const Complex &x)
 
OCTAVE_API FloatComplex acos (const FloatComplex &x)
 
OCTAVE_API Complex asin (const Complex &x)
 
OCTAVE_API FloatComplex asin (const FloatComplex &x)
 
Complex atan (const Complex &x)
 
FloatComplex atan (const FloatComplex &x)
 
template<typename T >
std::complex< T > ceil (const std::complex< T > &x)
 
template<typename T >
std::complex< T > conj (const std::complex< T > &x)
 
double conj (double x)
 
float conj (float x)
 
double copysign (double x, double y)
 
float copysign (float x, float y)
 
double exp2 (double x)
 
float exp2 (float x)
 
template<typename T >
std::complex< T > fix (const std::complex< T > &x)
 
double fix (double x)
 
float fix (float x)
 
template<typename T >
std::complex< T > floor (const std::complex< T > &x)
 
OCTAVE_API double frexp (double x, int *expptr)
 
OCTAVE_API float frexp (float x, int *expptr)
 
OCTAVE_API bool is_NaN_or_NA (const Complex &x)
 
OCTAVE_API bool is_NaN_or_NA (const FloatComplex &x)
 
template<typename T >
bool isfinite (const std::complex< T > &x)
 
bool isfinite (double x)
 
bool isfinite (float x)
 
template<typename T >
bool isinf (const octave_int< T > &)
 
template<typename T >
bool isinf (const std::complex< T > &x)
 
bool isinf (double x)
 
bool isinf (float x)
 
bool isinteger (double x)
 
bool isinteger (float x)
 
OCTAVE_API bool isna (const Complex &x)
 
OCTAVE_API bool isna (const FloatComplex &x)
 
OCTAVE_API bool isna (double x)
 
OCTAVE_API bool isna (float x)
 
bool isnan (bool)
 
bool isnan (char)
 
template<typename T >
bool isnan (const std::complex< T > &x)
 
bool isnan (double x)
 
bool isnan (float x)
 
OCTAVE_API Complex log2 (const Complex &x)
 
OCTAVE_API Complex log2 (const Complex &x, int &exp)
 
OCTAVE_API FloatComplex log2 (const FloatComplex &x)
 
OCTAVE_API FloatComplex log2 (const FloatComplex &x, int &exp)
 
double log2 (double x)
 
OCTAVE_API double log2 (double x, int &exp)
 
float log2 (float x)
 
OCTAVE_API float log2 (float x, int &exp)
 
template<typename T >
octave_int< T > max (const octave_int< T > &x, const octave_int< T > &y)
 
std::complex< double > max (const std::complex< double > &x, const std::complex< double > &y)
 
std::complex< float > max (const std::complex< float > &x, const std::complex< float > &y)
 
double max (double x, double y)
 
float max (float x, float y)
 
template<typename T >
max (T x, T y)
 
template<typename T >
octave_int< T > min (const octave_int< T > &x, const octave_int< T > &y)
 
std::complex< double > min (const std::complex< double > &x, const std::complex< double > &y)
 
std::complex< float > min (const std::complex< float > &x, const std::complex< float > &y)
 
double min (double x, double y)
 
float min (float x, float y)
 
template<typename T >
min (T x, T y)
 
template<typename T >
mod (T x, T y)
 
OCTAVE_API bool negative_sign (double x)
 
OCTAVE_API bool negative_sign (float x)
 
OCTAVE_API int nint (double x)
 
OCTAVE_API int nint (float x)
 
OCTAVE_API octave_idx_type nint_big (double x)
 
OCTAVE_API octave_idx_type nint_big (float x)
 
bool positive_sign (double x)
 
bool positive_sign (float x)
 
OCTAVE_API Complex rc_acos (double)
 
OCTAVE_API FloatComplex rc_acos (float)
 
OCTAVE_API Complex rc_acosh (double)
 
OCTAVE_API FloatComplex rc_acosh (float)
 
OCTAVE_API Complex rc_asin (double)
 
OCTAVE_API FloatComplex rc_asin (float)
 
OCTAVE_API Complex rc_atanh (double)
 
OCTAVE_API FloatComplex rc_atanh (float)
 
OCTAVE_API Complex rc_log (double)
 
OCTAVE_API FloatComplex rc_log (float)
 
OCTAVE_API Complex rc_log10 (double)
 
OCTAVE_API FloatComplex rc_log10 (float)
 
OCTAVE_API Complex rc_log2 (double)
 
OCTAVE_API FloatComplex rc_log2 (float)
 
OCTAVE_API Complex rc_sqrt (double)
 
OCTAVE_API FloatComplex rc_sqrt (float)
 
template<typename T >
rem (T x, T y)
 
template<typename T >
std::complex< T > round (const std::complex< T > &x)
 
double round (double x)
 
float round (float x)
 
template<typename T >
std::complex< T > roundb (const std::complex< T > &x)
 
double roundb (double x)
 
float roundb (float x)
 
double signbit (double x)
 
float signbit (float x)
 
template<typename T >
std::complex< T > signum (const std::complex< T > &x)
 
double signum (double x)
 
float signum (float x)
 
template<typename T >
std::complex< T > trunc (const std::complex< T > &x)
 
template<>
double x_nint (double x)
 
template<>
float x_nint (float x)
 
template<typename T >
x_nint (T x)
 

Function Documentation

◆ acos() [1/2]

◆ acos() [2/2]

OCTAVE_API FloatComplex acos ( const FloatComplex x)

Definition at line 96 of file lo-mappers.cc.

References acos(), conj(), imag(), real(), and x.

◆ asin() [1/2]

◆ asin() [2/2]

OCTAVE_API FloatComplex asin ( const FloatComplex x)

Definition at line 118 of file lo-mappers.cc.

References asin(), conj(), imag(), real(), and x.

◆ atan() [1/2]

◆ atan() [2/2]

FloatComplex atan ( const FloatComplex x)
inline

Definition at line 72 of file lo-mappers.h.

References atan(), and x.

◆ ceil()

◆ conj() [1/3]

template<typename T >
std::complex<T> conj ( const std::complex< T > &  x)

Definition at line 81 of file lo-mappers.h.

References conj(), and x.

◆ conj() [2/3]

double conj ( double  x)
inline

Definition at line 76 of file lo-mappers.h.

References x.

Referenced by conj().

◆ conj() [3/3]

float conj ( float  x)
inline

Definition at line 77 of file lo-mappers.h.

References x.

◆ copysign() [1/2]

double copysign ( double  x,
double  y 
)
inline

Definition at line 51 of file lo-mappers.h.

References x.

Referenced by Faddeeva_w(), Fquadcc(), mod(), and rem().

◆ copysign() [2/2]

float copysign ( float  x,
float  y 
)
inline

Definition at line 52 of file lo-mappers.h.

References x.

◆ exp2() [1/2]

double exp2 ( double  x)
inline

Definition at line 98 of file lo-mappers.h.

References x.

Referenced by base_det< T >::base_det(), F__betainc__(), F__expint__(), F__gammainc__(), and Fpow2().

◆ exp2() [2/2]

float exp2 ( float  x)
inline

Definition at line 99 of file lo-mappers.h.

References x.

◆ fix() [1/3]

template<typename T >
std::complex<T> fix ( const std::complex< T > &  x)

Definition at line 123 of file lo-mappers.h.

References trunc(), and x.

◆ fix() [2/3]

◆ fix() [3/3]

float fix ( float  x)
inline

Definition at line 119 of file lo-mappers.h.

References trunc(), and x.

◆ floor()

◆ frexp() [1/2]

OCTAVE_API double frexp ( double  x,
int *  expptr 
)

Definition at line 128 of file lo-mappers.cc.

References octave_frexp_wrapper(), and x.

Referenced by dblesplit(), eps(), log2(), and octave_frexp_wrapper().

◆ frexp() [2/2]

OCTAVE_API float frexp ( float  x,
int *  expptr 
)

Definition at line 133 of file lo-mappers.cc.

References octave_frexpf_wrapper(), and x.

◆ is_NaN_or_NA() [1/2]

OCTAVE_API bool is_NaN_or_NA ( const Complex x)

Definition at line 71 of file lo-mappers.cc.

References imag(), isnan(), real(), and x.

Referenced by textscan::scan_complex().

◆ is_NaN_or_NA() [2/2]

OCTAVE_API bool is_NaN_or_NA ( const FloatComplex x)

Definition at line 77 of file lo-mappers.cc.

References imag(), isnan(), real(), and x.

◆ isfinite() [1/3]

template<typename T >
bool isfinite ( const std::complex< T > &  x)

Definition at line 198 of file lo-mappers.h.

References imag(), isfinite(), real(), and x.

◆ isfinite() [2/3]

◆ isfinite() [3/3]

bool isfinite ( float  x)
inline

Definition at line 193 of file lo-mappers.h.

References isfinite(), and x.

◆ isinf() [1/4]

template<typename T >
bool isinf ( const octave_int< T > &  )

Definition at line 208 of file lo-mappers.h.

◆ isinf() [2/4]

template<typename T >
bool isinf ( const std::complex< T > &  x)

Definition at line 216 of file lo-mappers.h.

References imag(), isinf(), real(), and x.

◆ isinf() [3/4]

◆ isinf() [4/4]

bool isinf ( float  x)
inline

Definition at line 204 of file lo-mappers.h.

References isinf(), and x.

◆ isinteger() [1/2]

bool isinteger ( double  x)
inline

◆ isinteger() [2/2]

bool isinteger ( float  x)
inline

Definition at line 226 of file lo-mappers.h.

References isfinite(), round(), and x.

◆ isna() [1/4]

OCTAVE_API bool isna ( const Complex x)

Definition at line 53 of file lo-mappers.cc.

References imag(), isna(), real(), and x.

◆ isna() [2/4]

OCTAVE_API bool isna ( const FloatComplex x)

Definition at line 65 of file lo-mappers.cc.

References imag(), isna(), real(), and x.

◆ isna() [3/4]

◆ isna() [4/4]

OCTAVE_API bool isna ( float  x)

Definition at line 59 of file lo-mappers.cc.

References lo_ieee_is_NA, and x.

◆ isnan() [1/5]

bool isnan ( bool  )
inline

Definition at line 178 of file lo-mappers.h.

Referenced by sparse_lu< lu_type >::sparse_lu(), __lo_ieee_float_isnan(), __lo_ieee_isnan(), norm_accumulator_inf< R >::accum(), norm_accumulator_minf< R >::accum(), SparseMatrix::all_elements_are_int_or_inf_or_nan(), Range::all_elements_are_ints(), SparseComplexMatrix::any_element_is_inf_or_nan(), SparseMatrix::any_element_is_inf_or_nan(), SparseComplexMatrix::any_element_is_nan(), SparseMatrix::any_element_is_nan(), Sparse< T, Alloc >::SparseRep::any_element_is_nan(), octave_complex::bool_array_value(), octave_float_scalar::bool_array_value(), octave_float_complex::bool_array_value(), octave_scalar::bool_array_value(), octave_complex::bool_value(), octave_float_scalar::bool_value(), octave_float_complex::bool_value(), octave_scalar::bool_value(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), ComplexMatrix::column_max(), Matrix::column_max(), FloatComplexMatrix::column_max(), FloatMatrix::column_max(), ComplexMatrix::column_min(), Matrix::column_min(), FloatComplexMatrix::column_min(), FloatMatrix::column_min(), NDArray::concat(), FloatNDArray::concat(), charNDArray::concat(), convert_cdata_2(), octave_int_base< T >::convert_real(), octave_float_scalar::convert_to_str_internal(), octave_float_matrix::convert_to_str_internal(), octave_matrix::convert_to_str_internal(), octave_sparse_matrix::convert_to_str_internal(), octave_scalar::convert_to_str_internal(), cpolar(), ComplexMatrix::determinant(), FloatComplexMatrix::determinant(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), do_fft(), do_fft2(), do_fftn(), opengl_renderer::draw_patch(), drawcn(), EigsComplexNonSymmetricFunc(), EigsComplexNonSymmetricMatrix(), EigsComplexNonSymmetricMatrixShift(), EigsRealNonSymmetricFunc(), EigsRealNonSymmetricMatrix(), EigsRealNonSymmetricMatrixShift(), EigsRealSymmetricFunc(), EigsRealSymmetricMatrix(), EigsRealSymmetricMatrixShift(), eps(), err_invalid_index(), F__go_figure__(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Faddeeva_Dawson(), Faddeeva_erf(), Faddeeva_w(), Faudiowrite(), Fcolloc(), Finv(), ComplexMatrix::finverse(), Matrix::finverse(), FloatComplexMatrix::finverse(), FloatMatrix::finverse(), Fisnan(), Fpause(), ComplexMatrix::fsolve(), FloatComplexMatrix::fsolve(), FloatMatrix::fsolve(), Matrix::fsolve(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fspparms(), gamma(), is_int_or_inf_or_nan(), opengl_renderer::is_nan_or_inf(), is_NaN_or_NA(), is_singular2d(), is_singular3d(), isnan(), Array< T, Alloc >::issorted(), jcobi(), url_handle_manager::lookup(), ComplexMatrix::lssolve(), FloatComplexMatrix::lssolve(), FloatMatrix::lssolve(), Matrix::lssolve(), ComplexMatrix::ltsolve(), FloatComplexMatrix::ltsolve(), FloatMatrix::ltsolve(), Matrix::ltsolve(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), LuAminusSigmaB(), make_complex_scalar_format(), make_graphics_object(), make_scalar_format(), Utils::makeImageFromCData(), octave_complex::map(), octave_complex_matrix::map(), octave_sparse_complex_matrix::map(), octave_float_scalar::map(), octave_float_complex::map(), octave_float_complex_matrix::map(), octave_float_matrix::map(), octave_matrix::map(), octave_sparse_matrix::map(), octave_scalar::map(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), mx_inline_any_nan(), nan_ascending_compare(), nan_descending_compare(), octave_base_value::nint_value(), norm1(), Range::numel_internal(), oct_unop_not(), octave_handle::ok(), operator*(), pr_any_float(), octave_base_scalar< double >::print_raw(), rational_approx(), ComplexMatrix::rcond(), FloatComplexMatrix::rcond(), ComplexMatrix::row_max(), Matrix::row_max(), FloatComplexMatrix::row_max(), FloatMatrix::row_max(), ComplexMatrix::row_min(), Matrix::row_min(), FloatComplexMatrix::row_min(), FloatMatrix::row_min(), safe_comparator(), signum(), sort_isnan< Complex >(), sort_isnan< double >(), sort_isnan< float >(), sort_isnan< FloatComplex >(), sparse_ascending_compare< Complex >(), sparse_ascending_compare< double >(), sparse_descending_compare< Complex >(), sparse_descending_compare< double >(), ComplexMatrix::utsolve(), FloatComplexMatrix::utsolve(), FloatMatrix::utsolve(), Matrix::utsolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), xall_elements_are_ints(), xinit(), xis_true(), and xnumel_internal().

◆ isnan() [2/5]

bool isnan ( char  )
inline

Definition at line 179 of file lo-mappers.h.

◆ isnan() [3/5]

template<typename T >
bool isnan ( const std::complex< T > &  x)

Definition at line 187 of file lo-mappers.h.

References imag(), isnan(), real(), and x.

◆ isnan() [4/5]

bool isnan ( double  x)
inline

Definition at line 181 of file lo-mappers.h.

References isnan(), and x.

◆ isnan() [5/5]

bool isnan ( float  x)
inline

Definition at line 182 of file lo-mappers.h.

References isnan(), and x.

◆ log2() [1/8]

◆ log2() [2/8]

OCTAVE_API Complex log2 ( const Complex x,
int &  exp 
)

Definition at line 163 of file lo-mappers.cc.

References abs(), log2(), and x.

◆ log2() [3/8]

OCTAVE_API FloatComplex log2 ( const FloatComplex x)

Definition at line 145 of file lo-mappers.cc.

References x.

◆ log2() [4/8]

OCTAVE_API FloatComplex log2 ( const FloatComplex x,
int &  exp 
)

Definition at line 171 of file lo-mappers.cc.

References abs(), log2(), and x.

◆ log2() [5/8]

double log2 ( double  x)
inline

Definition at line 86 of file lo-mappers.h.

References x.

◆ log2() [6/8]

OCTAVE_API double log2 ( double  x,
int &  exp 
)

Definition at line 151 of file lo-mappers.cc.

References frexp(), and x.

◆ log2() [7/8]

float log2 ( float  x)
inline

Definition at line 87 of file lo-mappers.h.

References x.

◆ log2() [8/8]

OCTAVE_API float log2 ( float  x,
int &  exp 
)

Definition at line 157 of file lo-mappers.cc.

References frexp(), and x.

◆ max() [1/6]

template<typename T >
octave_int<T> max ( const octave_int< T > &  x,
const octave_int< T > &  y 
)
inline

Definition at line 434 of file lo-mappers.h.

References x, and xmax().

◆ max() [2/6]

std::complex<double> max ( const std::complex< double > &  x,
const std::complex< double > &  y 
)
inline

Definition at line 414 of file lo-mappers.h.

References abs(), isnan(), and x.

◆ max() [3/6]

std::complex<float> max ( const std::complex< float > &  x,
const std::complex< float > &  y 
)
inline

Definition at line 420 of file lo-mappers.h.

References abs(), isnan(), and x.

◆ max() [4/6]

double max ( double  x,
double  y 
)
inline

Definition at line 384 of file lo-mappers.h.

References isnan(), and x.

◆ max() [5/6]

float max ( float  x,
float  y 
)
inline

Definition at line 396 of file lo-mappers.h.

References isnan(), and x.

◆ max() [6/6]

template<typename T >
T max ( x,
y 
)

Definition at line 368 of file lo-mappers.h.

References x.

◆ min() [1/6]

template<typename T >
octave_int<T> min ( const octave_int< T > &  x,
const octave_int< T > &  y 
)
inline

Definition at line 427 of file lo-mappers.h.

References x, and xmin().

◆ min() [2/6]

std::complex<double> min ( const std::complex< double > &  x,
const std::complex< double > &  y 
)
inline

Definition at line 402 of file lo-mappers.h.

References abs(), isnan(), and x.

◆ min() [3/6]

std::complex<float> min ( const std::complex< float > &  x,
const std::complex< float > &  y 
)
inline

Definition at line 408 of file lo-mappers.h.

References abs(), isnan(), and x.

◆ min() [4/6]

double min ( double  x,
double  y 
)
inline

Definition at line 378 of file lo-mappers.h.

References isnan(), and x.

◆ min() [5/6]

float min ( float  x,
float  y 
)
inline

Definition at line 390 of file lo-mappers.h.

References isnan(), and x.

◆ min() [6/6]

template<typename T >
T min ( x,
y 
)

Definition at line 361 of file lo-mappers.h.

References x.

◆ mod()

◆ negative_sign() [1/2]

OCTAVE_API bool negative_sign ( double  x)

◆ negative_sign() [2/2]

OCTAVE_API bool negative_sign ( float  x)

Definition at line 179 of file lo-mappers.cc.

References __lo_ieee_float_signbit(), and x.

◆ nint() [1/2]

◆ nint() [2/2]

OCTAVE_API int nint ( float  x)

Definition at line 223 of file lo-mappers.cc.

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

◆ nint_big() [1/2]

◆ nint_big() [2/2]

OCTAVE_API octave_idx_type nint_big ( float  x)

Definition at line 198 of file lo-mappers.cc.

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

◆ positive_sign() [1/2]

bool positive_sign ( double  x)
inline

Definition at line 62 of file lo-mappers.h.

References negative_sign(), and x.

Referenced by NDArray::any_element_is_positive(), and FloatNDArray::any_element_is_positive().

◆ positive_sign() [2/2]

bool positive_sign ( float  x)
inline

Definition at line 63 of file lo-mappers.h.

References negative_sign(), and x.

◆ rc_acos() [1/2]

◆ rc_acos() [2/2]

OCTAVE_API FloatComplex rc_acos ( float  x)

Definition at line 242 of file lo-mappers.cc.

References acos(), and x.

◆ rc_acosh() [1/2]

◆ rc_acosh() [2/2]

OCTAVE_API FloatComplex rc_acosh ( float  x)

Definition at line 255 of file lo-mappers.cc.

References acosh(), and x.

◆ rc_asin() [1/2]

◆ rc_asin() [2/2]

OCTAVE_API FloatComplex rc_asin ( float  x)

Definition at line 267 of file lo-mappers.cc.

References asin(), and x.

◆ rc_atanh() [1/2]

◆ rc_atanh() [2/2]

OCTAVE_API FloatComplex rc_atanh ( float  x)

Definition at line 280 of file lo-mappers.cc.

References atanh(), and x.

◆ rc_log() [1/2]

◆ rc_log() [2/2]

OCTAVE_API FloatComplex rc_log ( float  x)

Definition at line 293 of file lo-mappers.cc.

References x.

◆ rc_log10() [1/2]

◆ rc_log10() [2/2]

OCTAVE_API FloatComplex rc_log10 ( float  x)

Definition at line 322 of file lo-mappers.cc.

References x.

◆ rc_log2() [1/2]

◆ rc_log2() [2/2]

OCTAVE_API FloatComplex rc_log2 ( float  x)

Definition at line 307 of file lo-mappers.cc.

References log2(), and x.

◆ rc_sqrt() [1/2]

◆ rc_sqrt() [2/2]

OCTAVE_API FloatComplex rc_sqrt ( float  x)

Definition at line 336 of file lo-mappers.cc.

References x.

◆ rem()

template<typename T >
T rem ( x,
y 
)

Definition at line 327 of file lo-mappers.h.

References abs(), copysign(), n, NaN, trunc(), x, and x_nint().

Referenced by time::time(), and Frem().

◆ round() [1/3]

template<typename T >
std::complex<T> round ( const std::complex< T > &  x)

Definition at line 141 of file lo-mappers.h.

References imag(), real(), round(), and x.

◆ round() [2/3]

◆ round() [3/3]

float round ( float  x)
inline

Definition at line 137 of file lo-mappers.h.

References x.

◆ roundb() [1/3]

template<typename T >
std::complex<T> roundb ( const std::complex< T > &  x)

Definition at line 170 of file lo-mappers.h.

References imag(), real(), roundb(), and x.

◆ roundb() [2/3]

◆ roundb() [3/3]

float roundb ( float  x)
inline

Definition at line 158 of file lo-mappers.h.

References round(), trunc(), and x.

◆ signbit() [1/2]

double signbit ( double  x)
inline

◆ signbit() [2/2]

float signbit ( float  x)
inline

Definition at line 55 of file lo-mappers.h.

References signbit(), and x.

◆ signum() [1/3]

template<typename T >
std::complex<T> signum ( const std::complex< T > &  x)

Definition at line 256 of file lo-mappers.h.

References abs(), and x.

◆ signum() [2/3]

◆ signum() [3/3]

float signum ( float  x)
inline

Definition at line 242 of file lo-mappers.h.

References isnan(), NaN, and x.

◆ trunc()

template<typename T >
std::complex<T> trunc ( const std::complex< T > &  x)

◆ x_nint() [1/3]

template<>
double x_nint ( double  x)
inline

Definition at line 275 of file lo-mappers.h.

References floor(), isfinite(), and x.

◆ x_nint() [2/3]

template<>
float x_nint ( float  x)
inline

Definition at line 281 of file lo-mappers.h.

References floor(), isfinite(), and x.

◆ x_nint() [3/3]