GNU Octave  9.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"

Go to the source code of this file.

Functions

Complex acos (const Complex &x)
 
FloatComplex acos (const FloatComplex &x)
 
Complex asin (const Complex &x)
 
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)
 
double frexp (double x, int *expptr)
 
float frexp (float x, int *expptr)
 
bool is_NaN_or_NA (const Complex &x)
 
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)
 
bool isna (const Complex &x)
 
bool isna (const FloatComplex &x)
 
bool isna (double x)
 
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)
 
Complex log2 (const Complex &x)
 
Complex log2 (const Complex &x, int &exp)
 
FloatComplex log2 (const FloatComplex &x)
 
FloatComplex log2 (const FloatComplex &x, int &exp)
 
double log2 (double x)
 
double log2 (double x, int &exp)
 
float log2 (float x)
 
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)
 
bool negative_sign (double x)
 
bool negative_sign (float x)
 
int nint (double x)
 
int nint (float x)
 
octave_idx_type nint_big (double x)
 
octave_idx_type nint_big (float x)
 
bool positive_sign (double x)
 
bool positive_sign (float x)
 
Complex rc_acos (double)
 
FloatComplex rc_acos (float)
 
Complex rc_acosh (double)
 
FloatComplex rc_acosh (float)
 
Complex rc_asin (double)
 
FloatComplex rc_asin (float)
 
Complex rc_atanh (double)
 
FloatComplex rc_atanh (float)
 
Complex rc_log (double)
 
FloatComplex rc_log (float)
 
Complex rc_log10 (double)
 
FloatComplex rc_log10 (float)
 
Complex rc_log2 (double)
 
FloatComplex rc_log2 (float)
 
Complex rc_sqrt (double)
 
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]

Complex acos ( const Complex x)

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

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

Referenced by acos(), Facos(), and rc_acos().

◆ acos() [2/2]

FloatComplex acos ( const FloatComplex x)

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

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

◆ asin() [1/2]

Complex asin ( const Complex x)

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

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

Referenced by asin(), ellipj(), Fasin(), and rc_asin().

◆ asin() [2/2]

FloatComplex asin ( const FloatComplex x)

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

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

◆ atan() [1/2]

Complex atan ( const Complex x)
inline

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

References x.

Referenced by atan(), cbknu(), cunhj(), Fatan(), Fpi(), and text::properties::get_extent_matrix().

◆ atan() [2/2]

FloatComplex atan ( const FloatComplex x)
inline

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

References atan(), and x.

◆ ceil()

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

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

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

double fix ( double  x)
inline

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

References trunc(), and x.

Referenced by Ffind(), Ffix(), octave_base_value::nint_value(), operator*(), operator/(), pow(), and powf().

◆ fix() [3/3]

float fix ( float  x)
inline

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

References trunc(), and x.

◆ floor()

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

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

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

Referenced by err_invalid_index(), Ffloor(), Frandperm(), rand_poisson(), octave_cell::save_hdf5(), x_nint(), xpsi(), and xtfloor().

◆ frexp() [1/2]

double frexp ( double  x,
int *  expptr 
)

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

References octave_frexp_wrapper(), and x.

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

◆ frexp() [2/2]

float frexp ( float  x,
int *  expptr 
)

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

References octave_frexpf_wrapper(), and x.

◆ is_NaN_or_NA() [1/2]

bool is_NaN_or_NA ( const Complex x)

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

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

◆ is_NaN_or_NA() [2/2]

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]

bool isna ( const Complex x)

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

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

◆ isna() [2/4]

bool isna ( const FloatComplex x)

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

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

◆ isna() [3/4]

bool isna ( double  x)

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

References lo_ieee_is_NA, and x.

Referenced by Fisna(), and isna().

◆ isna() [4/4]

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(), SparseMatrix::all_elements_are_int_or_inf_or_nan(), 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(), 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(), 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(), ov_range< T >::could_be_trivial_range(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), double_property::do_set(), handle_property::do_set(), opengl_renderer::draw_patch(), eps(), err_invalid_index(), F__go_figure__(), Faddeeva_Dawson(), Faddeeva_erf(), Fcolloc(), Finv(), Fisnan(), Fspparms(), gamma(), is_int_or_inf_or_nan(), is_NaN_or_NA(), octave_base_scalar< ST >::is_true(), isnan(), Array< T, Alloc >::issorted(), linspace(), url_handle_manager::lookup(), gh_manager::lookup(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), mx_inline_any_nan(), octave_base_value::nint_value(), octave_handle::ok(), operator*(), rational_approx(), read_fp_value(), 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(), root_figure::properties::set_callbackobject(), figure::properties::set_currentaxes(), root_figure::properties::set_currentfigure(), 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 >(), 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]

Complex log2 ( const Complex x,
int &  exp 
)

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

◆ log2() [3/8]

FloatComplex log2 ( const FloatComplex x)

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

References x.

◆ log2() [4/8]

FloatComplex log2 ( const FloatComplex x,
int &  exp 
)

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

◆ log2() [5/8]

double log2 ( double  x)
inline

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

References x.

◆ log2() [6/8]

double log2 ( double  x,
int &  exp 
)

Definition at line 153 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]

float log2 ( float  x,
int &  exp 
)

Definition at line 159 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.

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

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

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

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

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

◆ negative_sign() [1/2]

bool negative_sign ( double  x)

◆ negative_sign() [2/2]

bool negative_sign ( float  x)

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

References __lo_ieee_float_signbit(), and x.

◆ nint() [1/2]

◆ nint() [2/2]

int nint ( float  x)

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

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

◆ nint_big() [1/2]

octave_idx_type nint_big ( double  x)

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

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

Referenced by NDArray::concat(), FloatNDArray::concat(), charNDArray::concat(), Fcolloc(), and xall_elements_are_ints().

◆ nint_big() [2/2]

octave_idx_type nint_big ( float  x)

Definition at line 202 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]

Complex rc_acos ( double  x)

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

References acos(), and x.

◆ rc_acos() [2/2]

FloatComplex rc_acos ( float  x)

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

References acos(), and x.

◆ rc_acosh() [1/2]

Complex rc_acosh ( double  x)

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

References acosh(), and x.

◆ rc_acosh() [2/2]

FloatComplex rc_acosh ( float  x)

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

References acosh(), and x.

◆ rc_asin() [1/2]

Complex rc_asin ( double  x)

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

References asin(), and x.

◆ rc_asin() [2/2]

FloatComplex rc_asin ( float  x)

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

References asin(), and x.

◆ rc_atanh() [1/2]

Complex rc_atanh ( double  x)

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

References atanh(), and x.

◆ rc_atanh() [2/2]

FloatComplex rc_atanh ( float  x)

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

References atanh(), and x.

◆ rc_log() [1/2]

Complex rc_log ( double  x)

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

References x.

◆ rc_log() [2/2]

FloatComplex rc_log ( float  x)

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

References x.

◆ rc_log10() [1/2]

Complex rc_log10 ( double  x)

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

References x.

◆ rc_log10() [2/2]

FloatComplex rc_log10 ( float  x)

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

References x.

◆ rc_log2() [1/2]

Complex rc_log2 ( double  x)

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

References log2(), and x.

◆ rc_log2() [2/2]

FloatComplex rc_log2 ( float  x)

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

References log2(), and x.

◆ rc_sqrt() [1/2]

Complex rc_sqrt ( double  x)

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

References x.

Referenced by octave_float_diag_matrix::map(), and octave_diag_matrix::map().

◆ rc_sqrt() [2/2]

FloatComplex rc_sqrt ( float  x)

Definition at line 340 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 NaN, 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]

double round ( double  x)
inline

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

double roundb ( double  x)
inline

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

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

Referenced by Froundb(), and roundb().

◆ 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

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

References x.

Referenced by __lo_ieee_float_signbit(), __lo_ieee_signbit(), and signbit().

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

◆ signum() [2/3]

double signum ( double  x)
inline

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