24 #if ! defined (octave_ov_base_mat_h) 25 #define octave_ov_base_mat_h 1 27 #include "octave-config.h" 45 template <
typename MT>
56 typ (
t.is_known () ? new
MatrixType (
t) : nullptr), idx_cache ()
64 typ (m.typ ? new
MatrixType (*m.typ) : nullptr),
65 idx_cache (m.idx_cache ? new
idx_vector (*m.idx_cache) : nullptr)
79 const std::list<octave_value_list>& idx);
82 const std::list<octave_value_list>& idx,
int)
86 const std::list<octave_value_list>& idx,
90 bool resize_ok =
false);
114 {
return MT (
matrix.reshape (new_dims)); }
117 {
return MT (
matrix.permute (vec, inv)); }
158 bool print_as_scalar (
void)
const;
160 void print (std::ostream&
os,
bool pr_as_read_syntax =
false);
162 void print_info (std::ostream&
os,
const std::string& prefix)
const;
164 void short_disp (std::ostream&
os)
const;
173 clear_cached_info ();
195 idx_cache = (idx ?
new idx_vector (idx) :
nullptr);
201 delete typ; typ =
nullptr;
202 delete idx_cache; idx_cache =
nullptr;
octave_idx_type nnz(void) const
octave_value any(int dim=0) const
characters Given a string matrix
octave_value permute(const Array< int > &vec, bool inv=false) const
octave_value diag(octave_idx_type m, octave_idx_type n) const
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
idx subsref(val, idx) esult
void maybe_economize(void)
octave_value all(int dim=0) const
virtual void assign(const std::string &, const octave_value &)
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
~octave_base_matrix(void)
bool isnumeric(void) const
octave_base_matrix(const octave_base_matrix &m)
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
octave_value squeeze(void) const
bool is_constant(void) const
bool is_matrix_type(void) const
octave_value diag(octave_idx_type k=0) const
sortmode issorted(sortmode mode=UNSORTED) const
octave_value full_value(void) const
bool is_true(const std::string &s)
octave_value reshape(const dim_vector &new_dims) const
octave_base_matrix(const MT &m, const MatrixType &t=MatrixType())
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
size_t byte_size(void) const
void clear_cached_info(void) const
dim_vector dims(void) const
MatrixType matrix_type(void) const
idx subsasgn(val, idx, 0) esult
octave_idx_type numel(void) const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
idx_vector set_idx_cache(const idx_vector &idx) const
bool is_defined(void) const
Vector representing the dimensions (size) of an Array.
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
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
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 * x
const MT & matrix_ref(void) const
static float_display_format get_edit_display_format(const octave_value &val)