#include <cmath>
#include <algorithm>
#include <limits>
#include <vector>
#include "Array.h"
#include "CColVector.h"
#include "CMatrix.h"
#include "CRowVector.h"
#include "CSparse.h"
#include "MArray.h"
#include "dColVector.h"
#include "dDiagMatrix.h"
#include "dMatrix.h"
#include "dRowVector.h"
#include "dSparse.h"
#include "fCColVector.h"
#include "fCMatrix.h"
#include "fCRowVector.h"
#include "fColVector.h"
#include "fDiagMatrix.h"
#include "fMatrix.h"
#include "fRowVector.h"
#include "lo-error.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "mx-cm-s.h"
#include "mx-fcm-fs.h"
#include "mx-fs-fcm.h"
#include "mx-s-cm.h"
#include "oct-cmplx.h"
#include "oct-norm.h"
#include "quit.h"
#include "svd.h"
Go to the source code of this file.
Classes | |
class | norm_accumulator_0< R > |
class | norm_accumulator_1< R > |
class | norm_accumulator_2< R > |
class | norm_accumulator_inf< R > |
class | norm_accumulator_minf< R > |
class | norm_accumulator_mp< R > |
class | norm_accumulator_p< R > |
Macros | |
#define | DEFINE_COLROW_NORM_FCNS(PREFIX, RPREFIX, RTYPE) |
#define | DEFINE_DISPATCHER(FCN_NAME, ARG_TYPE, RES_TYPE) |
#define | DEFINE_XNORM_FCNS(PREFIX, RTYPE) |
#define | DEFINE_XNORM_SPARSE_FCNS(PREFIX, RTYPE) |
Functions | |
template<typename T , typename R > | |
void | array_norm_2 (const T *v, octave_idx_type n, R &res) |
template<typename T , typename R , typename ACC > | |
void | column_norms (const MArray< T > &m, MArray< R > &res, ACC acc) |
template<typename T , typename R > | |
MArray< R > | column_norms (const MArray< T > &v, R p) |
template<typename T , typename R , typename ACC > | |
void | column_norms (const MSparse< T > &m, MArray< R > &res, ACC acc) |
template<typename T , typename R > | |
MArray< R > | column_norms (const MSparse< T > &v, R p) |
template<typename VectorT , typename R > | |
VectorT | dual_p (const VectorT &x, R p, R q) |
template<typename T , typename R > | |
T | elem_dual_p (T x, R p) |
template<typename MatrixT , typename VectorT , typename R > | |
R | higham (const MatrixT &m, R p, R tol, int maxiter, VectorT &x) |
template<typename ColVectorT , typename R > | |
static void | higham_subp (const ColVectorT &y, const ColVectorT &col, octave_idx_type nsamp, R p, R &lambda, R &mu) |
template<typename ColVectorT , typename R > | |
static void | higham_subp (const ColVectorT &y, const ColVectorT &col, octave_idx_type nsamp, R p, std::complex< R > &lambda, std::complex< R > &mu) |
template<typename MatrixT , typename VectorT , typename R > | |
R | matrix_norm (const MatrixT &m, R p, VectorT) |
template<typename T , typename R , typename ACC > | |
void | row_norms (const MArray< T > &m, MArray< R > &res, ACC acc) |
template<typename T , typename R > | |
MArray< R > | row_norms (const MArray< T > &v, R p) |
template<typename T , typename R , typename ACC > | |
void | row_norms (const MSparse< T > &m, MArray< R > &res, ACC acc) |
template<typename T , typename R > | |
MArray< R > | row_norms (const MSparse< T > &v, R p) |
template<typename MatrixT , typename VectorT , typename R > | |
R | svd_matrix_norm (const MatrixT &m, R p, VectorT) |
template<typename T , typename R , typename ACC > | |
void | vector_norm (const Array< T > &v, R &res, ACC acc) |
template<typename T , typename R > | |
R | vector_norm (const MArray< T > &v, R p) |
RowVector | xcolnorms (const ComplexMatrix &m, double p) |
FloatRowVector | xcolnorms (const FloatComplexMatrix &m, float p) |
FloatRowVector | xcolnorms (const FloatMatrix &m, float p) |
RowVector | xcolnorms (const Matrix &m, double p) |
RowVector | xcolnorms (const SparseComplexMatrix &m, double p) |
RowVector | xcolnorms (const SparseMatrix &m, double p) |
double | xfrobnorm (const ComplexMatrix &x) |
float | xfrobnorm (const FloatComplexMatrix &x) |
float | xfrobnorm (const FloatMatrix &x) |
double | xfrobnorm (const Matrix &x) |
double | xfrobnorm (const SparseComplexMatrix &x) |
double | xfrobnorm (const SparseMatrix &x) |
double | xnorm (const ColumnVector &x, double p) |
double | xnorm (const ComplexColumnVector &x, double p) |
double | xnorm (const ComplexMatrix &x, double p) |
double | xnorm (const ComplexRowVector &x, double p) |
float | xnorm (const FloatColumnVector &x, float p) |
float | xnorm (const FloatComplexColumnVector &x, float p) |
float | xnorm (const FloatComplexMatrix &x, float p) |
float | xnorm (const FloatComplexRowVector &x, float p) |
float | xnorm (const FloatMatrix &x, float p) |
float | xnorm (const FloatRowVector &x, float p) |
double | xnorm (const Matrix &x, double p) |
double | xnorm (const RowVector &x, double p) |
double | xnorm (const SparseComplexMatrix &x, double p) |
double | xnorm (const SparseMatrix &x, double p) |
ColumnVector | xrownorms (const ComplexMatrix &m, double p) |
FloatColumnVector | xrownorms (const FloatComplexMatrix &m, float p) |
FloatColumnVector | xrownorms (const FloatMatrix &m, float p) |
ColumnVector | xrownorms (const Matrix &m, double p) |
ColumnVector | xrownorms (const SparseComplexMatrix &m, double p) |
ColumnVector | xrownorms (const SparseMatrix &m, double p) |
Variables | |
static int | max_norm_iter = 100 |
static const char * | p_less1_gripe = "xnorm: p must be >= 1" |
#define DEFINE_COLROW_NORM_FCNS | ( | PREFIX, | |
RPREFIX, | |||
RTYPE | |||
) |
Definition at line 616 of file oct-norm.cc.
#define DEFINE_DISPATCHER | ( | FCN_NAME, | |
ARG_TYPE, | |||
RES_TYPE | |||
) |
Definition at line 323 of file oct-norm.cc.
#define DEFINE_XNORM_FCNS | ( | PREFIX, | |
RTYPE | |||
) |
Definition at line 567 of file oct-norm.cc.
#define DEFINE_XNORM_SPARSE_FCNS | ( | PREFIX, | |
RTYPE | |||
) |
Definition at line 601 of file oct-norm.cc.
|
inline |
Definition at line 592 of file oct-norm.cc.
References norm_accumulator_2< R >::accum(), and n.
void column_norms | ( | const MArray< T > & | m, |
MArray< R > & | res, | ||
ACC | acc | ||
) |
Definition at line 264 of file oct-norm.cc.
References m, and Array< T, Alloc >::xelem().
Definition at line 349 of file oct-norm.cc.
void column_norms | ( | const MSparse< T > & | m, |
MArray< R > & | res, | ||
ACC | acc | ||
) |
Definition at line 294 of file oct-norm.cc.
References m, and Array< T, Alloc >::xelem().
Definition at line 351 of file oct-norm.cc.
VectorT dual_p | ( | const VectorT & | x, |
R | p, | ||
R | q | ||
) |
Definition at line 442 of file oct-norm.cc.
References elem_dual_p(), vector_norm(), and x.
Referenced by higham().
|
inline |
R higham | ( | const MatrixT & | m, |
R | p, | ||
R | tol, | ||
int | maxiter, | ||
VectorT & | x | ||
) |
Definition at line 452 of file oct-norm.cc.
References dual_p(), gamma(), higham_subp(), m, vector_norm(), and x.
Referenced by matrix_norm(), and svd_matrix_norm().
|
static |
Definition at line 360 of file oct-norm.cc.
References abs(), fi, pow(), and vector_norm().
Referenced by higham().
|
static |
Definition at line 388 of file oct-norm.cc.
References abs(), fi, pow(), and vector_norm().
R matrix_norm | ( | const MatrixT & | m, |
R | p, | ||
VectorT | |||
) |
Definition at line 542 of file oct-norm.cc.
References current_liboctave_error_handler, higham(), lo_ieee_isinf, m, ColumnVector::max(), RowVector::max(), max_norm_iter, p_less1_gripe, x, xcolnorms(), and xrownorms().
void row_norms | ( | const MArray< T > & | m, |
MArray< R > & | res, | ||
ACC | acc | ||
) |
Definition at line 278 of file oct-norm.cc.
References m, and Array< T, Alloc >::xelem().
Definition at line 350 of file oct-norm.cc.
void row_norms | ( | const MSparse< T > & | m, |
MArray< R > & | res, | ||
ACC | acc | ||
) |
Definition at line 308 of file oct-norm.cc.
References m, and Array< T, Alloc >::xelem().
Definition at line 352 of file oct-norm.cc.
R svd_matrix_norm | ( | const MatrixT & | m, |
R | p, | ||
VectorT | |||
) |
Definition at line 512 of file oct-norm.cc.
References current_liboctave_error_handler, higham(), lo_ieee_isinf, m, ColumnVector::max(), RowVector::max(), max_norm_iter, p_less1_gripe, x, xcolnorms(), and xrownorms().
|
inline |
Definition at line 254 of file oct-norm.cc.
References Array< T, Alloc >::numel().
Referenced by dual_p(), higham(), and higham_subp().
R vector_norm | ( | const MArray< T > & | v, |
R | p | ||
) |
Definition at line 348 of file oct-norm.cc.
RowVector xcolnorms | ( | const ComplexMatrix & | m, |
double | p | ||
) |
Definition at line 629 of file oct-norm.cc.
FloatRowVector xcolnorms | ( | const FloatComplexMatrix & | m, |
float | p | ||
) |
Definition at line 631 of file oct-norm.cc.
FloatRowVector xcolnorms | ( | const FloatMatrix & | m, |
float | p | ||
) |
Definition at line 630 of file oct-norm.cc.
Definition at line 628 of file oct-norm.cc.
Referenced by F__icholt__(), F__iluc__(), F__ilutp__(), Fnorm(), matrix_norm(), and svd_matrix_norm().
RowVector xcolnorms | ( | const SparseComplexMatrix & | m, |
double | p | ||
) |
Definition at line 634 of file oct-norm.cc.
RowVector xcolnorms | ( | const SparseMatrix & | m, |
double | p | ||
) |
Definition at line 633 of file oct-norm.cc.
double xfrobnorm | ( | const ComplexMatrix & | x | ) |
Definition at line 586 of file oct-norm.cc.
float xfrobnorm | ( | const FloatComplexMatrix & | x | ) |
Definition at line 588 of file oct-norm.cc.
float xfrobnorm | ( | const FloatMatrix & | x | ) |
Definition at line 587 of file oct-norm.cc.
double xfrobnorm | ( | const Matrix & | x | ) |
Definition at line 585 of file oct-norm.cc.
double xfrobnorm | ( | const SparseComplexMatrix & | x | ) |
Definition at line 614 of file oct-norm.cc.
double xfrobnorm | ( | const SparseMatrix & | x | ) |
Definition at line 613 of file oct-norm.cc.
double xnorm | ( | const ColumnVector & | x, |
double | p | ||
) |
Definition at line 585 of file oct-norm.cc.
Referenced by do_mgorth(), do_sqrtm(), Fnorm(), and chol< T >::init().
double xnorm | ( | const ComplexColumnVector & | x, |
double | p | ||
) |
Definition at line 586 of file oct-norm.cc.
double xnorm | ( | const ComplexMatrix & | x, |
double | p | ||
) |
Definition at line 586 of file oct-norm.cc.
double xnorm | ( | const ComplexRowVector & | x, |
double | p | ||
) |
Definition at line 586 of file oct-norm.cc.
float xnorm | ( | const FloatColumnVector & | x, |
float | p | ||
) |
Definition at line 587 of file oct-norm.cc.
float xnorm | ( | const FloatComplexColumnVector & | x, |
float | p | ||
) |
Definition at line 588 of file oct-norm.cc.
float xnorm | ( | const FloatComplexMatrix & | x, |
float | p | ||
) |
Definition at line 588 of file oct-norm.cc.
float xnorm | ( | const FloatComplexRowVector & | x, |
float | p | ||
) |
Definition at line 588 of file oct-norm.cc.
float xnorm | ( | const FloatMatrix & | x, |
float | p | ||
) |
Definition at line 587 of file oct-norm.cc.
float xnorm | ( | const FloatRowVector & | x, |
float | p | ||
) |
Definition at line 587 of file oct-norm.cc.
double xnorm | ( | const Matrix & | x, |
double | p | ||
) |
Definition at line 585 of file oct-norm.cc.
double xnorm | ( | const RowVector & | x, |
double | p | ||
) |
Definition at line 585 of file oct-norm.cc.
double xnorm | ( | const SparseComplexMatrix & | x, |
double | p | ||
) |
Definition at line 614 of file oct-norm.cc.
double xnorm | ( | const SparseMatrix & | x, |
double | p | ||
) |
Definition at line 613 of file oct-norm.cc.
ColumnVector xrownorms | ( | const ComplexMatrix & | m, |
double | p | ||
) |
Definition at line 629 of file oct-norm.cc.
FloatColumnVector xrownorms | ( | const FloatComplexMatrix & | m, |
float | p | ||
) |
Definition at line 631 of file oct-norm.cc.
FloatColumnVector xrownorms | ( | const FloatMatrix & | m, |
float | p | ||
) |
Definition at line 630 of file oct-norm.cc.
ColumnVector xrownorms | ( | const Matrix & | m, |
double | p | ||
) |
Definition at line 628 of file oct-norm.cc.
Referenced by F__iluc__(), F__ilutp__(), Fnorm(), matrix_norm(), and svd_matrix_norm().
ColumnVector xrownorms | ( | const SparseComplexMatrix & | m, |
double | p | ||
) |
Definition at line 634 of file oct-norm.cc.
ColumnVector xrownorms | ( | const SparseMatrix & | m, |
double | p | ||
) |
Definition at line 633 of file oct-norm.cc.
|
static |
Definition at line 508 of file oct-norm.cc.
Referenced by matrix_norm(), and svd_matrix_norm().
|
static |
Definition at line 503 of file oct-norm.cc.
Referenced by matrix_norm(), and svd_matrix_norm().