23 #if defined (HAVE_CONFIG_H)
43 const std::list<octave_value_list>& idx)
57 error (
"%s cannot be indexed with %c", nm.c_str (), type[0]);
80 idx0 = idx(0).index_vector ();
82 idx1 = idx(1).index_vector ();
105 if (idx1.
is_colon ()) right =
false;
202 #define FORWARD_MATRIX_VALUE(TYPE, PREFIX) \
204 octave_perm_matrix::PREFIX ## _value (bool frc_str_conv) const \
206 return to_dense ().PREFIX ## _value (frc_str_conv); \
317 os <<
"# orient: c\n";
336 error (
"load: failed to extract size & orientation");
338 bool colp = orient ==
'c';
342 error (
"load: failed to load permutation matrix constant");
360 os.write (reinterpret_cast<char *> (&sz), 4);
361 os.write (reinterpret_cast<char *> (&colp), 1);
363 os.write (reinterpret_cast<const char *> (col_perm.
data ()),
375 if (! (is.read (reinterpret_cast<char *> (&sz), 4)
376 && is.read (reinterpret_cast<char *> (&colp), 1)))
386 int nel = m.
numel ();
387 for (
int i = 0;
i < nel;
i++)
411 bool pr_as_read_syntax)
const
443 return to_dense ().
write (os, block_size, output_type, skip, flt_fmt);
463 "permutation matrix",
"double");
std::string type_name(void) const
octave_refcount< octave_idx_type > count
octave_value as_single(void) const
int8NDArray int8_array_value(void) const
octave_value as_int32(void) const
octave_idx_type rows(void) const
octave_idx_type columns(void) const
mxArray * as_mxArray(void) const
octave_idx_type numel(void) const
Number of elements in the array.
octave_value as_uint32(void) const
void set_pos_if_unset(octave_idx_type nd_arg, octave_idx_type dim_arg)
octave_idx_type length(void) const
octave_idx_type cols(void) const
bool is_defined(void) const
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the then the first element defines the pivoting tolerance for the unsymmetric the values defined such that for full matrix
void swap_bytes< 8 >(void *ptr)
void error(const char *fmt,...)
void swap_bytes< 2 >(void *ptr)
void print_info(std::ostream &os, const std::string &prefix) const
octave_value as_uint64(void) const
int32NDArray int32_array_value(void) const
virtual octave_value to_dense(void) const
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
octave::mach_info::float_format flt_fmt
Matrix matrix_value(bool=false) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
octave_idx_type checkelem(octave_idx_type i, octave_idx_type j) const
bool all_ones(void) const
void print_info(std::ostream &os, const std::string &prefix) const
in this the arguments are accumulated from left to right
octave_base_value * try_narrowing_conversion(void)
void newline(std::ostream &os) const
SparseBoolMatrix sparse_bool_matrix_value(bool=false) const
bool save_binary(std::ostream &os, bool &save_as_floats)
bool is_empty(void) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
int64NDArray int64_array_value(void) const
virtual octave_idx_type numel(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
octave_value as_uint16(void) const
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
double double_value(bool=false) const
size_t byte_size(void) const
bool print_as_scalar(void) const
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
void swap_bytes< 4 >(void *ptr)
octave_value as_uint8(void) const
uint64NDArray uint64_array_value(void) const
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const
static octave_base_value * default_numeric_conversion_function(const octave_base_value &a)
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
const Array< octave_idx_type > & col_perm_vec(void) const
nd deftypefn *octave_map m
then the function must return scalars which will be concatenated into the return array(s).If code
static int static_type_id(void)
uint8NDArray uint8_array_value(void) const
const T * data(void) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
#define panic_impossible()
FloatComplex float_complex_value(bool=false) const
octave_idx_type elem(octave_idx_type i, octave_idx_type j) const
void print(std::ostream &os, bool pr_as_read_syntax=false)
bool any_zero(void) const
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
bool is_permutation(octave_idx_type n) const
uint16NDArray uint16_array_value(void) const
float lo_ieee_float_nan_value(void)
friend class octave_value
bool load_ascii(std::istream &is)
octave_value as_double(void) const
void err_invalid_conversion(const std::string &from, const std::string &to)
bool save_ascii(std::ostream &os)
octave_value as_int8(void) const
octave_value as_int64(void) const
=val(i)}if ode{val(i)}occurs in table i
int current_print_indent_level(void) const
void octave_print_internal(std::ostream &, char, bool)
void warn_implicit_conversion(const char *id, const char *from, const char *to)
int16NDArray int16_array_value(void) const
bool is_scalar(void) const
type_conv_info numeric_conversion_function(void) const
SparseComplexMatrix sparse_complex_matrix_value(bool=false) const
octave_value fast_elem_extract(octave_idx_type n) const
octave_value as_int16(void) const
void warn_array_as_logical(const dim_vector &dv)
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
std::complex< float > FloatComplex
uint32NDArray uint32_array_value(void) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Complex complex_value(bool=false) const
FloatNDArray float_array_value(bool=false) const
std::complex< double > Complex
const T * fortran_vec(void) const
write the output to stdout if nargout is
#define FORWARD_MATRIX_VALUE(TYPE, PREFIX)
Vector representing the dimensions (size) of an Array.
idx_vector index_vector(bool require_integers=false) const
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
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const
float float_value(bool=false) const
octave_idx_type numel(void) const
octave_value next_subsref(const std::string &type, const std::list< octave_value_list > &idx, size_t skip=1)
octave_idx_type rows(void) const
bool is_colon(void) const
SparseMatrix sparse_matrix_value(bool=false) const
dim_vector dims(void) const
mxArray * as_mxArray(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)