GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cctype>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cfloat>
#include <limits>
#include <string>
#include <sys/types.h>
#include <unistd.h>
#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) |
void | octave_putenv (const std::string &name, const std::string &value) |
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 (double x) |
bool | xtoo_large_for_float (const Complex &x) |
std::string octave_fgetl | ( | FILE * | f | ) |
Definition at line 186 of file lo-utils.cc.
Referenced by default_command_editor::do_readline().
std::string octave_fgetl | ( | FILE * | f, |
bool & | eof | ||
) |
Definition at line 193 of file lo-utils.cc.
References octave_fgets().
std::string octave_fgets | ( | FILE * | f | ) |
Definition at line 112 of file lo-utils.cc.
Referenced by octave_file_reader::get_input(), and octave_fgetl().
std::string octave_fgets | ( | FILE * | f, |
bool & | eof | ||
) |
Definition at line 119 of file lo-utils.cc.
void octave_putenv | ( | const std::string & | name, |
const std::string & | value | ||
) |
Definition at line 96 of file lo-utils.cc.
References current_liboctave_error_handler.
Referenced by octave_env::putenv().
std::complex<T> octave_read_cx_fp_value | ( | std::istream & | is | ) |
Definition at line 323 of file lo-utils.cc.
double octave_read_fp_value | ( | std::istream & | is | ) |
Definition at line 261 of file lo-utils.cc.
References c1.
OCTAVE_API FloatComplex octave_read_value | ( | std::istream & | is | ) |
Definition at line 363 of file lo-utils.cc.
Definition at line 397 of file lo-utils.cc.
References imag(), octave_write_double(), and real.
Referenced by operator<<(), and octave_complex::save_ascii().
Definition at line 384 of file lo-utils.cc.
References d, lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.
Referenced by octave_write_complex(), operator<<(), octave_bool::save_ascii(), octave_scalar::save_ascii(), octave_range::save_ascii(), and save_mat_ascii_data().
Definition at line 407 of file lo-utils.cc.
References d, lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.
Referenced by octave_write_float_complex(), operator<<(), and octave_float_scalar::save_ascii().
void octave_write_float_complex | ( | std::ostream & | os, |
const FloatComplex & | c | ||
) |
Definition at line 420 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 209 of file lo-utils.cc.
References c1.
Definition at line 79 of file lo-utils.cc.
Definition at line 47 of file lo-utils.cc.
References D_NINT(), x, and xisnan().
Referenced by FloatNDArray::all_elements_are_int_or_inf_or_nan(), NDArray::all_elements_are_int_or_inf_or_nan(), Matrix::all_elements_are_int_or_inf_or_nan(), and FloatMatrix::all_elements_are_int_or_inf_or_nan().
Definition at line 67 of file lo-utils.cc.
Definition at line 50 of file lo-utils.cc.
Referenced by FloatNDArray::any_element_not_one_or_zero(), NDArray::any_element_not_one_or_zero(), Matrix::any_element_not_one_or_zero(), and FloatMatrix::any_element_not_one_or_zero().
Definition at line 70 of file lo-utils.cc.
Definition at line 53 of file lo-utils.cc.
Referenced by FloatNDArray::all_elements_are_zero(), and NDArray::all_elements_are_zero().
Definition at line 73 of file lo-utils.cc.
Definition at line 56 of file lo-utils.cc.
References max(), and xfinite().
Referenced by ComplexNDArray::too_large_for_float(), NDArray::too_large_for_float(), Matrix::too_large_for_float(), ComplexMatrix::too_large_for_float(), SparseMatrix::too_large_for_float(), SparseComplexMatrix::too_large_for_float(), and xtoo_large_for_float().
Definition at line 61 of file lo-utils.cc.
References xtoo_large_for_float().