#include <cstdlib>
#include <cstring>
#include <complex>
#include <istream>
#include <limits>
#include <ostream>
#include <string>
#include "quit.h"
#include "lo-error.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "lo-utils.h"
Go to the source code of this file.
Functions | |
std::string | octave_fgetl (FILE *f) |
std::string | octave_fgetl (FILE *f, bool &eof) |
std::string | octave_fgets (FILE *f) |
std::string | octave_fgets (FILE *f, bool &eof) |
template<typename T > | |
std::complex< T > | octave_read_cx_fp_value (std::istream &is) |
template<typename T > | |
double | octave_read_fp_value (std::istream &is) |
template<> | |
OCTAVE_API double | octave_read_value (std::istream &is) |
void | octave_write_complex (std::ostream &os, const Complex &c) |
void | octave_write_double (std::ostream &os, double d) |
void | octave_write_float (std::ostream &os, float d) |
void | octave_write_float_complex (std::ostream &os, const FloatComplex &c) |
template<typename T > | |
T | read_inf_nan_na (std::istream &is, char c0) |
char * | strsave (const char *s) |
bool | xis_int_or_inf_or_nan (double x) |
bool | xis_int_or_inf_or_nan (float x) |
bool | xis_one_or_zero (double x) |
bool | xis_one_or_zero (float x) |
bool | xis_zero (double x) |
bool | xis_zero (float x) |
bool | xtoo_large_for_float (const Complex &x) |
bool | xtoo_large_for_float (double x) |
std::string octave_fgetl | ( | FILE * | f | ) |
Definition at line 173 of file lo-utils.cc.
References f.
Referenced by octave::default_command_editor::do_readline().
std::string octave_fgetl | ( | FILE * | f, |
bool & | eof | ||
) |
Definition at line 180 of file lo-utils.cc.
References f, octave_fgets(), and retval.
std::string octave_fgets | ( | FILE * | f | ) |
std::string octave_fgets | ( | FILE * | f, |
bool & | eof | ||
) |
std::complex<T> octave_read_cx_fp_value | ( | std::istream & | is | ) |
Definition at line 325 of file lo-utils.cc.
double octave_read_fp_value | ( | std::istream & | is | ) |
Definition at line 250 of file lo-utils.cc.
References max().
OCTAVE_API FloatComplex octave_read_value | ( | std::istream & | is | ) |
Definition at line 366 of file lo-utils.cc.
void octave_write_complex | ( | std::ostream & | os, |
const Complex & | c | ||
) |
Definition at line 400 of file lo-utils.cc.
References imag(), octave_write_double(), and real().
Referenced by octave_complex::save_ascii().
void octave_write_double | ( | std::ostream & | os, |
double | d | ||
) |
Definition at line 387 of file lo-utils.cc.
References d, lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.
Referenced by octave_write_complex(), octave_bool::save_ascii(), octave_range::save_ascii(), octave_scalar::save_ascii(), and save_mat_ascii_data().
void octave_write_float | ( | std::ostream & | os, |
float | d | ||
) |
Definition at line 410 of file lo-utils.cc.
References d, lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.
Referenced by octave_write_float_complex(), and octave_float_scalar::save_ascii().
void octave_write_float_complex | ( | std::ostream & | os, |
const FloatComplex & | c | ||
) |
Definition at line 423 of file lo-utils.cc.
References imag(), octave_write_float(), and real().
Referenced by octave_float_complex::save_ascii().
T read_inf_nan_na | ( | std::istream & | is, |
char | c0 | ||
) |
Definition at line 194 of file lo-utils.cc.
char* strsave | ( | const char * | s | ) |
Definition at line 79 of file lo-utils.cc.
bool xis_int_or_inf_or_nan | ( | double | x | ) |
Definition at line 46 of file lo-utils.cc.
References octave::math::isnan(), x, and octave::math::x_nint().
Referenced by NDArray::all_elements_are_int_or_inf_or_nan(), and FloatNDArray::all_elements_are_int_or_inf_or_nan().
bool xis_int_or_inf_or_nan | ( | float | x | ) |
Definition at line 67 of file lo-utils.cc.
References octave::math::isnan(), x, and octave::math::x_nint().
bool xis_one_or_zero | ( | double | x | ) |
Definition at line 49 of file lo-utils.cc.
References x.
Referenced by NDArray::any_element_not_one_or_zero(), and FloatNDArray::any_element_not_one_or_zero().
bool xis_one_or_zero | ( | float | x | ) |
Definition at line 70 of file lo-utils.cc.
References x.
bool xis_zero | ( | double | x | ) |
Definition at line 52 of file lo-utils.cc.
References x.
Referenced by NDArray::all_elements_are_zero(), and FloatNDArray::all_elements_are_zero().
bool xis_zero | ( | float | x | ) |
Definition at line 73 of file lo-utils.cc.
References x.
bool xtoo_large_for_float | ( | const Complex & | x | ) |
Definition at line 61 of file lo-utils.cc.
References x, and xtoo_large_for_float().
bool xtoo_large_for_float | ( | double | x | ) |
Definition at line 55 of file lo-utils.cc.
References octave::math::isfinite(), max(), and x.
Referenced by ComplexNDArray::too_large_for_float(), SparseComplexMatrix::too_large_for_float(), NDArray::too_large_for_float(), SparseMatrix::too_large_for_float(), and xtoo_large_for_float().