GNU Octave  4.4.1
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 <iostream>
#include <string>
#include "lo-cutils.h"
#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 octave_fgetl (std::FILE *)
 
OCTAVE_API std::string octave_fgetl (std::FILE *, bool &eof)
 
OCTAVE_API std::string octave_fgets (std::FILE *)
 
OCTAVE_API std::string octave_fgets (std::FILE *, bool &eof)
 
OCTAVE_API void octave_putenv (const std::string &, const std::string &)
 
Complex octave_read_complex (std::istream &is)
 
double octave_read_double (std::istream &is)
 
float octave_read_float (std::istream &is)
 
FloatComplex octave_read_float_complex (std::istream &is)
 
template<typename T >
octave_read_value (std::istream &is)
 
template<>
OCTAVE_API double octave_read_value (std::istream &is)
 
template<>
OCTAVE_API Complex octave_read_value (std::istream &is)
 
template<>
OCTAVE_API float octave_read_value (std::istream &is)
 
template<>
OCTAVE_API FloatComplex octave_read_value (std::istream &is)
 
OCTAVE_API void octave_write_complex (std::ostream &os, const Complex &cval)
 
OCTAVE_API void octave_write_double (std::ostream &os, double dval)
 
OCTAVE_API void octave_write_float (std::ostream &os, float dval)
 
OCTAVE_API void octave_write_float_complex (std::ostream &os, const FloatComplex &cval)
 
OCTAVE_API char * strsave (const char *)
 
OCTAVE_API bool xis_int_or_inf_or_nan (double x)
 
OCTAVE_API bool xis_int_or_inf_or_nan (float x)
 
OCTAVE_API bool xis_one_or_zero (double x)
 
OCTAVE_API bool xis_one_or_zero (float x)
 
OCTAVE_API bool xis_zero (double x)
 
OCTAVE_API bool xis_zero (float x)
 
OCTAVE_API bool xtoo_large_for_float (double x)
 
OCTAVE_API bool xtoo_large_for_float (const Complex &x)
 
OCTAVE_API bool xtoo_large_for_float (float x)
 

Function Documentation

◆ any_all_test()

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

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

References fcn, i, and zero().

◆ octave_fgetl() [1/2]

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

◆ octave_fgetl() [2/2]

OCTAVE_API std::string octave_fgetl ( std::FILE *  ,
bool eof 
)

◆ octave_fgets() [1/2]

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

◆ octave_fgets() [2/2]

OCTAVE_API std::string octave_fgets ( std::FILE *  ,
bool eof 
)

◆ octave_putenv()

OCTAVE_API void octave_putenv ( const std::string ,
const std::string  
)

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

References current_liboctave_error_handler, name, octave_putenv_wrapper(), and value.

Referenced by octave::sys::env::putenv().

◆ octave_read_complex()

Complex octave_read_complex ( std::istream &  is)
inline

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

References is.

◆ octave_read_double()

double octave_read_double ( std::istream &  is)
inline

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

References is.

Referenced by get_lines_and_columns().

◆ octave_read_float()

float octave_read_float ( std::istream &  is)
inline

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

References is.

◆ octave_read_float_complex()

FloatComplex octave_read_float_complex ( std::istream &  is)
inline

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

References is.

◆ octave_read_value() [1/5]

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

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

References is, and retval.

◆ octave_read_value() [2/5]

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

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

◆ octave_read_value() [3/5]

template<>
OCTAVE_API Complex octave_read_value ( std::istream &  is)

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

◆ octave_read_value() [4/5]

template<>
OCTAVE_API float octave_read_value ( std::istream &  is)

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

◆ octave_read_value() [5/5]

template<>
OCTAVE_API FloatComplex octave_read_value ( std::istream &  is)

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

References is, and retval.

◆ octave_write_complex()

OCTAVE_API void octave_write_complex ( std::ostream &  os,
const Complex cval 
)

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

References c, imag(), octave_write_double(), os, and real().

Referenced by operator<<(), and octave_complex::save_ascii().

◆ octave_write_double()

OCTAVE_API void octave_write_double ( std::ostream &  os,
double  dval 
)

◆ octave_write_float()

OCTAVE_API void octave_write_float ( std::ostream &  os,
float  dval 
)

◆ octave_write_float_complex()

OCTAVE_API void octave_write_float_complex ( std::ostream &  os,
const FloatComplex cval 
)

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

References c, imag(), octave_write_float(), os, and real().

Referenced by octave_float_complex::save_ascii().

◆ strsave()

OCTAVE_API char* strsave ( const char *  )

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

References s, strlen(), and tmp.

◆ xis_int_or_inf_or_nan() [1/2]

OCTAVE_API bool xis_int_or_inf_or_nan ( double  x)

◆ xis_int_or_inf_or_nan() [2/2]

OCTAVE_API bool xis_int_or_inf_or_nan ( float  x)

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

References octave::math::isnan(), x, and octave::math::x_nint().

◆ xis_one_or_zero() [1/2]

OCTAVE_API bool xis_one_or_zero ( double  x)

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

References x.

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

◆ xis_one_or_zero() [2/2]

OCTAVE_API bool xis_one_or_zero ( float  x)

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

References x.

◆ xis_zero() [1/2]

OCTAVE_API bool xis_zero ( double  x)

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

References x.

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

◆ xis_zero() [2/2]

OCTAVE_API bool xis_zero ( float  x)

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

References x.

◆ xtoo_large_for_float() [1/3]

◆ xtoo_large_for_float() [2/3]

OCTAVE_API bool xtoo_large_for_float ( const Complex x)

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

References x, and xtoo_large_for_float().

◆ xtoo_large_for_float() [3/3]

OCTAVE_API bool xtoo_large_for_float ( float  x)