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

Go to the source code of this file.

Functions

template<typename F , typename T , bool zero>
bool any_all_test (F fcn, const T *m, octave_idx_type len)
 
OCTAVE_API std::string fgetl (std::FILE *)
 
OCTAVE_API std::string fgetl (std::FILE *, bool &eof)
 
OCTAVE_API std::string fgets (std::FILE *)
 
OCTAVE_API std::string fgets (std::FILE *, bool &eof)
 
OCTAVE_API bool int_multiply_overflow (int a, int b, int *r)
 
OCTAVE_API bool int_multiply_overflow (long int a, long int b, long int *r)
 
OCTAVE_API bool int_multiply_overflow (unsigned int a, unsigned int b, unsigned int *r)
 
OCTAVE_API bool int_multiply_overflow (unsigned long int a, unsigned long int b, unsigned long int *r)
 
OCTAVE_API bool is_int_or_inf_or_nan (float x)
 
template<typename T >
bool is_one_or_zero (const T &x)
 
template<typename T >
bool is_zero (const T &x)
 
template<typename T >
OCTAVE_APIread_value (std::istream &is)
 
template<>
OCTAVE_API double read_value (std::istream &is)
 
OCTAVE_API char * strsave (const char *)
 
OCTAVE_API bool too_large_for_float (const Complex &x)
 
OCTAVE_API bool too_large_for_float (double x)
 
OCTAVE_API bool too_large_for_float (float x)
 
template<>
OCTAVE_API void write_value (std::ostream &os, const Complex &value)
 
template<>
OCTAVE_API void write_value (std::ostream &os, const double &value)
 
template<>
OCTAVE_API void write_value (std::ostream &os, const float &value)
 
template<>
OCTAVE_API void write_value (std::ostream &os, const FloatComplex &value)
 
template<typename T >
OCTAVE_API void write_value (std::ostream &os, const T &value)
 
OCTAVE_API bool xis_int_or_inf_or_nan (double x)
 

Function Documentation

◆ any_all_test()

template<typename F , typename T , bool zero>
bool any_all_test ( fcn,
const T *  m,
octave_idx_type  len 
)

Definition at line 45 of file lo-utils.h.

References len, and m.

◆ fgetl() [1/2]

OCTAVE_API std::string fgetl ( std::FILE *  )

◆ fgetl() [2/2]

OCTAVE_API std::string fgetl ( std::FILE *  ,
bool &  eof 
)

◆ fgets() [1/2]

OCTAVE_API std::string fgets ( std::FILE *  )

◆ fgets() [2/2]

OCTAVE_API std::string fgets ( std::FILE *  ,
bool &  eof 
)

◆ int_multiply_overflow() [1/4]

OCTAVE_API bool int_multiply_overflow ( int  a,
int  b,
int *  r 
)

Definition at line 480 of file lo-utils.cc.

References octave_i_multiply_overflow_wrapper(), and r.

◆ int_multiply_overflow() [2/4]

OCTAVE_API bool int_multiply_overflow ( long int  a,
long int  b,
long int *  r 
)

Definition at line 485 of file lo-utils.cc.

References octave_li_multiply_overflow_wrapper(), and r.

◆ int_multiply_overflow() [3/4]

OCTAVE_API bool int_multiply_overflow ( unsigned int  a,
unsigned int  b,
unsigned int *  r 
)

Definition at line 498 of file lo-utils.cc.

References octave_ui_multiply_overflow_wrapper(), and r.

◆ int_multiply_overflow() [4/4]

OCTAVE_API bool int_multiply_overflow ( unsigned long int  a,
unsigned long int  b,
unsigned long int *  r 
)

Definition at line 504 of file lo-utils.cc.

References octave_uli_multiply_overflow_wrapper(), and r.

◆ is_int_or_inf_or_nan()

OCTAVE_API bool is_int_or_inf_or_nan ( float  x)

Definition at line 67 of file lo-utils.cc.

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

◆ is_one_or_zero()

template<typename T >
bool is_one_or_zero ( const T &  x)

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

References x.

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

◆ is_zero()

template<typename T >
bool is_zero ( const T &  x)

Definition at line 78 of file lo-utils.h.

References x.

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

◆ read_value() [1/2]

template<typename T >
OCTAVE_API T read_value ( std::istream &  is)

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

◆ read_value() [2/2]

template<>
OCTAVE_API double read_value ( std::istream &  is)

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

◆ strsave()

OCTAVE_API char* strsave ( const char *  s)

Definition at line 74 of file lo-utils.cc.

References len, and strlen().

◆ too_large_for_float() [1/3]

OCTAVE_API bool too_large_for_float ( const Complex x)

Definition at line 61 of file lo-utils.cc.

References too_large_for_float(), and x.

◆ too_large_for_float() [2/3]

◆ too_large_for_float() [3/3]

OCTAVE_API bool too_large_for_float ( float  x)

◆ write_value() [1/5]

template<>
OCTAVE_API void write_value ( std::ostream &  os,
const Complex value 
)

Definition at line 443 of file lo-utils.cc.

References imag(), and real().

◆ write_value() [2/5]

template<>
OCTAVE_API void write_value ( std::ostream &  os,
const double &  value 
)

Definition at line 430 of file lo-utils.cc.

References lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.

◆ write_value() [3/5]

template<>
OCTAVE_API void write_value ( std::ostream &  os,
const float &  value 
)

Definition at line 456 of file lo-utils.cc.

References lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.

◆ write_value() [4/5]

template<>
OCTAVE_API void write_value ( std::ostream &  os,
const FloatComplex value 
)

Definition at line 469 of file lo-utils.cc.

References imag(), and real().

◆ write_value() [5/5]

template<typename T >
OCTAVE_API void write_value ( std::ostream &  os,
const T &  value 
)

Definition at line 402 of file lo-utils.cc.

◆ xis_int_or_inf_or_nan()

OCTAVE_API bool xis_int_or_inf_or_nan ( double  x)