GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions | Variables
tril.cc File Reference
#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"
Include dependency graph for tril.cc:

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 second argument is optional
 

Variables

OCTAVE_EXPORT
octave_value_list and
specifies how many diagonals
above or below the main
diagonal should also be set to
zero The default value of 
ar {k} is zero
 
above for positive the
extracted elements are not
inserted into a 
matrix
 
OCTAVE_EXPORT
octave_value_list and
specifies how many diagonals
above or below the main
diagonal should also be set to
zero The default value of so
that 
ode {triu} and ode{tril} normally include the main diagonal as part of the result. If the value of ar{k} is nonzero integer
 

Macro Definition Documentation

#define ARRAYCASE (   TYP)
Value:
case btyp_ ## TYP: \
retval = do_trilu (arg.TYP ## _array_value (), k, lower, pack); \
break
for large enough k
Definition: lu.cc:606
octave_value arg
Definition: pr-output.cc:3440
octave_value retval
Definition: data.cc:6294
static Array< T > do_trilu(const Array< T > &a, octave_idx_type k, bool lower, bool pack)
Definition: tril.cc:171

Referenced by do_trilu().

Function Documentation

template<typename T >
static Array<T> do_tril ( const Array< T > &  a,
octave_idx_type  k,
bool  pack 
)
static

Definition at line 43 of file tril.cc.

References Array< T >::columns(), Array< T >::dims(), Array< T >::fortran_vec(), k, max(), min(), Array< T >::rows(), and zero.

Referenced by do_trilu().

template<typename T >
static Sparse<T> do_tril ( const Sparse< T > &  a,
octave_idx_type  k,
bool  pack 
)
static
template<typename T >
static Array<T> do_trilu ( const Array< T > &  a,
octave_idx_type  k,
bool  lower,
bool  pack 
)
static

Definition at line 171 of file tril.cc.

References do_tril(), and do_triu().

Referenced by do_trilu().

template<typename T >
static Sparse<T> do_trilu ( const Sparse< T > &  a,
octave_idx_type  k,
bool  lower,
bool  pack 
)
static

Definition at line 178 of file tril.cc.

References do_tril(), and do_triu().

static octave_value do_trilu ( const std::string name,
const octave_value_list args 
)
static
template<typename T >
static Array<T> do_triu ( const Array< T > &  a,
octave_idx_type  k,
bool  pack 
)
static

Definition at line 85 of file tril.cc.

References Array< T >::columns(), Array< T >::dims(), Array< T >::fortran_vec(), k, max(), min(), Array< T >::rows(), and zero.

Referenced by do_trilu().

template<typename T >
static Sparse<T> do_triu ( const Sparse< T > &  a,
octave_idx_type  k,
bool  pack 
)
static
OCTAVE_EXPORT octave_value_list Ftril ( const octave_value_list args,
int   
)

Referenced by install_tril_fcns().

Variable Documentation

above for positive ar {k} is zero

Definition at line 382 of file tril.cc.

above for positive the extracted elements are not inserted into a matrix

Definition at line 382 of file tril.cc.

OCTAVE_EXPORT octave_value_list and specifies how many diagonals above or below the main diagonal should also be set to zero The default value of so that ode {triu} and ode{tril} normally include the main diagonal as part of the result. If the value of ar{k} is nonzero integer

Definition at line 382 of file tril.cc.