#include <algorithm>
#include "Array.h"
#include "Sparse.h"
#include "mx-base.h"
#include "ov.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "ovl.h"
Go to the source code of this file.
Macros | |
#define | ARRAYCASE(TYP) |
Functions | |
template<typename T > | |
static Array< T > | do_tril (const Array< T > &a, octave_idx_type k, bool pack) |
template<typename T > | |
static Sparse< T > | do_tril (const Sparse< T > &a, octave_idx_type k, bool pack) |
template<typename T > | |
static Array< T > | do_trilu (const Array< T > &a, octave_idx_type k, bool lower, bool pack) |
template<typename T > | |
static Sparse< T > | do_trilu (const Sparse< T > &a, octave_idx_type k, bool lower, bool pack) |
static octave_value | do_trilu (const std::string &name, const octave_value_list &args) |
template<typename T > | |
static Array< T > | do_triu (const Array< T > &a, octave_idx_type k, bool pack) |
template<typename T > | |
static Sparse< T > | do_triu (const Sparse< T > &a, octave_idx_type k, bool pack) |
OCTAVE_EXPORT octave_value_list | Ftril (const octave_value_list &args, int) and setting all other elements to zero. The optional second argument specifies how many diagonals above or below the main diagonal should also be set to zero. The default value of ar |
Variables | |
is zero which includes the main diagonal as part of the result If the value of but instead stacked column wise one above | another |
is zero which includes the main diagonal as part of the result If the value of | ar {k} is a nonzero integer then the selection of elements starts at an offset of ar{k} diagonals above the main diagonal for positive ar{k} or below the main diagonal for negative ar{k}. The absolute value of ar{k} may not be greater than the number of subdiagonals or superdiagonals. Example 1 : exclude main diagonal xample roup tril (ones (3), -1) esult{} 0 0 0 1 0 0 1 1 0 nd group nd example oindent Example 2 : include first superdiagonal xample roup tril (ones (3), 1) esult{} 1 1 0 1 1 1 1 1 1 nd group nd example If the optional third argument code{"pack"} is given then the extracted elements are not inserted into a matrix |
#define ARRAYCASE | ( | TYP | ) |
Referenced by do_trilu().
|
static |
Definition at line 43 of file tril.cc.
References a, Array< T >::fortran_vec(), k, max(), min(), and zero().
Referenced by do_trilu().
|
static |
Definition at line 131 of file tril.cc.
References a, Sparse< T >::cidx(), Sparse< T >::cols(), Sparse< T >::data(), error(), i, k, Sparse< T >::maybe_compress(), and Sparse< T >::ridx().
|
static |
|
static |
|
static |
Definition at line 184 of file tril.cc.
References arg, octave_value::array_value(), ARRAYCASE, octave_value::bool_array_value(), btyp_bool, btyp_complex, btyp_double, octave_value::builtin_type(), octave_value::class_name(), octave_value::complex_array_value(), dims, octave_value::dims(), octave_value::do_index_op(), do_trilu(), error(), octave_value::isempty(), octave_value::issparse(), k, octave_value_list::length(), name, print_usage(), retval, octave_value::sparse_bool_matrix_value(), octave_value::sparse_complex_matrix_value(), octave_value::sparse_matrix_value(), and tmp.
|
static |
Definition at line 85 of file tril.cc.
References a, Array< T >::fortran_vec(), k, max(), min(), and zero().
Referenced by do_trilu().
|
static |
Definition at line 151 of file tril.cc.
References a, Sparse< T >::cidx(), Sparse< T >::cols(), Sparse< T >::data(), error(), i, k, Sparse< T >::maybe_compress(), and Sparse< T >::ridx().
OCTAVE_EXPORT octave_value_list Ftril | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 374 of file tril.cc.
References do_trilu().
Referenced by F__ichol0__(), F__icholt__(), and F__ilu0__().
is zero which includes the main diagonal as part of the result If the value of ar {k} is a nonzero integer then the selection of elements starts at an offset of ar{k} diagonals above the main diagonal for positive ar{k} or below the main diagonal for negative ar{k}. The absolute value of ar{k} may not be greater than the number of subdiagonals or superdiagonals. Example 1 : exclude main diagonal xample roup tril (ones (3), -1) esult{} 0 0 0 1 0 0 1 1 0 nd group nd example oindent Example 2 : include first superdiagonal xample roup tril (ones (3), 1) esult{} 1 1 0 1 1 1 1 1 1 nd group nd example If the optional third argument code{"pack"} is given then the extracted elements are not inserted into a matrix |