23 #if ! defined (octave_utils_h) 24 #define octave_utils_h 1 26 #include "octave-config.h" 44 extern OCTINTERP_API
bool 49 int min_match_len = 1,
52 extern OCTINTERP_API
int 57 OCTAVE_DEPRECATED (4.2,
"use 'octave_value::isempty' instead")
61 extern OCTINTERP_API
std::
string 67 extern OCTINTERP_API
std::
string 70 extern OCTINTERP_API
std::
string 73 bool require_regular_file =
false);
79 OCTAVE_DEPRECATED (4.2, "use 'load_path::find_oct_file'
instead")
82 OCTAVE_DEPRECATED (4.2, "use 'load_path::find_mex_file'
instead")
91 extern OCTINTERP_API
void 94 extern OCTINTERP_API
void 98 extern OCTINTERP_API
void 103 extern OCTINTERP_API
void 110 extern OCTINTERP_API
Matrix 116 extern OCTINTERP_API
size_t 119 extern OCTINTERP_API
size_t 122 extern OCTINTERP_API
std::
string 127 extern OCTINTERP_API
void octave_sleep (
double seconds);
OCTINTERP_API void octave_sleep(double seconds)
For example cd octave end example noindent changes the current working directory to file
OCTINTERP_API std::string oct_file_in_path(const std::string &)
OCTINTERP_API size_t octave_vformat(std::ostream &os, const char *fmt, va_list args)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
OCTINTERP_API std::string undo_string_escapes(const std::string &s)
OCTINTERP_API bool valid_identifier(const char *s)
OCTINTERP_API std::string fcn_file_in_path(const std::string &)
OCTINTERP_API int empty_arg(const char *name, octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API octave_idx_type dims_to_numel(const dim_vector &dims, const octave_value_list &idx)
OCTINTERP_API std::string file_in_path(const std::string &, const std::string &)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
OCTINTERP_API std::string contents_file_in_path(const std::string &)
nd deftypefn *std::string name
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
OCTINTERP_API std::string octave_asprintf(const char *fmt,...)
OCTINTERP_API std::string octave_vasprintf(const char *fmt, va_list args)
OCTINTERP_API std::string search_path_for_file(const std::string &, const string_vector &)
OCTINTERP_API int almost_match(const std::string &std, const std::string &s, int min_match_len=1, int case_sens=1)
OCTINTERP_API bool same_file(const std::string &f, const std::string &g)
OCTINTERP_API size_t octave_format(std::ostream &os, const char *fmt,...)
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
OCTINTERP_API void get_dimensions(const octave_value &a, const char *warn_for, dim_vector &dim)
OCTINTERP_API string_vector search_path_for_all_files(const std::string &, const string_vector &)
OCTINTERP_API FloatMatrix float_identity_matrix(octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API std::string find_data_file_in_load_path(const std::string &fcn, const std::string &file, bool require_regular_file=false)
OCTINTERP_API const char * undo_string_escape(char c)
OCTINTERP_API std::string do_string_escapes(const std::string &s)
OCTINTERP_API Matrix identity_matrix(octave_idx_type nr, octave_idx_type nc)
OCTINTERP_API octave_value_list do_simple_cellfun(octave_value_list(*fun)(const octave_value_list &, int), const char *fun_name, const octave_value_list &args, int nargout)
OCTINTERP_API std::string mex_file_in_path(const std::string &)
Vector representing the dimensions (size) of an Array.
OCTINTERP_API void check_dimensions(dim_vector &dim, const char *warnfor)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
OCTINTERP_API int keyword_almost_match(const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)