#include "dDiagMatrix.h"
Public Types | |
typedef Matrix | full_matrix_type |
Protected Types | |
typedef bool(* | compare_fcn_type) (typename ref_param< double >::type, typename ref_param< double >::type) |
typedef ref_param< double >::type | crefT |
typedef double | element_type |
typedef octave_idx_type | size_type |
Used for operator(), and returned by numel() and size() (beware: signed integer) More... | |
typedef double | value_type |
Protected Member Functions | |
Array< double > | as_column (void) const |
Return the array as a column vector. More... | |
Array< double > | as_matrix (void) const |
Return the array as a matrix. More... | |
Array< double > | as_row (void) const |
Return the array as a row vector. More... | |
double & | checkelem (octave_idx_type n) |
double & | checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
double & | checkelem (const Array< octave_idx_type > &ra_idx) |
crefT | checkelem (octave_idx_type n) const |
crefT | checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
crefT | checkelem (const Array< octave_idx_type > &ra_idx) const |
void | clear (void) |
void | clear (const dim_vector &dv) |
void | clear (octave_idx_type r, octave_idx_type c) |
octave_idx_type | compute_index (octave_idx_type i, octave_idx_type j) const |
octave_idx_type | compute_index (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
octave_idx_type | compute_index (const Array< octave_idx_type > &ra_idx) const |
octave_idx_type | compute_index_unchecked (const Array< octave_idx_type > &ra_idx) const |
double & | elem (octave_idx_type n) |
double & | elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
double & | elem (const Array< octave_idx_type > &ra_idx) |
crefT | elem (octave_idx_type n) const |
crefT | elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
crefT | elem (const Array< octave_idx_type > &ra_idx) const |
Array< octave_idx_type > | find (octave_idx_type, bool) const |
Array< octave_idx_type > | find (octave_idx_type n=-1, bool backward=false) const |
Find indices of (at most n) nonzero elements. More... | |
Array< double > & | insert (const Array< double > &a, const Array< octave_idx_type > &idx) |
Insert an array into another at a specified position. More... | |
Array< double > & | insert (const Array< double > &a, octave_idx_type r, octave_idx_type c) |
This is just a special case for idx = [r c 0 ...]. More... | |
Array< double > | ipermute (const Array< octave_idx_type > &vec) const |
bool | is_empty (void) const |
bool | is_nd_vector (void) const |
bool | is_shared (void) |
sortmode | is_sorted (sortmode mode=UNSORTED) const |
sortmode | is_sorted_rows (sortmode) const |
sortmode | is_sorted_rows (sortmode mode=UNSORTED) const |
Ordering is auto-detected or can be specified. More... | |
bool | is_square (void) const |
bool | is_vector (void) const |
sortmode | issorted (sortmode) const |
sortmode | issorted (sortmode mode=UNSORTED) const |
Ordering is auto-detected or can be specified. More... | |
bool | issquare (void) const |
bool | isvector (void) const |
Array< double > | linear_slice (octave_idx_type lo, octave_idx_type up) const |
Extract a slice from this array as a column vector: A(:)(lo+1:up). More... | |
octave_idx_type | lookup (idx_vector const &, sortmode) const |
Array< octave_idx_type > | lookup (const Array< idx_vector > &, sortmode) const |
octave_idx_type | lookup (const double &value, sortmode mode=UNSORTED) const |
Do a binary lookup in a sorted array. More... | |
Array< octave_idx_type > | lookup (const Array< double > &values, sortmode mode=UNSORTED) const |
Ditto, but for an array of values, specializing on the case when values are sorted. More... | |
void | make_unique (void) |
Array< U > | map (F fcn) const |
Apply function fcn to each element of the Array<T>. More... | |
void | maybe_economize (void) |
void * | mex_get_data (void) const |
Give a pointer to the data in mex format. More... | |
Array< idx_vector > | nth_element (const idx_vector &, int) const |
Array< double > | nth_element (const idx_vector &n, int dim=0) const |
Returns the n-th element in increasing order, using the same ordering as used for sort. More... | |
double & | operator() (octave_idx_type n) |
double & | operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
double & | operator() (const Array< octave_idx_type > &ra_idx) |
crefT | operator() (octave_idx_type n) const |
crefT | operator() (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
crefT | operator() (const Array< octave_idx_type > &ra_idx) const |
bool | optimize_dimensions (const dim_vector &dv) |
Returns true if this->dims () == dv, and if so, replaces this->dimensions by a shallow copy of dv. More... | |
Array< double > | page (octave_idx_type k) const |
Extract page: A(:,:,k+1). More... | |
Array< double > | permute (const Array< octave_idx_type > &vec, bool inv=false) const |
Array< double > | reshape (octave_idx_type nr, octave_idx_type nc) const |
Array< double > | reshape (const dim_vector &new_dims) const |
virtual double | resize_fill_value (void) const |
size_type | size (const size_type d) const |
Size of the specified dimension. More... | |
Array< idx_vector > | sort (int, sortmode) const |
Array< idx_vector > | sort (Array< octave_idx_type > &sidx, int, sortmode) const |
Array< double > | sort (int dim=0, sortmode mode=ASCENDING) const |
Array< double > | sort (Array< octave_idx_type > &sidx, int dim=0, sortmode mode=ASCENDING) const |
Array< octave_idx_type > | sort_rows_idx (sortmode) const |
Array< octave_idx_type > | sort_rows_idx (sortmode mode=ASCENDING) const |
Sort by rows returns only indices. More... | |
Array< double > | squeeze (void) const |
Chop off leading singleton dimensions. More... | |
bool | test (F fcn) const |
Generic any/all test functionality with arbitrary predicate. More... | |
double & | xelem (octave_idx_type n) |
crefT | xelem (octave_idx_type n) const |
double & | xelem (octave_idx_type i, octave_idx_type j) |
double & | xelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) |
crefT | xelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const |
double & | xelem (const Array< octave_idx_type > &ra_idx) |
crefT | xelem (const Array< octave_idx_type > &ra_idx) const |
void | resize (const dim_vector &dv, const double &rfv) |
Resizing (with fill). More... | |
void | resize (const dim_vector &dv) |
Resizing (with fill). More... | |
void | resize2 (octave_idx_type nr, octave_idx_type nc, const double &rfv) |
Resizing (with fill). More... | |
void | resize2 (octave_idx_type nr, octave_idx_type nc) |
Resizing (with fill). More... | |
void | resize1 (octave_idx_type n, const double &rfv) |
Resizing (with fill). More... | |
void | resize1 (octave_idx_type n) |
Resizing (with fill). More... | |
octave_idx_type | capacity (void) const |
Number of elements in the array. More... | |
Third dimension | |
Get the third dimension of the array (number of pages) | |
octave_idx_type | dim3 (void) const |
octave_idx_type | pages (void) const |
Array< double > | index (const idx_vector &i) const |
Indexing without resizing. More... | |
Array< double > | index (const idx_vector &i, const idx_vector &j) const |
Indexing without resizing. More... | |
Array< double > | index (const Array< idx_vector > &ia) const |
Indexing without resizing. More... | |
Array< double > | index (const idx_vector &i, bool resize_ok, const double &rfv) const |
Indexing with possible resizing and fill. More... | |
Array< double > | index (const idx_vector &i, bool resize_ok) const |
Indexing with possible resizing and fill. More... | |
Array< double > | index (const idx_vector &i, const idx_vector &j, bool resize_ok, const double &rfv) const |
Indexing with possible resizing and fill. More... | |
Array< double > | index (const idx_vector &i, const idx_vector &j, bool resize_ok) const |
Indexing with possible resizing and fill. More... | |
Array< double > | index (const Array< idx_vector > &ia, bool resize_ok, const double &rfv) const |
Indexing with possible resizing and fill. More... | |
Array< double > | index (const Array< idx_vector > &ia, bool resize_ok) const |
Indexing with possible resizing and fill. More... | |
void | assign (const idx_vector &i, const Array< double > &rhs, const double &rfv) |
Indexed assignment (always with resize & fill). More... | |
void | assign (const idx_vector &i, const Array< double > &rhs) |
Indexed assignment (always with resize & fill). More... | |
void | assign (const idx_vector &i, const idx_vector &j, const Array< double > &rhs, const double &rfv) |
Indexed assignment (always with resize & fill). More... | |
void | assign (const idx_vector &i, const idx_vector &j, const Array< double > &rhs) |
Indexed assignment (always with resize & fill). More... | |
void | assign (const Array< idx_vector > &ia, const Array< double > &rhs, const double &rfv) |
Indexed assignment (always with resize & fill). More... | |
void | assign (const Array< idx_vector > &ia, const Array< double > &rhs) |
Indexed assignment (always with resize & fill). More... | |
void | delete_elements (const idx_vector &i) |
Deleting elements. More... | |
void | delete_elements (int dim, const idx_vector &i) |
A(:,...,I,...,:) = [] (>= 2 subscripts, one of them is non-colon) More... | |
void | delete_elements (const Array< idx_vector > &ia) |
Dispatcher to the above two. More... | |
Array< U > | map (U(&fcn)(double)) const |
Overloads for function references. More... | |
Array< U > | map (U(&fcn)(const double &)) const |
Overloads for function references. More... | |
bool | test_any (F fcn) const |
Simpler calls. More... | |
bool | test_all (F fcn) const |
Simpler calls. More... | |
bool | test_any (bool(&fcn)(double)) const |
Overloads for function references. More... | |
bool | test_any (bool(&fcn)(const double &)) const |
Overloads for function references. More... | |
bool | test_all (bool(&fcn)(double)) const |
Overloads for function references. More... | |
bool | test_all (bool(&fcn)(const double &)) const |
Overloads for function references. More... | |
int * | jit_ref_count (void) |
WARNING: Only call these functions from jit. More... | |
double * | jit_slice_data (void) const |
WARNING: Only call these functions from jit. More... | |
octave_idx_type * | jit_dimensions (void) const |
WARNING: Only call these functions from jit. More... | |
void * | jit_array_rep (void) const |
WARNING: Only call these functions from jit. More... | |
Static Protected Member Functions | |
static Array< double > | cat (int dim, octave_idx_type n, const Array< double > *array_list) |
Concatenation along a specified (0-based) dimension, equivalent to cat(). More... | |
Protected Attributes | |
octave_idx_type | d1 |
octave_idx_type | d2 |
dim_vector | dimensions |
Array< double >::ArrayRep * | rep |
double * | slice_data |
octave_idx_type | slice_len |
Friends | |
OCTAVE_API DiagMatrix | imag (const ComplexDiagMatrix &a) |
OCTAVE_API std::ostream & | operator<< (std::ostream &os, const DiagMatrix &a) |
OCTAVE_API DiagMatrix | real (const ComplexDiagMatrix &a) |
Definition at line 34 of file dDiagMatrix.h.
typedef Matrix DiagMatrix::full_matrix_type |
Definition at line 40 of file dDiagMatrix.h.
|
inherited |
|
inline |
Definition at line 42 of file dDiagMatrix.h.
Referenced by abs().
|
inline |
Definition at line 44 of file dDiagMatrix.h.
|
inline |
Definition at line 47 of file dDiagMatrix.h.
|
inline |
Definition at line 50 of file dDiagMatrix.h.
|
inline |
Definition at line 52 of file dDiagMatrix.h.
|
inline |
Definition at line 55 of file dDiagMatrix.h.
Definition at line 57 of file dDiagMatrix.h.
|
inline |
Definition at line 59 of file dDiagMatrix.h.
DiagMatrix DiagMatrix::abs | ( | void | ) | const |
Definition at line 126 of file dDiagMatrix.cc.
References DiagArray2< double >::columns(), DiagMatrix(), extract_diag(), and DiagArray2< double >::rows().
Referenced by octave_diag_matrix::map().
|
inlineinherited |
Definition at line 83 of file MDiagArray2.h.
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 107 of file DiagArray2.h.
|
inlineinherited |
Definition at line 97 of file DiagArray2.h.
|
inlineinherited |
|
inlineinherited |
Definition at line 128 of file DiagArray2.h.
|
inherited |
Definition at line 93 of file DiagArray2.cc.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 88 of file DiagArray2.h.
Referenced by column(), determinant(), inverse(), operator==(), pseudo_inverse(), and row().
ColumnVector DiagMatrix::column | ( | octave_idx_type | i | ) | const |
Definition at line 195 of file dDiagMatrix.cc.
References c, DiagArray2< double >::cols(), DiagArray2< double >::elem(), i, retval, and DiagArray2< double >::rows().
Referenced by column().
ColumnVector DiagMatrix::column | ( | char * | s | ) | const |
Definition at line 210 of file dDiagMatrix.cc.
References c, DiagArray2< double >::cols(), column(), current_liboctave_error_handler, and s.
|
inlineinherited |
Definition at line 89 of file DiagArray2.h.
Referenced by abs().
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 167 of file DiagArray2.h.
Referenced by operator==().
|
inherited |
|
inherited |
|
inherited |
DET DiagMatrix::determinant | ( | void | ) | const |
Definition at line 307 of file dDiagMatrix.cc.
References DiagArray2< double >::cols(), DiagArray2< double >::elem(), i, DiagArray2< double >::length(), and DiagArray2< double >::rows().
Referenced by Fdet().
|
inlineinherited |
Definition at line 122 of file DiagArray2.h.
|
inlineinherited |
Definition at line 125 of file DiagArray2.h.
|
inlineinherited |
Definition at line 150 of file DiagArray2.h.
|
inlineinherited |
Definition at line 153 of file DiagArray2.h.
|
inlineinherited |
Definition at line 100 of file MDiagArray2.h.
|
inherited |
|
inlineinherited |
Definition at line 91 of file DiagArray2.h.
|
inlineinherited |
Definition at line 84 of file DiagArray2.h.
|
inlineinherited |
Definition at line 85 of file DiagArray2.h.
|
inlineinherited |
|
inlineinherited |
Definition at line 99 of file DiagArray2.h.
|
inlineinherited |
Definition at line 115 of file DiagArray2.h.
Referenced by column(), determinant(), extract(), fill(), inverse(), pseudo_inverse(), and row().
|
inherited |
Definition at line 85 of file DiagArray2.cc.
|
inlineinherited |
Definition at line 488 of file Array.h.
Referenced by NDArray::all_integers(), Matrix::column_max(), Matrix::column_min(), NDArray::concat(), Matrix::determinant(), RowVector::extract(), ColumnVector::extract(), RowVector::extract_n(), ColumnVector::extract_n(), Matrix::issymmetric(), Matrix::Matrix(), RowVector::max(), ColumnVector::max(), RowVector::min(), ColumnVector::min(), Matrix::operator+=(), Matrix::operator-=(), Matrix::row_max(), and Matrix::row_min().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Matrix DiagMatrix::extract | ( | octave_idx_type | r1, |
octave_idx_type | c1, | ||
octave_idx_type | r2, | ||
octave_idx_type | c2 | ||
) | const |
Definition at line 144 of file dDiagMatrix.cc.
References DiagArray2< double >::elem(), i, result, and swap.
|
inline |
Definition at line 104 of file dDiagMatrix.h.
References DiagArray2< T >::extract_diag(), and k.
Referenced by abs(), Fsvd(), octave_diag_matrix::map(), null(), Matrix::pseudo_inverse(), ComplexMatrix::pseudo_inverse(), rcond(), and octave_diag_matrix::save_binary().
DiagMatrix & DiagMatrix::fill | ( | double | val | ) |
Definition at line 54 of file dDiagMatrix.cc.
References DiagArray2< double >::elem(), i, DiagArray2< double >::length(), and val.
DiagMatrix & DiagMatrix::fill | ( | double | val, |
octave_idx_type | beg, | ||
octave_idx_type | end | ||
) |
Definition at line 62 of file dDiagMatrix.cc.
References DiagArray2< double >::elem(), i, DiagArray2< double >::length(), and val.
DiagMatrix & DiagMatrix::fill | ( | const ColumnVector & | a | ) |
Definition at line 74 of file dDiagMatrix.cc.
References a, current_liboctave_error_handler, DiagArray2< double >::elem(), i, and DiagArray2< double >::length().
DiagMatrix & DiagMatrix::fill | ( | const RowVector & | a | ) |
Definition at line 87 of file dDiagMatrix.cc.
References a, current_liboctave_error_handler, DiagArray2< double >::elem(), i, and DiagArray2< double >::length().
DiagMatrix & DiagMatrix::fill | ( | const ColumnVector & | a, |
octave_idx_type | beg | ||
) |
Definition at line 100 of file dDiagMatrix.cc.
References a, DiagArray2< double >::elem(), i, and DiagArray2< double >::length().
DiagMatrix & DiagMatrix::fill | ( | const RowVector & | a, |
octave_idx_type | beg | ||
) |
Definition at line 113 of file dDiagMatrix.cc.
References a, DiagArray2< double >::elem(), i, and DiagArray2< double >::length().
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
|
inherited |
|
inlineinherited |
Definition at line 169 of file DiagArray2.h.
|
inlineinherited |
Definition at line 171 of file DiagArray2.h.
|
inlineinherited |
Definition at line 104 of file MDiagArray2.h.
|
inherited |
Indexing without resizing.
Definition at line 697 of file Array.cc.
Referenced by Matrix::column(), Matrix::extract(), Matrix::extract_n(), and Matrix::row().
|
inherited |
|
inherited |
|
inlineinherited |
|
inherited |
DiagMatrix DiagMatrix::inverse | ( | void | ) | const |
Definition at line 225 of file dDiagMatrix.cc.
Referenced by Finv().
DiagMatrix DiagMatrix::inverse | ( | octave_idx_type & | info | ) | const |
Definition at line 232 of file dDiagMatrix.cc.
References c, DiagArray2< double >::cols(), DiagArray2< double >::elem(), i, Inf, DiagArray2< double >::length(), retval, and DiagArray2< double >::rows().
|
inherited |
Definition at line 34 of file MDiagArray2.cc.
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
|
inlineinherited |
Definition at line 101 of file DiagArray2.h.
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
Definition at line 559 of file Array.h.
Referenced by Matrix::issymmetric().
|
inlineinherited |
|
inlineinherited |
Definition at line 93 of file DiagArray2.h.
Referenced by determinant(), fill(), inverse(), operator==(), and pseudo_inverse().
|
inherited |
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
Definition at line 187 of file Array.h.
Referenced by RowVector::fill(), ColumnVector::fill(), Matrix::fill(), RowVector::insert(), ColumnVector::insert(), and Matrix::insert().
|
inlineinherited |
Definition at line 103 of file DiagArray2.h.
|
inlineinherited |
Definition at line 94 of file DiagArray2.h.
|
inlineinherited |
Definition at line 88 of file MDiagArray2.h.
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
|
inherited |
|
inlineinherited |
Definition at line 95 of file DiagArray2.h.
bool DiagMatrix::operator!= | ( | const DiagMatrix & | a | ) | const |
Definition at line 48 of file dDiagMatrix.cc.
References a.
|
inlineinherited |
Definition at line 131 of file DiagArray2.h.
|
inlineinherited |
Definition at line 138 of file DiagArray2.h.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 62 of file dDiagMatrix.h.
References a, and MDiagArray2< T >::operator=().
bool DiagMatrix::operator== | ( | const DiagMatrix & | a | ) | const |
Definition at line 39 of file dDiagMatrix.cc.
References a, DiagArray2< double >::cols(), DiagArray2< double >::data(), DiagArray2< double >::length(), mx_inline_equal(), and DiagArray2< double >::rows().
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 173 of file DiagArray2.h.
DiagMatrix DiagMatrix::pseudo_inverse | ( | double | tol = 0.0 | ) | const |
Definition at line 255 of file dDiagMatrix.cc.
References abs(), c, DiagArray2< double >::cols(), DiagArray2< double >::elem(), i, DiagArray2< double >::length(), retval, DiagArray2< double >::rows(), and val.
double DiagMatrix::rcond | ( | void | ) | const |
Definition at line 321 of file dDiagMatrix.cc.
References extract_diag(), Array< T >::map(), ColumnVector::max(), and ColumnVector::min().
|
inlineinherited |
|
inlineinherited |
|
inherited |
Definition at line 101 of file DiagArray2.cc.
|
inlineinherited |
Definition at line 157 of file DiagArray2.h.
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
RowVector DiagMatrix::row | ( | octave_idx_type | i | ) | const |
Definition at line 165 of file dDiagMatrix.cc.
References c, DiagArray2< double >::cols(), DiagArray2< double >::elem(), i, retval, and DiagArray2< double >::rows().
Referenced by row().
RowVector DiagMatrix::row | ( | char * | s | ) | const |
Definition at line 180 of file dDiagMatrix.cc.
References c, current_liboctave_error_handler, row(), DiagArray2< double >::rows(), and s.
|
inlineinherited |
Definition at line 87 of file DiagArray2.h.
Referenced by abs(), column(), determinant(), inverse(), operator==(), pseudo_inverse(), and row().
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
|
inherited |
Definition at line 39 of file Array-idx-vec.cc.
Simpler calls.
Definition at line 819 of file Array.h.
Referenced by NDArray::all_elements_are_int_or_inf_or_nan(), NDArray::all_elements_are_zero(), NDArray::all_integers(), NDArray::any_element_is_negative(), NDArray::any_element_is_positive(), and NDArray::any_element_not_one_or_zero().
Simpler calls.
Definition at line 815 of file Array.h.
Referenced by NDArray::too_large_for_float().
|
inline |
Definition at line 78 of file dDiagMatrix.h.
References MDiagArray2< T >::transpose().
Referenced by oct_unop_transpose().
|
inlineinherited |
Definition at line 145 of file DiagArray2.h.
|
inlineinherited |
Definition at line 458 of file Array.h.
Referenced by RowVector::fill(), ColumnVector::fill(), Matrix::fill(), RowVector::insert(), ColumnVector::insert(), Matrix::insert(), and NDArray::NDArray().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
friend |
Definition at line 138 of file dDiagMatrix.cc.
|
friend |
Definition at line 330 of file dDiagMatrix.cc.
|
friend |
Definition at line 132 of file dDiagMatrix.cc.
|
protectedinherited |
Definition at line 43 of file DiagArray2.h.
|
protectedinherited |
Definition at line 43 of file DiagArray2.h.
|
protectedinherited |
Definition at line 216 of file Array.h.
Referenced by NDArray::compute_index(), and NDArray::increment_index().
|
protectedinherited |