GNU Octave  4.0.0
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
CSparse.cc File Reference
#include <cfloat>
#include <iostream>
#include <vector>
#include "quit.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "f77-fcn.h"
#include "dRowVector.h"
#include "mx-m-cs.h"
#include "mx-cs-m.h"
#include "mx-cm-s.h"
#include "mx-fcm-fs.h"
#include "mx-s-cm.h"
#include "mx-fs-fcm.h"
#include "oct-locbuf.h"
#include "dDiagMatrix.h"
#include "CDiagMatrix.h"
#include "CSparse.h"
#include "boolSparse.h"
#include "dSparse.h"
#include "functor.h"
#include "oct-spparms.h"
#include "SparseCmplxLU.h"
#include "oct-sparse.h"
#include "sparse-util.h"
#include "SparseCmplxCHOL.h"
#include "SparseCmplxQR.h"
#include "Sparse-op-defs.h"
#include "Sparse-diag-op-defs.h"
#include "Sparse-perm-op-defs.h"
#include "sparse-dmsolve.cc"
Include dependency graph for CSparse.cc:

Go to the source code of this file.

Macros

#define COL_EXPR
 
#define EMPTY_RETURN_CHECK(T)
 
#define ROW_EXPR
 

Functions

static const Complex Complex_NaN_result ((lo_ieee_nan_value()),(lo_ieee_nan_value()))
 
SparseComplexMatrix conj (const SparseComplexMatrix &a)
 
F77_RET_T F77_FUNC (zgbtrf, ZGBTRF)(const octave_idx_type &
 
F77_RET_T const
octave_idx_type const
octave_idx_type const
octave_idx_type Complex const
octave_idx_type
octave_idx_type
octave_idx_type &F77_RET_T 
F77_FUNC (zgbtrs, ZGBTRS)(F77_CONST_CHAR_ARG_DECL
 
F77_RET_T F77_FUNC (zgbcon, ZGBCON)(F77_CONST_CHAR_ARG_DECL
 
F77_RET_T F77_FUNC (zpbtrf, ZPBTRF)(F77_CONST_CHAR_ARG_DECL
 
F77_RET_T F77_FUNC (zpbtrs, ZPBTRS)(F77_CONST_CHAR_ARG_DECL
 
F77_RET_T F77_FUNC (zpbcon, ZPBCON)(F77_CONST_CHAR_ARG_DECL
 
F77_RET_T F77_FUNC (zgttrf, ZGTTRF)(const octave_idx_type &
 
F77_RET_T Complex Complex
Complex Complex
octave_idx_type
octave_idx_type &F77_RET_T 
F77_FUNC (zgttrs, ZGTTRS)(F77_CONST_CHAR_ARG_DECL
 
F77_RET_T F77_FUNC (zptsv, ZPTSV)(const octave_idx_type &
 
F77_RET_T const
octave_idx_type double Complex
Complex const octave_idx_type
octave_idx_type &F77_RET_T 
F77_FUNC (zgtsv, ZGTSV)(const octave_idx_type &
 
ComplexMatrix herm_mul (const SparseComplexMatrix &m, const ComplexMatrix &a)
 
SparseComplexMatrix max (const Complex &c, const SparseComplexMatrix &m)
 
SparseComplexMatrix max (const SparseComplexMatrix &m, const Complex &c)
 
SparseComplexMatrix max (const SparseComplexMatrix &a, const SparseComplexMatrix &b)
 
SparseComplexMatrix min (const Complex &c, const SparseComplexMatrix &m)
 
SparseComplexMatrix min (const SparseComplexMatrix &m, const Complex &c)
 
SparseComplexMatrix min (const SparseComplexMatrix &a, const SparseComplexMatrix &b)
 
ComplexMatrix mul_herm (const ComplexMatrix &m, const SparseComplexMatrix &a)
 
ComplexMatrix mul_trans (const ComplexMatrix &m, const SparseComplexMatrix &a)
 
SparseBoolMatrix mx_el_and (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_and (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_and (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_eq (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_eq (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_eq (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_ge (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_ge (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_ge (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_gt (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_gt (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_gt (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_le (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_le (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_le (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_lt (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_lt (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_lt (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_ne (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_ne (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_ne (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_or (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_or (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_or (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &m, const SparseMatrix &a)
 
SparseComplexMatrix operator* (const SparseMatrix &m, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &m, const SparseComplexMatrix &a)
 
ComplexMatrix operator* (const ComplexMatrix &m, const SparseMatrix &a)
 
ComplexMatrix operator* (const Matrix &m, const SparseComplexMatrix &a)
 
ComplexMatrix operator* (const ComplexMatrix &m, const SparseComplexMatrix &a)
 
ComplexMatrix operator* (const SparseComplexMatrix &m, const Matrix &a)
 
ComplexMatrix operator* (const SparseMatrix &m, const ComplexMatrix &a)
 
ComplexMatrix operator* (const SparseComplexMatrix &m, const ComplexMatrix &a)
 
SparseComplexMatrix operator* (const DiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &a, const DiagMatrix &d)
 
SparseComplexMatrix operator* (const ComplexDiagMatrix &d, const SparseMatrix &a)
 
SparseComplexMatrix operator* (const SparseMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator* (const ComplexDiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator* (const PermMatrix &p, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &a, const PermMatrix &p)
 
SparseComplexMatrix operator+ (const ComplexDiagMatrix &d, const SparseMatrix &a)
 
SparseComplexMatrix operator+ (const DiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator+ (const ComplexDiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator+ (const SparseMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator+ (const SparseComplexMatrix &a, const DiagMatrix &d)
 
SparseComplexMatrix operator+ (const SparseComplexMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator- (const ComplexDiagMatrix &d, const SparseMatrix &a)
 
SparseComplexMatrix operator- (const DiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator- (const ComplexDiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator- (const SparseMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator- (const SparseComplexMatrix &a, const DiagMatrix &d)
 
SparseComplexMatrix operator- (const SparseComplexMatrix &a, const ComplexDiagMatrix &d)
 
std::ostream & operator<< (std::ostream &os, const SparseComplexMatrix &a)
 
std::istream & operator>> (std::istream &is, SparseComplexMatrix &a)
 
ComplexMatrix trans_mul (const SparseComplexMatrix &m, const ComplexMatrix &a)
 

Variables

F77_RET_T const
octave_idx_type const
octave_idx_type const
octave_idx_type Complex const
octave_idx_type
octave_idx_type
octave_idx_type &F77_RET_T
const octave_idx_type const
octave_idx_type const
octave_idx_type const
octave_idx_type const Complex
const octave_idx_type const
octave_idx_type Complex const
octave_idx_type
octave_idx_type
F77_CHAR_ARG_LEN_DECL
 

Macro Definition Documentation

#define COL_EXPR
Value:
Complex d = data (i); \
tmp[j] += d * conj (d)
F77_RET_T const double const double double * d
SparseComplexMatrix conj(const SparseComplexMatrix &a)
Definition: CSparse.cc:713
std::complex< double > Complex
Definition: oct-cmplx.h:29

Referenced by SparseComplexMatrix::sumsq().

#define EMPTY_RETURN_CHECK (   T)
Value:
if (nr == 0 || nc == 0) \
return T (nr, nc);

Definition at line 7568 of file CSparse.cc.

Referenced by max(), and min().

#define ROW_EXPR
Value:
Complex d = data (i); \
tmp[ridx (i)] += d * conj (d)
F77_RET_T const double const double double * d
SparseComplexMatrix conj(const SparseComplexMatrix &a)
Definition: CSparse.cc:713
std::complex< double > Complex
Definition: oct-cmplx.h:29

Referenced by SparseComplexMatrix::sumsq().

Function Documentation

static const Complex Complex_NaN_result ( (lo_ieee_nan_value())  ,
(lo_ieee_nan_value())   
)
static
F77_RET_T F77_FUNC ( zgbtrf  ,
ZGBTRF   
) const
F77_RET_T F77_FUNC ( zgbcon  ,
ZGBCON   
)
F77_RET_T F77_FUNC ( zpbtrf  ,
ZPBTRF   
)
F77_RET_T F77_FUNC ( zpbtrs  ,
ZPBTRS   
)
F77_RET_T F77_FUNC ( zpbcon  ,
ZPBCON   
)
F77_RET_T F77_FUNC ( zgttrf  ,
ZGTTRF   
) const
F77_RET_T F77_FUNC ( zptsv  ,
ZPTSV   
) const
F77_RET_T const octave_idx_type double Complex Complex const octave_idx_type octave_idx_type& F77_RET_T F77_FUNC ( zgtsv  ,
ZGTSV   
) const
ComplexMatrix herm_mul ( const SparseComplexMatrix m,
const ComplexMatrix a 
)

Definition at line 7451 of file CSparse.cc.

References conj(), and SPARSE_FULL_TRANS_MUL.

Referenced by install_cm_cm_ops(), install_fcm_fcm_ops(), and install_scm_cm_ops().

SparseComplexMatrix max ( const Complex c,
const SparseComplexMatrix m 
)
SparseComplexMatrix max ( const SparseComplexMatrix m,
const Complex c 
)

Definition at line 7714 of file CSparse.cc.

References max().

SparseComplexMatrix max ( const SparseComplexMatrix a,
const SparseComplexMatrix b 
)
SparseComplexMatrix min ( const Complex c,
const SparseComplexMatrix m 
)
SparseComplexMatrix min ( const SparseComplexMatrix m,
const Complex c 
)

Definition at line 7597 of file CSparse.cc.

References min().

SparseComplexMatrix min ( const SparseComplexMatrix a,
const SparseComplexMatrix b 
)
ComplexMatrix mul_herm ( const ComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7421 of file CSparse.cc.

References conj(), and FULL_SPARSE_MUL_TRANS.

Referenced by install_cm_cm_ops(), install_cm_scm_ops(), and install_fcm_fcm_ops().

ComplexMatrix mul_trans ( const ComplexMatrix m,
const SparseComplexMatrix a 
)
SparseBoolMatrix mx_el_and ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7808 of file CSparse.cc.

SparseBoolMatrix mx_el_and ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7812 of file CSparse.cc.

SparseBoolMatrix mx_el_and ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7816 of file CSparse.cc.

SparseBoolMatrix mx_el_eq ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7807 of file CSparse.cc.

SparseBoolMatrix mx_el_eq ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7811 of file CSparse.cc.

SparseBoolMatrix mx_el_eq ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7815 of file CSparse.cc.

SparseBoolMatrix mx_el_ge ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7807 of file CSparse.cc.

SparseBoolMatrix mx_el_ge ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7811 of file CSparse.cc.

SparseBoolMatrix mx_el_ge ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7815 of file CSparse.cc.

SparseBoolMatrix mx_el_gt ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7807 of file CSparse.cc.

SparseBoolMatrix mx_el_gt ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7811 of file CSparse.cc.

SparseBoolMatrix mx_el_gt ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7815 of file CSparse.cc.

SparseBoolMatrix mx_el_le ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7807 of file CSparse.cc.

SparseBoolMatrix mx_el_le ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7811 of file CSparse.cc.

SparseBoolMatrix mx_el_le ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7815 of file CSparse.cc.

SparseBoolMatrix mx_el_lt ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7807 of file CSparse.cc.

SparseBoolMatrix mx_el_lt ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7811 of file CSparse.cc.

SparseBoolMatrix mx_el_lt ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7815 of file CSparse.cc.

SparseBoolMatrix mx_el_ne ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7807 of file CSparse.cc.

SparseBoolMatrix mx_el_ne ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7811 of file CSparse.cc.

SparseBoolMatrix mx_el_ne ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7815 of file CSparse.cc.

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7808 of file CSparse.cc.

SparseBoolMatrix mx_el_or ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7812 of file CSparse.cc.

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7816 of file CSparse.cc.

SparseComplexMatrix operator* ( const SparseComplexMatrix m,
const SparseMatrix a 
)

Definition at line 7379 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

SparseComplexMatrix operator* ( const SparseMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7385 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

SparseComplexMatrix operator* ( const SparseComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7391 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

ComplexMatrix operator* ( const ComplexMatrix m,
const SparseMatrix a 
)

Definition at line 7397 of file CSparse.cc.

References FULL_SPARSE_MUL.

ComplexMatrix operator* ( const Matrix m,
const SparseComplexMatrix a 
)

Definition at line 7403 of file CSparse.cc.

References FULL_SPARSE_MUL.

ComplexMatrix operator* ( const ComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7409 of file CSparse.cc.

References FULL_SPARSE_MUL.

ComplexMatrix operator* ( const SparseComplexMatrix m,
const Matrix a 
)

Definition at line 7427 of file CSparse.cc.

References SPARSE_FULL_MUL.

ComplexMatrix operator* ( const SparseMatrix m,
const ComplexMatrix a 
)

Definition at line 7433 of file CSparse.cc.

References SPARSE_FULL_MUL.

ComplexMatrix operator* ( const SparseComplexMatrix m,
const ComplexMatrix a 
)

Definition at line 7439 of file CSparse.cc.

References SPARSE_FULL_MUL.

SparseComplexMatrix operator* ( const DiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7458 of file CSparse.cc.

References d.

SparseComplexMatrix operator* ( const SparseComplexMatrix a,
const DiagMatrix d 
)

Definition at line 7463 of file CSparse.cc.

References d.

SparseComplexMatrix operator* ( const ComplexDiagMatrix d,
const SparseMatrix a 
)

Definition at line 7469 of file CSparse.cc.

References d.

SparseComplexMatrix operator* ( const SparseMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7474 of file CSparse.cc.

References d.

SparseComplexMatrix operator* ( const ComplexDiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7480 of file CSparse.cc.

References d.

SparseComplexMatrix operator* ( const SparseComplexMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7485 of file CSparse.cc.

References d.

SparseComplexMatrix operator* ( const PermMatrix p,
const SparseComplexMatrix a 
)

Definition at line 7555 of file CSparse.cc.

References octinternal_do_mul_pm_sm().

SparseComplexMatrix operator* ( const SparseComplexMatrix a,
const PermMatrix p 
)

Definition at line 7561 of file CSparse.cc.

References octinternal_do_mul_sm_pm().

SparseComplexMatrix operator+ ( const ComplexDiagMatrix d,
const SparseMatrix a 
)

Definition at line 7491 of file CSparse.cc.

References d.

SparseComplexMatrix operator+ ( const DiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7496 of file CSparse.cc.

References d.

SparseComplexMatrix operator+ ( const ComplexDiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7501 of file CSparse.cc.

References d.

SparseComplexMatrix operator+ ( const SparseMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7506 of file CSparse.cc.

References d.

SparseComplexMatrix operator+ ( const SparseComplexMatrix a,
const DiagMatrix d 
)

Definition at line 7511 of file CSparse.cc.

References d.

SparseComplexMatrix operator+ ( const SparseComplexMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7516 of file CSparse.cc.

References d.

SparseComplexMatrix operator- ( const ComplexDiagMatrix d,
const SparseMatrix a 
)

Definition at line 7522 of file CSparse.cc.

References d.

SparseComplexMatrix operator- ( const DiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7527 of file CSparse.cc.

References d.

SparseComplexMatrix operator- ( const ComplexDiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7532 of file CSparse.cc.

References d.

SparseComplexMatrix operator- ( const SparseMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7537 of file CSparse.cc.

References d.

SparseComplexMatrix operator- ( const SparseComplexMatrix a,
const DiagMatrix d 
)

Definition at line 7542 of file CSparse.cc.

References d.

SparseComplexMatrix operator- ( const SparseComplexMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7547 of file CSparse.cc.

References d.

std::ostream& operator<< ( std::ostream &  os,
const SparseComplexMatrix a 
)
std::istream& operator>> ( std::istream &  is,
SparseComplexMatrix a 
)

Definition at line 7371 of file CSparse.cc.

ComplexMatrix trans_mul ( const SparseComplexMatrix m,
const ComplexMatrix a 
)

Variable Documentation

Definition at line 84 of file CSparse.cc.