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

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)
 
std::string fgetl (std::FILE *)
 
std::string fgetl (std::FILE *, bool &eof)
 
std::string fgets (std::FILE *)
 
std::string fgets (std::FILE *, bool &eof)
 
bool int_multiply_overflow (int a, int b, int *r)
 
bool int_multiply_overflow (long int a, long int b, long int *r)
 
bool int_multiply_overflow (unsigned int a, unsigned int b, unsigned int *r)
 
bool int_multiply_overflow (unsigned long int a, unsigned long int b, unsigned long int *r)
 
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 >
read_value (std::istream &is)
 
template<>
double read_value (std::istream &is)
 
char * strsave (const char *)
 
bool too_large_for_float (const Complex &x)
 
bool too_large_for_float (double x)
 
bool too_large_for_float (float x)
 
template<>
void write_value (std::ostream &os, const Complex &value)
 
template<>
void write_value (std::ostream &os, const double &value)
 
template<>
void write_value (std::ostream &os, const float &value)
 
template<>
void write_value (std::ostream &os, const FloatComplex &value)
 
template<typename T >
void write_value (std::ostream &os, const T &value)
 
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]

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

◆ fgetl() [2/2]

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

◆ fgets() [1/2]

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

◆ fgets() [2/2]

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

◆ int_multiply_overflow() [1/4]

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

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

References octave_i_multiply_overflow_wrapper(), and r.

◆ int_multiply_overflow() [2/4]

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

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

References octave_li_multiply_overflow_wrapper(), and r.

◆ int_multiply_overflow() [3/4]

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

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

References octave_ui_multiply_overflow_wrapper(), and r.

◆ int_multiply_overflow() [4/4]

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

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

References octave_uli_multiply_overflow_wrapper(), and r.

◆ is_int_or_inf_or_nan()

bool is_int_or_inf_or_nan ( float  x)

Definition at line 70 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 >
T read_value ( std::istream &  is)

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

◆ read_value() [2/2]

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

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

◆ strsave()

char* strsave ( const char *  s)

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

References len, and strlen().

◆ too_large_for_float() [1/3]

bool too_large_for_float ( const Complex x)

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

References too_large_for_float(), and x.

◆ too_large_for_float() [2/3]

◆ too_large_for_float() [3/3]

bool too_large_for_float ( float  x)

◆ write_value() [1/5]

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

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

References imag(), and real().

◆ write_value() [2/5]

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

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

References lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.

◆ write_value() [3/5]

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

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

References lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.

◆ write_value() [4/5]

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

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

References imag(), and real().

◆ write_value() [5/5]

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

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

◆ xis_int_or_inf_or_nan()

bool xis_int_or_inf_or_nan ( double  x)