GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
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)
 
template<>
Complex read_value (std::istream &is)
 
template<>
float read_value (std::istream &is)
 
template<>
FloatComplex 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.

◆ fgetl() [1/2]

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

◆ fgetl() [2/2]

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

◆ fgets() [1/2]

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

◆ fgets() [2/2]

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

◆ int_multiply_overflow() [1/4]

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

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

References octave_i_multiply_overflow_wrapper().

◆ int_multiply_overflow() [2/4]

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

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

References octave_li_multiply_overflow_wrapper().

◆ int_multiply_overflow() [3/4]

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

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

References octave_ui_multiply_overflow_wrapper().

◆ int_multiply_overflow() [4/4]

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

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

References octave_uli_multiply_overflow_wrapper().

◆ is_int_or_inf_or_nan()

bool is_int_or_inf_or_nan ( float  x)
extern

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

References x.

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

◆ is_zero()

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

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

References x.

◆ read_value() [1/5]

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

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

◆ read_value() [2/5]

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

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

◆ read_value() [3/5]

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

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

◆ read_value() [4/5]

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

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

◆ read_value() [5/5]

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

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

◆ strsave()

char * strsave ( const char *  s)
extern

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

References len, and strlen().

Referenced by time::time(), keyword_almost_match(), and base_tm::strftime().

◆ too_large_for_float() [1/3]

bool too_large_for_float ( const Complex x)
extern

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

References too_large_for_float(), and x.

◆ too_large_for_float() [2/3]

bool too_large_for_float ( double  x)
extern

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

References x.

Referenced by save_mat5_array_length(), and too_large_for_float().

◆ too_large_for_float() [3/3]

bool too_large_for_float ( float  x)
extern

◆ write_value() [1/5]

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

Definition at line 455 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 441 of file lo-utils.cc.

References lo_ieee_is_NA.

◆ write_value() [3/5]

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

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

References lo_ieee_is_NA.

◆ write_value() [4/5]

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

Definition at line 483 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 412 of file lo-utils.cc.

◆ xis_int_or_inf_or_nan()

bool xis_int_or_inf_or_nan ( double  x)
extern