26 #if ! defined (octave_ov_perm_h)
27 #define octave_ov_perm_h 1
29 #include "octave-config.h"
52 type_conv_info numeric_conversion_function ()
const;
56 std::size_t
byte_size ()
const {
return m_matrix.byte_size (); }
68 const std::list<octave_value_list>& idx);
71 const std::list<octave_value_list>& idx,
int)
72 {
return subsref (type, idx); }
75 bool resize_ok =
false);
82 {
return to_dense ().
reshape (new_dims); }
85 {
return to_dense ().
permute (vec, inv); }
88 {
return to_dense ().
resize (dv, fill); }
95 {
return matrix_type (); }
103 {
return to_dense () .
diag (k); }
106 {
return to_dense ().
sort (dim, mode); }
109 {
return to_dense ().
sort (sidx, dim, mode); }
112 {
return to_dense ().issorted (mode); }
118 {
return to_dense ().is_sorted_rows (mode); }
142 double double_value (
bool =
false)
const;
144 float float_value (
bool =
false)
const;
147 {
return double_value (frc_str_conv); }
154 Matrix matrix_value (
bool =
false)
const;
156 FloatMatrix float_matrix_value (
bool =
false)
const;
158 Complex complex_value (
bool =
false)
const;
170 boolNDArray bool_array_value (
bool warn =
false)
const;
174 NDArray array_value (
bool =
false)
const;
208 octave_value convert_to_str_internal (
bool pad,
bool force,
char type)
const;
223 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
230 bool save_ascii (std::ostream& os);
232 bool load_ascii (std::istream& is);
234 bool save_binary (std::ostream& os,
bool save_as_floats);
236 bool load_binary (std::istream& is,
bool swap,
239 int write (octave::stream& os,
int block_size,
243 mxArray * as_mxArray (
bool interleaved)
const;
245 bool print_as_scalar ()
const;
247 void print (std::ostream& os,
bool pr_as_read_syntax =
false);
249 void print_info (std::ostream& os,
const std::string& prefix)
const;
251 void short_disp (std::ostream& os)
const;
254 {
return to_dense ().
map (umap); }
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Sort by rows returns only indices.
Vector representing the dimensions (size) of an Array.
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
virtual octave_value diag(octave_idx_type k=0) const
octave_value all(int dim=0) const
bool is_matrix_type() const
uint16NDArray uint16_array_value() const
uint64NDArray uint64_array_value() const
bool is_double_type() const
double scalar_value(bool frc_str_conv=false) const
octave_value diag(octave_idx_type k=0) const
MatrixType matrix_type(const MatrixType &) const
int8NDArray int8_array_value() const
sortmode issorted(sortmode mode=UNSORTED) const
octave_value reshape(const dim_vector &new_dims) const
int32NDArray int32_array_value() const
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
builtin_type_t builtin_type() const
int64NDArray int64_array_value() const
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
uint8NDArray uint8_array_value() const
octave_base_value * clone() const
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
bool is_perm_matrix() const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
octave_value permute(const Array< int > &vec, bool inv=false) const
std::size_t byte_size() const
int16NDArray int16_array_value() const
uint32NDArray uint32_array_value() const
bool is_real_matrix() const
octave_value any(int dim=0) const
octave_value resize(const dim_vector &dv, bool fill=false) const
PermMatrix perm_matrix_value() const
octave_idx_type nnz() const
octave_value squeeze() const
MatrixType matrix_type() const
octave_perm_matrix(const PermMatrix &p)
octave_value full_value() const
octave_value m_dense_cache
octave_value map(unary_mapper_t umap) const
octave_base_value * empty_clone() const
octave_value permute(const Array< int > &vec, bool inv=false) const
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_value any(int dim=0) const
octave_value reshape(const dim_vector &dv) const
octave_value map(octave_base_value::unary_mapper_t umap) const
octave_value all(int dim=0) const
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_value diag(octave_idx_type k=0) const
octave::idx_vector idx_vector
bool is_true(const std::string &s)
std::complex< double > Complex
std::complex< float > FloatComplex
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA