43 const std::list<octave_value_list>& idx)
57 error (
"%s cannot be indexed with %c", nm.c_str (), type[0]);
77 idx0 = idx(0).index_vector ();
78 idx1 = idx(1).index_vector ();
206 #define FORWARD_MATRIX_VALUE(TYPE, PREFIX) \
208 octave_perm_matrix::PREFIX ## _value (bool frc_str_conv) const \
210 return to_dense ().PREFIX ## _value (frc_str_conv); \
261 os <<
"# orient: c\n";
282 bool colp = orient ==
'c';
287 error (
"load: failed to load permutation matrix constant");
302 error (
"load: failed to extract size & orientation");
315 os.write (reinterpret_cast<char *> (&sz), 4);
316 os.write (reinterpret_cast<char *> (&colp), 1);
318 os.write (reinterpret_cast<const char *> (col_perm.
data ()),
330 if (! (is.read (reinterpret_cast<char *> (&sz), 4)
331 && is.read (reinterpret_cast<char *> (&colp), 1)))
341 int nel = m.
numel ();
342 for (
int i = 0; i < nel; i++)
366 bool pr_as_read_syntax)
const
398 return to_dense ().
write (os, block_size, output_type, skip, flt_fmt);
403 const std::string& prefix)
const
420 "permutation matrix",
"double");
void gripe_implicit_conversion(const char *id, const char *from, const char *to)
octave_refcount< octave_idx_type > count
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_idx_type length(void) const
octave_idx_type cols(void) const
bool is_defined(void) const
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
virtual octave_value to_dense(void) const
OCTAVE_EMPTY_CPP_ARG std::string type_name(void) const
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
double lo_ieee_nan_value(void)
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
octave_idx_type nelem(void) const
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)
virtual octave_idx_type numel(void) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
double double_value(bool=false) const
size_t byte_size(void) const
bool print_as_scalar(void) const
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
void swap_bytes< 4 >(void *ptr)
static octave_base_value * default_numeric_conversion_function(const octave_base_value &a)
const Array< octave_idx_type > & col_perm_vec(void) const
static int static_type_id(void)
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
bool is_permutation(octave_idx_type n) const
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, oct_mach_info::float_format flt_fmt) const
float lo_ieee_float_nan_value(void)
friend class octave_value
bool load_ascii(std::istream &is)
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, oct_mach_info::float_format flt_fmt) const
octave_idx_type length(void) const
Number of elements in the array.
bool save_ascii(std::ostream &os)
void gripe_invalid_conversion(const std::string &from, const std::string &to)
int current_print_indent_level(void) const
void octave_print_internal(std::ostream &, char, bool)
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 subsref(const std::string &type, const std::list< octave_value_list > &idx)
std::complex< float > FloatComplex
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Complex complex_value(bool=false) const
std::complex< double > Complex
const T * fortran_vec(void) const
#define FORWARD_MATRIX_VALUE(TYPE, PREFIX)
idx_vector index_vector(bool require_integers=false) 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
bool load_binary(std::istream &is, bool swap, oct_mach_info::float_format fmt)
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)