CPPLapack
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Public Attributes | Friends | List of all members
dsymatrix Class Reference

Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage]. More...

#include <dsymatrix.hpp>

Public Member Functions

 dsymatrix ()
 
 dsymatrix (const dsymatrix &)
 
 dsymatrix (const _dsymatrix &)
 
 dsymatrix (const CPPL_INT &)
 
 dsymatrix (const char *)
 
 ~dsymatrix ()
 
_zhematrix to_zhematrix () const
 
_dgematrix to_dgematrix () const
 
_dssmatrix to_dssmatrix (const double eps=-1) const
 
double & operator() (const CPPL_INT &, const CPPL_INT &)
 
double operator() (const CPPL_INT &, const CPPL_INT &) const
 
dsymatrixset (const CPPL_INT &, const CPPL_INT &, const double &)
 
void write (const char *) const
 
void read (const char *)
 
void complete () const
 
void clear ()
 
dsymatrixzero ()
 
dsymatrixidentity ()
 
void chsign ()
 
void copy (const dsymatrix &)
 
void shallow_copy (const _dsymatrix &)
 
dsymatrixresize (const CPPL_INT &)
 
_drovector row (const CPPL_INT &) const
 
_dcovector col (const CPPL_INT &) const
 
CPPL_INT dsysv (dgematrix &)
 
CPPL_INT dsysv (dcovector &)
 
CPPL_INT dsyev (std::vector< double > &, const bool &)
 
CPPL_INT dsyev (std::vector< double > &, std::vector< dcovector > &)
 
CPPL_INT dsyev (std::vector< double > &, std::vector< drovector > &)
 
CPPL_INT dsygv (dsymatrix &, std::vector< double > &)
 
CPPL_INT dsygv (dsymatrix &, std::vector< double > &, std::vector< dcovector > &)
 
dsymatrixoperator= (const dsymatrix &)
 
dsymatrixoperator= (const _dsymatrix &)
 
dsymatrixoperator+= (const dsymatrix &)
 
dsymatrixoperator+= (const _dsymatrix &)
 
dsymatrixoperator-= (const dsymatrix &)
 
dsymatrixoperator-= (const _dsymatrix &)
 
dsymatrixoperator*= (const dsymatrix &)
 
dsymatrixoperator*= (const _dsymatrix &)
 
dsymatrixoperator*= (const double &)
 
dsymatrixoperator/= (const double &)
 

Public Attributes

CPPL_INT const & m
 matrix row size More...
 
CPPL_INT n
 matrix column size More...
 
double * array
 1D array to store matrix data More...
 
double ** darray
 array of pointers of column head addresses More...
 

Friends

std::ostream & operator<< (std::ostream &, const dsymatrix &)
 
void swap (dsymatrix &, dsymatrix &)
 
_dsymatrix _ (dsymatrix &)
 
_dsymatrix t (const dsymatrix &)
 
_dsymatrix i (const dsymatrix &)
 
void idamax (CPPL_INT &, CPPL_INT &, const dsymatrix &)
 
double damax (const dsymatrix &)
 
const dsymatrixoperator+ (const dsymatrix &)
 
_dsymatrix operator- (const dsymatrix &)
 
_dgematrix operator+ (const dsymatrix &, const dgematrix &)
 
_dgematrix operator+ (const dsymatrix &, const _dgematrix &)
 
_dsymatrix operator+ (const dsymatrix &, const dsymatrix &)
 
_dsymatrix operator+ (const dsymatrix &, const _dsymatrix &)
 
_dgematrix operator+ (const dsymatrix &, const dgbmatrix &)
 
_dgematrix operator+ (const dsymatrix &, const _dgbmatrix &)
 
_dgematrix operator+ (const dsymatrix &, const dgsmatrix &)
 
_dgematrix operator+ (const dsymatrix &, const _dgsmatrix &)
 
_dsymatrix operator+ (const dsymatrix &, const dssmatrix &)
 
_dsymatrix operator+ (const dsymatrix &, const _dssmatrix &)
 
_dgematrix operator- (const dsymatrix &, const dgematrix &)
 
_dgematrix operator- (const dsymatrix &, const _dgematrix &)
 
_dsymatrix operator- (const dsymatrix &, const dsymatrix &)
 
_dsymatrix operator- (const dsymatrix &, const _dsymatrix &)
 
_dgematrix operator- (const dsymatrix &, const dgbmatrix &)
 
_dgematrix operator- (const dsymatrix &, const _dgbmatrix &)
 
_dgematrix operator- (const dsymatrix &, const dgsmatrix &)
 
_dgematrix operator- (const dsymatrix &, const _dgsmatrix &)
 
_dsymatrix operator- (const dsymatrix &, const dssmatrix &)
 
_dsymatrix operator- (const dsymatrix &, const _dssmatrix &)
 
_dcovector operator* (const dsymatrix &, const dcovector &)
 
_dcovector operator* (const dsymatrix &, const _dcovector &)
 
_dgematrix operator* (const dsymatrix &, const dgematrix &)
 
_dgematrix operator* (const dsymatrix &, const _dgematrix &)
 
_dgematrix operator* (const dsymatrix &, const dsymatrix &)
 
_dgematrix operator* (const dsymatrix &, const _dsymatrix &)
 
_dgematrix operator* (const dsymatrix &, const dgbmatrix &)
 
_dgematrix operator* (const dsymatrix &, const _dgbmatrix &)
 
_dgematrix operator* (const dsymatrix &, const dgsmatrix &)
 
_dgematrix operator* (const dsymatrix &, const _dgsmatrix &)
 
_dsymatrix operator* (const dsymatrix &, const dssmatrix &)
 
_dsymatrix operator* (const dsymatrix &, const _dssmatrix &)
 
_dsymatrix operator* (const dsymatrix &, const double &)
 
_dsymatrix operator/ (const dsymatrix &, const double &)
 
_dsymatrix operator* (const double &, const dsymatrix &)
 

Detailed Description

Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].

Definition at line 3 of file dsymatrix.hpp.

Constructor & Destructor Documentation

dsymatrix::dsymatrix ( )
inline

dsymatrix constructor without arguments

Definition at line 3 of file dsymatrix-constructor.hpp.

References array, darray, and n.

4  : m(n)
5 {CPPL_VERBOSE_REPORT;
6  //////// initialize ////////
7  n = 0;
8  array =NULL;
9  darray =NULL;
10 }
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix::dsymatrix ( const dsymatrix mat)
inline

dsymatrix copy constructor

Definition at line 14 of file dsymatrix-constructor.hpp.

References array, darray, i, and n.

15  : m(n)
16 {CPPL_VERBOSE_REPORT;
17  //////// initialize ////////
18  n =mat.n;
19  array =new double[n*n];
20  darray =new double*[n];
21  for(int i=0; i<n; i++){
22  darray[i] =&array[i*n];
23  }
24 
25  //////// copy ////////
26  CPPL_INT size =n*n;
27  CPPL_INT inc =1;
28  dcopy_(&size, mat.array, &inc, array, &inc);
29 }
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix::dsymatrix ( const _dsymatrix mat)
inline

dsymatrix constructor to cast _dsymatrix

Definition at line 33 of file dsymatrix-constructor.hpp.

References array, _dsymatrix::array, darray, _dsymatrix::darray, n, _dsymatrix::n, and _dsymatrix::nullify().

34  : m(n)
35 {CPPL_VERBOSE_REPORT;
36  n =mat.n;
37  array =mat.array;
38  darray =mat.darray;
39 
40  mat.nullify();
41 }
double * array
1D array to store matrix data
Definition: _dsymatrix.hpp:12
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void nullify() const
dsymatrix::dsymatrix ( const CPPL_INT &  _n)
inline

dsymatrix copy constructor to cast dssmatrix

dsymatrix constructor to cast _dssmatrix

dsymatrix constructor with size specification

Definition at line 87 of file dsymatrix-constructor.hpp.

References array, darray, i, and n.

88  : m(n)
89 {CPPL_VERBOSE_REPORT;
90 #ifdef CPPL_DEBUG
91  if( _n<0 ){
92  ERROR_REPORT;
93  std::cerr << "Matrix sizes must be positive integers. " << std::endl
94  << "Your input was (" << _n << ")." << std::endl;
95  exit(1);
96  }
97 #endif//CPPL_DEBUG
98 
99  //////// initialize ////////
100  n =_n;
101  array =new double[n*n];
102  darray =new double*[n];
103  for(int i=0; i<n; i++){
104  darray[i] =&array[i*n];
105  }
106 }
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix::dsymatrix ( const char *  filename)
inline

dsymatrix constructor with filename

Definition at line 110 of file dsymatrix-constructor.hpp.

References array, darray, and read().

111  : m(n)
112 {CPPL_VERBOSE_REPORT;
113  array =NULL;
114  darray =NULL;
115 
116  //// copy ////
117  read(filename);
118 }
void read(const char *)
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix::~dsymatrix ( )
inline

dsymatrix destructor

Definition at line 126 of file dsymatrix-constructor.hpp.

References array, and darray.

127 {CPPL_VERBOSE_REPORT;
128  delete [] array;
129  delete [] darray;
130 }
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12

Member Function Documentation

_zhematrix dsymatrix::to_zhematrix ( ) const
inline

cast to _zhematrix

Definition at line 3 of file dsymatrix-cast.hpp.

References _, i, and n.

4 {CPPL_VERBOSE_REPORT;
5  zhematrix newmat(n);
6 
7  for(CPPL_INT j=0; j<n; j++){
8  for(CPPL_INT i=j; i<n; i++){
9  newmat(i,j) =comple((*this)(i,j),0.0);
10  }
11  }
12 
13  return _(newmat);
14 }
friend _dsymatrix _(dsymatrix &)
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
Definition: zhematrix.hpp:4
_dgematrix dsymatrix::to_dgematrix ( ) const
inline

convert to _dgematrix

Definition at line 22 of file dsymatrix-cast.hpp.

References _, i, and n.

Referenced by operator+(), and operator-().

23 {CPPL_VERBOSE_REPORT;
24  dgematrix newmat(n,n);
25 
26  for(CPPL_INT i=0; i<n; i++){
27  for(CPPL_INT j=0; j<n; j++){
28  newmat(i,j) =(*this)(i,j);
29  }
30  }
31 
32  return _(newmat);
33 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
_dssmatrix dsymatrix::to_dssmatrix ( const double  eps = -1) const
inline

convert to _dssmatrix

Definition at line 37 of file dsymatrix-cast.hpp.

References _, i, and n.

38 {CPPL_VERBOSE_REPORT;
39  dssmatrix newmat(n);
40 
41  for(CPPL_INT j=0; j<n; j++){
42  for(CPPL_INT i=j; i<n; i++){
43  if( fabs((*this)(i,j))>eps ){
44  newmat(i,j) =(*this)(i,j);
45  }
46  }
47  }
48 
49  return _(newmat);
50 }
friend _dsymatrix _(dsymatrix &)
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
Real Double-precision Symmetric Sparse Matrix Class.
Definition: dssmatrix.hpp:3
double & dsymatrix::operator() ( const CPPL_INT &  i,
const CPPL_INT &  j 
)
inline

operator() for non-const object

Definition at line 3 of file dsymatrix-io.hpp.

References darray, i, and n.

Referenced by read(), and write().

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if( i<0 || j<0 || n<=i || n<=j ){
7  ERROR_REPORT;
8  std::cerr << "The required component is out of the matrix size." << std::endl
9  << "Your input is (" << i << "," << j << "), whereas the matrix size is " << n << "x" << n << "." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  if( i >= j ) {
15  //return array[i+n*j];
16  return darray[j][i];
17  } else {
18  //return array[j+n*i];
19  return darray[i][j];
20  }
21 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
double dsymatrix::operator() ( const CPPL_INT &  i,
const CPPL_INT &  j 
) const
inline

operator() for const object

Definition at line 25 of file dsymatrix-io.hpp.

References darray, i, and n.

26 {CPPL_VERBOSE_REPORT;
27 #ifdef CPPL_DEBUG
28  if( i<0 || j<0 || n<=i || n<=j ){
29  ERROR_REPORT;
30  std::cerr << "The required component is out of the matrix size." << std::endl
31  << "Your input is (" << i << "," << j << "), whereas the matrix size is " << n << "x" << n << "." << std::endl;
32  exit(1);
33  }
34 #endif//CPPL_DEBUG
35 
36  if( i >= j ) {
37  //return array[i+n*j];
38  return darray[j][i];
39  } else {
40  //return array[j+n*i];
41  return darray[i][j];
42  }
43 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::set ( const CPPL_INT &  i,
const CPPL_INT &  j,
const double &  v 
)
inline

set value for const object

Definition at line 51 of file dsymatrix-io.hpp.

References darray, i, and n.

52 {CPPL_VERBOSE_REPORT;
53 #ifdef CPPL_DEBUG
54  if( i<0 || j<0 || n<=i || n<=j ){
55  ERROR_REPORT;
56  std::cerr << "The required component is out of the matrix size." << std::endl
57  << "Your input is (" << i << "," << j << "), whereas the matrix size is " << n << "x" << n << "." << std::endl;
58  exit(1);
59  }
60 #endif//CPPL_DEBUG
61 
62  if( i >= j ) {
63  //array[i+n*j] = v;
64  darray[j][i] =v;
65  } else {
66  //array[j+n*i] = v;
67  darray[i][j] =v;
68  }
69  return *this;
70 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void dsymatrix::write ( const char *  filename) const
inline

Definition at line 96 of file dsymatrix-io.hpp.

References i, n, and operator()().

97 {CPPL_VERBOSE_REPORT;
98  std::ofstream ofs(filename, std::ios::trunc);
99  ofs.setf(std::cout.flags());
100  ofs.precision(std::cout.precision());
101  ofs.width(std::cout.width());
102  ofs.fill(std::cout.fill());
103 
104  ofs << "#dsymatrix " << n << std::endl;
105  for(CPPL_INT i=0; i<n; i++){
106  for(CPPL_INT j=0; j<=i; j++){
107  ofs << operator()(i,j) << " ";
108  }
109  ofs << std::endl;
110  }
111 
112  ofs.close();
113 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double & operator()(const CPPL_INT &, const CPPL_INT &)
Definition: dsymatrix-io.hpp:3
void dsymatrix::read ( const char *  filename)
inline

Definition at line 116 of file dsymatrix-io.hpp.

References i, n, operator()(), and resize().

Referenced by dsymatrix().

117 {CPPL_VERBOSE_REPORT;
118  std::ifstream s(filename);
119  if(!s){
120  ERROR_REPORT;
121  std::cerr << "The file \"" << filename << "\" can not be opened." << std::endl;
122  exit(1);
123  }
124 
125  std::string id;
126  s >> id;
127  if( id != "dsymatrix" && id != "#dsymatrix" ){
128  ERROR_REPORT;
129  std::cerr << "The type name of the file \"" << filename << "\" is not dsymatrix." << std::endl
130  << "Its type name was " << id << " ." << std::endl;
131  exit(1);
132  }
133 
134  s >> n;
135  resize(n);
136  for(CPPL_INT i=0; i<n; i++){
137  for(CPPL_INT j=0; j<=i; j++ ){
138  s >> operator()(i,j);
139  }
140  }
141  if(s.eof()){
142  ERROR_REPORT;
143  std::cerr << "There is something is wrong with the file \"" << filename << " ." << std::endl
144  << "Most likely, there is not enough data components, or a linefeed code or space code is missing at the end of the last line." << std::endl;
145  exit(1);
146  }
147 
148  s >> id;
149  if(!s.eof()){
150  ERROR_REPORT;
151  std::cerr << "There is something is wrong with the file \"" << filename << "\"." << std::endl
152  << "Most likely, there are extra data components." << std::endl;
153  exit(1);
154  }
155 
156  s.close();
157 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double & operator()(const CPPL_INT &, const CPPL_INT &)
Definition: dsymatrix-io.hpp:3
dsymatrix & resize(const CPPL_INT &)
void dsymatrix::complete ( ) const
inline

complete the upper-right components

Definition at line 3 of file dsymatrix-misc.hpp.

References darray, i, and n.

Referenced by i(), and operator*().

4 {CPPL_VERBOSE_REPORT;
5  for(CPPL_INT i=0; i<n; i++){
6  for(CPPL_INT j=0; j<i; j++){
7  darray[i][j] =darray[j][i];
8  }
9  }
10 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void dsymatrix::clear ( )
inline

clear all the matrix data and set the sizes 0

Definition at line 14 of file dsymatrix-misc.hpp.

References array, darray, and n.

15 {CPPL_VERBOSE_REPORT;
16  n =0;
17  delete [] array;
18  array =NULL;
19  delete [] darray;
20  darray =NULL;
21 }
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::zero ( )
inline

change the matrix into a zero matrix

Definition at line 25 of file dsymatrix-misc.hpp.

References darray, i, and n.

Referenced by _dssmatrix::to_dsymatrix(), and dssmatrix::to_dsymatrix().

26 {CPPL_VERBOSE_REPORT;
27  for(CPPL_INT j=0; j<n; j++){
28  for(CPPL_INT i=j; i<n; i++){
29  darray[j][i] =0.;
30  }
31  }
32  return *this;
33 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::identity ( )
inline

change the matrix into an identity matrix

Definition at line 37 of file dsymatrix-misc.hpp.

References darray, i, and n.

Referenced by i().

38 {CPPL_VERBOSE_REPORT;
39  for(CPPL_INT j=0; j<n; j++){
40  darray[j][j] =1.;
41  for(CPPL_INT i=j+1; i<n; i++){
42  darray[j][i] =0.;
43  }
44  }
45  return *this;
46 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void dsymatrix::chsign ( )
inline

change sign(+/-) of the matrix

Definition at line 50 of file dsymatrix-misc.hpp.

References darray, i, and n.

51 {CPPL_VERBOSE_REPORT;
52  for(CPPL_INT j=0; j<n; j++){
53  for(CPPL_INT i=j; i<n; i++){
54  darray[j][i] =-darray[j][i];
55  }
56  }
57 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void dsymatrix::copy ( const dsymatrix mat)
inline

make a deep copy of the matrix

Definition at line 61 of file dsymatrix-misc.hpp.

References array, darray, i, and n.

Referenced by operator=().

62 {CPPL_VERBOSE_REPORT;
63  n =mat.n;
64  delete [] array;
65  array =new double[n*n];
66  delete [] darray;
67  darray =new double*[n];
68  for(int i=0; i<n; i++){
69  darray[i] =&array[i*n];
70  }
71 
72  for(CPPL_INT j=0; j<n; j++){
73  for(CPPL_INT i=j; i<n; i++){
74  darray[j][i] =mat.darray[j][i];
75  }
76  }
77 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void dsymatrix::shallow_copy ( const _dsymatrix mat)
inline

make a shallow copy of the matrix
This function is not designed to be used in project codes.

Definition at line 82 of file dsymatrix-misc.hpp.

References array, _dsymatrix::array, darray, _dsymatrix::darray, n, _dsymatrix::n, and _dsymatrix::nullify().

Referenced by operator=().

83 {CPPL_VERBOSE_REPORT;
84  n =mat.n;
85  delete [] array;
86  array =mat.array;
87  delete [] darray;
88  darray =mat.darray;
89 
90  mat.nullify();
91 }
double * array
1D array to store matrix data
Definition: _dsymatrix.hpp:12
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
void nullify() const
dsymatrix & dsymatrix::resize ( const CPPL_INT &  _n)
inline

resize the matrix

Definition at line 95 of file dsymatrix-misc.hpp.

References array, darray, i, and n.

Referenced by read().

96 {CPPL_VERBOSE_REPORT;
97 #ifdef CPPL_DEBUG
98  if( _n<0 ){
99  ERROR_REPORT;
100  std::cerr << "Matrix sizes must be positive integers." << std::endl
101  << "Your input was (" << _n << ")." << std::endl;
102  exit(1);
103  }
104 #endif//CPPL_DEBUG
105 
106  n =_n;
107  delete [] array;
108  array =new double[n*n];
109  delete [] darray;
110  darray =new double*[n];
111  for(int i=0; i<n; i++){
112  darray[i] =&array[i*n];
113  }
114 
115  return *this;
116 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_drovector dsymatrix::row ( const CPPL_INT &  _m) const
inline

get row of the matrix

Definition at line 124 of file dsymatrix-misc.hpp.

References _, m, and n.

125 {CPPL_VERBOSE_REPORT;
126 #ifdef CPPL_DEBUG
127  if( _m<0 || _m>m ){
128  ERROR_REPORT;
129  std::cerr << "Input row number must be between 0 and " << m << "." << std::endl
130  << "Your input was " << _m << "." << std::endl;
131  exit(1);
132  }
133 #endif//CPPL_DEBUG
134 
135  drovector v(n);
136  for(CPPL_INT j=0; j<n; j++){
137  v(j)=(*this)(_m,j);
138  }
139  return _(v);
140 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Row Vector Class.
Definition: drovector.hpp:3
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
_dcovector dsymatrix::col ( const CPPL_INT &  _n) const
inline

get column of the matrix

Definition at line 144 of file dsymatrix-misc.hpp.

References _, i, m, and n.

145 {CPPL_VERBOSE_REPORT;
146 #ifdef CPPL_DEBUG
147  if( _n<0 || _n>n ){
148  ERROR_REPORT;
149  std::cerr << "Input row number must be between 0 and " << n << "." << std::endl
150  << "Your input was " << _n << "." << std::endl;
151  exit(1);
152  }
153 #endif//CPPL_DEBUG
154 
155  dcovector v(m);
156  for(CPPL_INT i=0; i<m; i++){
157  v(i)=(*this)(i,_n);
158  }
159  return _(v);
160 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
CPPL_INT dsymatrix::dsysv ( dgematrix mat)
inline

solve A*X=Y using dsysv
The argument is dmatrix Y. Y is overwritten and become the solution X. A is also overwritten.

Definition at line 6 of file dsymatrix-lapack.hpp.

References array, dgematrix::array, dgematrix::m, n, and dgematrix::n.

7 {CPPL_VERBOSE_REPORT;
8 #ifdef CPPL_DEBUG
9  if(n!=mat.n){
10  ERROR_REPORT;
11  std::cerr << "These two matrices cannot be solved." << std::endl
12  << "Your input was (" << n << "x" << n << ") and (" << mat.n << "x" << mat.n << ")." << std::endl;
13  exit(1);
14  }
15 #endif//CPPL_DEBUG
16 
17  char UPLO('l');
18  CPPL_INT NRHS(mat.n), LDA(n), *IPIV(new CPPL_INT[n]), LDB(mat.m), LWORK(-1), INFO(1);
19  double *WORK( new double[1] );
20  dsysv_(&UPLO, &n, &NRHS, array, &LDA, IPIV, mat.array, &LDB, WORK, &LWORK, &INFO);
21 
22  INFO=1;
23  LWORK = CPPL_INT(WORK[0]);
24  delete [] WORK;
25  WORK = new double[LWORK];
26  dsysv_(&UPLO, &n, &NRHS, array, &LDA, IPIV, mat.array, &LDB, WORK, &LWORK, &INFO);
27  delete [] WORK;
28  delete [] IPIV;
29 
30  if(INFO!=0){
31  WARNING_REPORT;
32  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
33  }
34  return INFO;
35 }
CPPL_INT m
matrix row size
Definition: dgematrix.hpp:9
double * array
1D array to store matrix data
Definition: dgematrix.hpp:11
CPPL_INT n
matrix column size
Definition: dgematrix.hpp:10
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT dsymatrix::dsysv ( dcovector vec)
inline

solve A*x=y using dsysv
The argument is dcovector y. y is overwritten and become the solution x. A is also overwritten.

Definition at line 42 of file dsymatrix-lapack.hpp.

References array, dcovector::array, dcovector::l, and n.

43 {CPPL_VERBOSE_REPORT;
44 #ifdef CPPL_DEBUG
45  if(n!=vec.l){
46  ERROR_REPORT;
47  std::cerr << "These matrix and vector cannot be solved." << std::endl
48  << "Your input was (" << n << "x" << n << ") and (" << vec.l << ")." << std::endl;
49  exit(1);
50  }
51 #endif//CPPL_DEBUG
52 
53  char UPLO('l');
54  CPPL_INT NRHS(1), LDA(n), *IPIV(new CPPL_INT[n]), LDB(vec.l), LWORK(-1), INFO(1);
55  double *WORK( new double[1] );
56  dsysv_(&UPLO, &n, &NRHS, array, &LDA, IPIV, vec.array, &LDB, WORK, &LWORK, &INFO);
57 
58  INFO=1;
59  LWORK = CPPL_INT(WORK[0]);
60  delete [] WORK;
61  WORK = new double[LWORK];
62  dsysv_(&UPLO, &n, &NRHS, array, &LDA, IPIV, vec.array, &LDB, WORK, &LWORK, &INFO);
63  delete [] WORK;
64  delete [] IPIV;
65 
66  if(INFO!=0){
67  WARNING_REPORT;
68  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
69  }
70  return INFO;
71 }
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT dsymatrix::dsyev ( std::vector< double > &  w,
const bool &  jobz = 0 
)
inline

calculate eigenvalues and eigenvectors.
All of the arguments need not to be initialized. w is overwitten and become eigenvalues. This matrix is also overwritten. if jobz=1, this matrix becomes eigenvectors.

Definition at line 84 of file dsymatrix-lapack.hpp.

References array, and n.

85 {CPPL_VERBOSE_REPORT;
86  w.resize(n);
87  char JOBZ, UPLO('l');
88  if(jobz==0){ JOBZ='n'; } else{ JOBZ='V'; }
89  CPPL_INT LDA(n), INFO(1), LWORK(-1);
90  double *WORK(new double[1]);
91  dsyev_(&JOBZ, &UPLO, &n, array, &LDA, &w[0], WORK, &LWORK, &INFO);
92 
93  INFO=1;
94  LWORK = CPPL_INT(WORK[0]);
95  delete [] WORK;
96  WORK = new double[LWORK];
97  dsyev_(&JOBZ, &UPLO, &n, array, &LDA, &w[0], WORK, &LWORK, &INFO);
98  delete [] WORK;
99 
100  if(INFO!=0){
101  WARNING_REPORT;
102  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
103  }
104  return INFO;
105 }
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT dsymatrix::dsyev ( std::vector< double > &  w,
std::vector< dcovector > &  v 
)
inline

calculate eigenvalues and eigenvectors.
All of the arguments need not to be initialized. w and v are overwitten and become eigenvalues and eigenvectors, respectively. This matrix is also overwritten.

Definition at line 114 of file dsymatrix-lapack.hpp.

References array, i, and n.

115 {CPPL_VERBOSE_REPORT;
116  w.resize(n);
117  v.resize(n);
118  for(CPPL_INT i=0; i<n; i++){
119  v[i].resize(n);
120  }
121 
122  char JOBZ('V'), UPLO('l');
123  CPPL_INT LDA(n), INFO(1), LWORK(-1);
124  double *WORK(new double[1]);
125  dsyev_(&JOBZ, &UPLO, &n, array, &LDA, &w[0], WORK, &LWORK, &INFO);
126 
127  INFO=1;
128  LWORK = CPPL_INT(WORK[0]);
129  delete [] WORK;
130  WORK = new double[LWORK];
131  dsyev_(&JOBZ, &UPLO, &n, array, &LDA, &w[0], WORK, &LWORK, &INFO);
132  delete [] WORK;
133 
134  //// forming ////
135  for(CPPL_INT j=0; j<n; j++){
136  for(CPPL_INT i=0; i<n; i++){
137  v[j](i) = array[i+n*j];
138  }
139  }
140 
141  if(INFO!=0){
142  WARNING_REPORT;
143  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
144  }
145  return INFO;
146 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT dsymatrix::dsyev ( std::vector< double > &  w,
std::vector< drovector > &  v 
)
inline

calculate eigenvalues and eigenvectors.
All of the arguments need not to be initialized. w and v are overwitten and become eigenvalues and eigenvectors, respectively. This matrix is also overwritten.

Definition at line 155 of file dsymatrix-lapack.hpp.

References array, i, and n.

156 {CPPL_VERBOSE_REPORT;
157  w.resize(n);
158  v.resize(n);
159  for(CPPL_INT i=0; i<n; i++){
160  v[i].resize(n);
161  }
162 
163  char JOBZ('V'), UPLO('l');
164  CPPL_INT LDA(n), INFO(1), LWORK(-1);
165  double *WORK(new double[1]);
166  dsyev_(&JOBZ, &UPLO, &n, array, &LDA, &w[0], WORK, &LWORK, &INFO);
167 
168  INFO=1;
169  LWORK = CPPL_INT(WORK[0]);
170  delete [] WORK;
171  WORK = new double[LWORK];
172  dsyev_(&JOBZ, &UPLO, &n, array, &LDA, &w[0], WORK, &LWORK, &INFO);
173  delete [] WORK;
174 
175  //// forming ////
176  for(CPPL_INT j=0; j<n; j++){
177  for(CPPL_INT i=0; i<n; i++){
178  v[j](i) = array[i+n*j];
179  }
180  }
181 
182  if(INFO!=0){
183  WARNING_REPORT;
184  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
185  }
186  return INFO;
187 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT dsymatrix::dsygv ( dsymatrix matB,
std::vector< double > &  w 
)
inline

calculate generalized eigenvalues
w is overwitten and become generalized eigenvalues. This matrix and matB are also overwritten.

Definition at line 198 of file dsymatrix-lapack.hpp.

References array, and n.

199 {CPPL_VERBOSE_REPORT;
200 #ifdef CPPL_DEBUG
201  if(matB.n!=n){
202  ERROR_REPORT;
203  std::cerr << "The matrix B is not a matrix having the same size as \"this\" matrix." << std::endl
204  << "The B matrix is (" << matB.n << "x" << matB.n << ")." << std::endl;
205  exit(1);
206  }
207 #endif//CPPL_DEBUG
208 
209  w.resize(n);
210  char JOBZ('n'), UPLO('l');
211  CPPL_INT ITYPE(1), LDA(n), LDB(n), LWORK(-1), INFO(1);
212  double *WORK(new double[1]);
213  dsygv_(&ITYPE, &JOBZ, &UPLO, &n, array, &LDA, matB.array, &LDB, &w[0], WORK, &LWORK, &INFO);
214 
215  INFO=1;
216  LWORK = CPPL_INT(WORK[0]);
217  delete [] WORK;
218  WORK = new double[LWORK];
219  dsygv_(&ITYPE, &JOBZ, &UPLO, &n, array, &LDA, matB.array, &LDB, &w[0], WORK, &LWORK, &INFO);
220  delete [] WORK;
221 
222  if(INFO!=0){
223  WARNING_REPORT;
224  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
225  }
226  return INFO;
227 }
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT dsymatrix::dsygv ( dsymatrix matB,
std::vector< double > &  w,
std::vector< dcovector > &  v 
)
inline

calculate generalized eigenvalues
w is overwitten and become generalized eigenvalues. This matrix and matB are also overwritten.

Definition at line 234 of file dsymatrix-lapack.hpp.

References array, darray, i, and n.

236 {CPPL_VERBOSE_REPORT;
237 #ifdef CPPL_DEBUG
238  if(matB.n!=n){
239  ERROR_REPORT;
240  std::cerr << "The matrix B is not a matrix having the same size as \"this\" matrix." << std::endl
241  << "The B matrix is (" << matB.n << "x" << matB.n << ")." << std::endl;
242  exit(1);
243  }
244 #endif//CPPL_DEBUG
245 
246  w.resize(n);
247  v.resize(n);
248  char JOBZ('V'), UPLO('l');
249  CPPL_INT ITYPE(1), LDA(n), LDB(n), LWORK(-1), INFO(1);
250  double *WORK(new double[1]);
251  dsygv_(&ITYPE, &JOBZ, &UPLO, &n, array, &LDA, matB.array, &LDB, &w[0], WORK, &LWORK, &INFO);
252 
253  INFO=1;
254  LWORK = CPPL_INT(WORK[0]);
255  delete [] WORK;
256  WORK = new double[LWORK];
257  dsygv_(&ITYPE, &JOBZ, &UPLO, &n, array, &LDA, matB.array, &LDB, &w[0], WORK, &LWORK, &INFO);
258  delete [] WORK;
259 
260  //// reforming ////
261  for(int i=0; i<n; i++){
262  v[i].resize(n);
263  for(int j=0; j<n; j++){
264  v[i](j) =darray[i][j];
265  }
266  }
267 
268  if(INFO!=0){
269  WARNING_REPORT;
270  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
271  }
272  return INFO;
273 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::operator= ( const dsymatrix mat)
inline

dsymatrix=dsymatrix operator

Definition at line 3 of file dsymatrix-dsymatrix.hpp.

References array, and copy().

4 {CPPL_VERBOSE_REPORT;
5  if(array!=mat.array){ // if it is NOT self substitution
6  copy(mat);
7  }
8  return *this;
9 }
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
void copy(const dsymatrix &)
dsymatrix & dsymatrix::operator= ( const _dsymatrix mat)
inline

dsymatrix=_dsymatrix operator

Definition at line 3 of file dsymatrix-_dsymatrix.hpp.

References shallow_copy().

4 {CPPL_VERBOSE_REPORT;
5  shallow_copy(mat);
6  return *this;
7 }
void shallow_copy(const _dsymatrix &)
dsymatrix & dsymatrix::operator+= ( const dsymatrix mat)
inline

dsymatrix+=dsymatrix operator

Definition at line 17 of file dsymatrix-dsymatrix.hpp.

References darray, i, and n.

18 {CPPL_VERBOSE_REPORT;
19 #ifdef CPPL_DEBUG
20  if(n!=mat.n){
21  ERROR_REPORT;
22  std::cerr << "These two matrises can not make a summation." << std::endl
23  << "Your input was (" << n << "x" << n << ") += (" << mat.n << "x" << mat.n << ")." << std::endl;
24  exit(1);
25  }
26 #endif//CPPL_DEBUG
27 
28  for(CPPL_INT j=0; j<n; j++){
29  for(CPPL_INT i=j; i<n; i++){
30  darray[j][i] +=mat.darray[j][i];
31  }
32  }
33 
34  return *this;
35 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::operator+= ( const _dsymatrix mat)
inline

dsymatrix+=_dsymatrix operator

Definition at line 15 of file dsymatrix-_dsymatrix.hpp.

References darray, _dsymatrix::darray, _dsymatrix::destroy(), i, n, and _dsymatrix::n.

16 {CPPL_VERBOSE_REPORT;
17 #ifdef CPPL_DEBUG
18  if(n!=mat.n){
19  ERROR_REPORT;
20  std::cerr << "These two matrises can not make a summation." << std::endl
21  << "Your input was (" << n << "x" << n << ") += (" << mat.n << "x" << mat.n << ")." << std::endl;
22  exit(1);
23  }
24 #endif//CPPL_DEBUG
25 
26  for(CPPL_INT j=0; j<n; j++){
27  for(CPPL_INT i=j; i<n; i++){
28  darray[j][i] +=mat.darray[j][i];
29  }
30  }
31 
32  mat.destroy();
33  return *this;
34 }
void destroy() const
friend _dsymatrix i(const dsymatrix &)
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::operator-= ( const dsymatrix mat)
inline

dsymatrix operator-=

Definition at line 39 of file dsymatrix-dsymatrix.hpp.

References darray, i, and n.

40 {CPPL_VERBOSE_REPORT;
41 #ifdef CPPL_DEBUG
42  if(n!=mat.n){
43  ERROR_REPORT;
44  std::cerr << "These two matrises can not make a sutraction." << std::endl
45  << "Your input was (" << n << "x" << n << ") -= (" << mat.n << "x" << mat.n << ")." << std::endl;
46  exit(1);
47  }
48 #endif//CPPL_DEBUG
49 
50  for(CPPL_INT j=0; j<n; j++){
51  for(CPPL_INT i=j; i<n; i++){
52  darray[j][i] -=mat.darray[j][i];
53  }
54  }
55 
56  return *this;
57 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::operator-= ( const _dsymatrix mat)
inline

dsymatrix-=_dsymatrix operator

Definition at line 38 of file dsymatrix-_dsymatrix.hpp.

References darray, _dsymatrix::darray, _dsymatrix::destroy(), i, n, and _dsymatrix::n.

39 {CPPL_VERBOSE_REPORT;
40 #ifdef CPPL_DEBUG
41  if(n!=mat.n){
42  ERROR_REPORT;
43  std::cerr << "These two matrises can not make a sutraction." << std::endl
44  << "Your input was (" << n << "x" << n << ") -= (" << mat.n << "x" << mat.n << ")." << std::endl;
45  exit(1);
46  }
47 #endif//CPPL_DEBUG
48 
49  for(CPPL_INT j=0; j<n; j++){
50  for(CPPL_INT i=j; i<n; i++){
51  darray[j][i] -=mat.darray[j][i];
52  }
53  }
54 
55  mat.destroy();
56  return *this;
57 }
void destroy() const
friend _dsymatrix i(const dsymatrix &)
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix& dsymatrix::operator*= ( const dsymatrix )
inline
dsymatrix& dsymatrix::operator*= ( const _dsymatrix )
inline
dsymatrix & dsymatrix::operator*= ( const double &  d)
inline

dsymatrix*=double operator

Definition at line 3 of file dsymatrix-double.hpp.

References darray, i, and n.

4 {CPPL_VERBOSE_REPORT;
5  for(CPPL_INT j=0; j<n; j++){
6  for(CPPL_INT i=j; i<n; i++){
7  darray[j][i] *=d;
8  }
9  }
10 
11  return *this;
12 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
dsymatrix & dsymatrix::operator/= ( const double &  d)
inline

dsymatrix/=double operator

Definition at line 16 of file dsymatrix-double.hpp.

References darray, i, and n.

17 {CPPL_VERBOSE_REPORT;
18  for(CPPL_INT j=0; j<n; j++){
19  for(CPPL_INT i=j; i<n; i++){
20  darray[j][i] /=d;
21  }
22  }
23 
24  return *this;
25 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const dsymatrix mat 
)
friend

Definition at line 77 of file dsymatrix-io.hpp.

78 {CPPL_VERBOSE_REPORT;
79  for(CPPL_INT i=0; i<mat.n; i++){
80  for(CPPL_INT j=0; j<=i; j++){
81  s << " " << mat(i,j) << " ";
82  }
83  for(CPPL_INT j=i+1; j<mat.n; j++){
84  s << "{" << mat(i,j) << "}";
85  }
86  s << std::endl;
87  }
88  return s;
89 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
void swap ( dsymatrix A,
dsymatrix B 
)
friend

swap two matrices

Definition at line 168 of file dsymatrix-misc.hpp.

169 {CPPL_VERBOSE_REPORT;
170  CPPL_INT A_n =A.n;
171  double* A_array =A.array;
172  double** A_darray =A.darray;
173  A.n=B.n; A.array=B.array; A.darray=B.darray;
174  B.n=A_n; B.array=A_array; B.darray=A_darray;
175 }
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dsymatrix _ ( dsymatrix mat)
friend

convert user object to smart-temporary object

Definition at line 179 of file dsymatrix-misc.hpp.

Referenced by col(), row(), to_dgematrix(), to_dssmatrix(), and to_zhematrix().

180 {CPPL_VERBOSE_REPORT;
181  _dsymatrix newmat;
182 
183  //////// shallow copy ////////
184  newmat.n =mat.n;
185  newmat.array =mat.array;
186  newmat.darray =mat.darray;
187 
188  //////// nullify ////////
189  mat.n =0;
190  mat.array =NULL;
191  mat.darray =NULL;
192 
193  return newmat;
194 }
double * array
1D array to store matrix data
Definition: _dsymatrix.hpp:12
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
(DO NOT USE) Smart-temporary Real Double-precision Symmetric Matrix Class
Definition: _dsymatrix.hpp:3
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dsymatrix t ( const dsymatrix mat)
friend

return transposed dgematrix

Definition at line 3 of file dsymatrix-calc.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  WARNING_REPORT;
7  std::cerr << "This function call has no effect since the matrix is symmetric." << std::endl;
8 #endif//CPPL_DEBUG
9 
10  dsymatrix newmat(mat);
11  return _(newmat);
12 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
_dsymatrix i ( const dsymatrix mat)
friend

return its inverse matrix

Definition at line 16 of file dsymatrix-calc.hpp.

Referenced by chsign(), col(), complete(), copy(), dsyev(), dsygv(), dsymatrix(), identity(), operator()(), operator*=(), operator+=(), operator-=(), operator/=(), read(), resize(), set(), to_dgematrix(), to_dssmatrix(), to_zhematrix(), write(), and zero().

17 {CPPL_VERBOSE_REPORT;
18  dsymatrix mat_cp =mat;
19  dsymatrix mat_inv(mat.n);
20  mat_inv.identity();
21  mat_inv.complete();
22 
23  char UPLO('l');
24  CPPL_INT NRHS(mat.n), LDA(mat.n), *IPIV(new CPPL_INT[mat.n]), LDB(mat.n), LWORK(-1), INFO(1);
25  double *WORK( new double[1] );
26  dsysv_(&UPLO, &mat.n, &NRHS, mat_cp.array, &LDA, IPIV, mat_inv.array, &LDB, WORK, &LWORK, &INFO);
27 
28  LWORK = CPPL_INT(WORK[0]);
29  delete [] WORK;
30  WORK = new double[LWORK];
31  dsysv_(&UPLO, &mat.n, &NRHS, mat_cp.array, &LDA, IPIV, mat_inv.array, &LDB, WORK, &LWORK, &INFO);
32 
33  delete [] WORK;
34  delete [] IPIV;
35  if(INFO!=0){
36  WARNING_REPORT;
37  std::cerr << "Serious trouble happend. INFO = " << INFO << "." << std::endl;
38  }
39 
40  return _(mat_inv);
41 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
void idamax ( CPPL_INT &  i,
CPPL_INT &  j,
const dsymatrix mat 
)
friend

search the index of element having the largest absolute value in 0-based numbering system

Definition at line 49 of file dsymatrix-calc.hpp.

50 {CPPL_VERBOSE_REPORT;
51  i=j=0;
52  double val =0.;
53 
54  for(CPPL_INT J=0; J<mat.n; J++){
55  for(CPPL_INT I=J; I<mat.n; I++){
56  if(val<fabs(mat.darray[J][I]) ){
57  val =fabs(mat.darray[J][I]);
58  i=I;
59  j=J;
60  }
61  }
62  }
63 }
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
double damax ( const dsymatrix mat)
friend

return its largest absolute value

Definition at line 67 of file dsymatrix-calc.hpp.

68 {CPPL_VERBOSE_REPORT;
69  CPPL_INT i,j;
70  idamax(i, j, mat);
71  return mat(i,j);
72 }
friend void idamax(CPPL_INT &, CPPL_INT &, const dsymatrix &)
friend _dsymatrix i(const dsymatrix &)
const dsymatrix& operator+ ( const dsymatrix mat)
friend

+dsymatrix operator

Definition at line 3 of file dsymatrix-unary.hpp.

4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
_dsymatrix operator- ( const dsymatrix mat)
friend

-dsymatrix operator

Definition at line 10 of file dsymatrix-unary.hpp.

11 {CPPL_VERBOSE_REPORT;
12  dsymatrix newmat(mat.n);
13 
14  const CPPL_INT size =newmat.n*newmat.n;
15  for(CPPL_INT i=0; i<size; i++){
16  newmat.array[i] =-mat.array[i];
17  }
18 
19  return _(newmat);
20 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
_dgematrix operator+ ( const dsymatrix matA,
const dgematrix matB 
)
friend

dsymatrix+dgematrix operator

Definition at line 3 of file dsymatrix-dgematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dgematrix newmat =matB;
15 
16  for(CPPL_INT i=0; i<matA.n; i++) {
17  for(CPPL_INT j=0; j<matA.n; j++) {
18  newmat(i,j) += matA(i,j);
19  }
20  }
21 
22  return _(newmat);
23 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT m
matrix row size
Definition: dgematrix.hpp:9
CPPL_INT n
matrix column size
Definition: dgematrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
_dgematrix operator+ ( const dsymatrix matA,
const _dgematrix matB 
)
friend

_dgematrix+dsymatrix operator

Definition at line 3 of file dsymatrix-_dgematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  for(CPPL_INT i=0; i<matA.n; i++) {
15  for(CPPL_INT j=0; j<matA.n; j++) {
16  matB(i,j) += matA(i,j);
17  }
18  }
19 
20  return matB;
21 }
CPPL_INT m
matrix row size
Definition: _dgematrix.hpp:9
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dgematrix.hpp:10
_dsymatrix operator+ ( const dsymatrix matA,
const dsymatrix matB 
)
friend

dsymatrix+dsymatrix operator

Definition at line 61 of file dsymatrix-dsymatrix.hpp.

62 {CPPL_VERBOSE_REPORT;
63 #ifdef CPPL_DEBUG
64  if(matA.n!=matB.n){
65  ERROR_REPORT;
66  std::cerr << "These two matrises can not make a summation." << std::endl
67  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl;
68  exit(1);
69  }
70 #endif//CPPL_DEBUG
71 
72  dsymatrix newmat(matA.n);
73 
74  for(CPPL_INT j=0; j<matA.n; j++){
75  for(CPPL_INT i=j; i<matA.n; i++){
76  newmat.darray[j][i] =matA.darray[j][i] +matB.darray[j][i];
77  }
78  }
79 
80  return _(newmat);
81 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dsymatrix operator+ ( const dsymatrix matA,
const _dsymatrix matB 
)
friend

dsymatrix+_dsymatrix operator

Definition at line 65 of file dsymatrix-_dsymatrix.hpp.

66 {CPPL_VERBOSE_REPORT;
67 #ifdef CPPL_DEBUG
68  if(matA.n!=matB.n){
69  ERROR_REPORT;
70  std::cerr << "These two matrises can not make a summation." << std::endl
71  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl;
72  exit(1);
73  }
74 #endif//CPPL_DEBUG
75 
76  for(CPPL_INT j=0; j<matA.n; j++){
77  for(CPPL_INT i=j; i<matA.n; i++){
78  matB.darray[j][i] +=matA.darray[j][i];
79  }
80  }
81 
82  return matB;
83 }
friend _dsymatrix i(const dsymatrix &)
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dgematrix operator+ ( const dsymatrix matA,
const dgbmatrix matB 
)
friend

dsymatrix+dgbmatrix operator

Definition at line 3 of file dsymatrix-dgbmatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dgematrix newmat(matA.n, matA.n);
15 
16  for(CPPL_INT i=0; i<matB.m; i++){
17  for(CPPL_INT j=i; j<matA.n; j++){
18  newmat(i,j) = newmat(j,i) = matA(i,j);
19  }
20  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
21  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
22  newmat(i,j) += matB(i,j);
23  }
24  }
25 
26  return _(newmat);
27 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT m
matrix row size
Definition: dgbmatrix.hpp:9
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: dgbmatrix.hpp:11
CPPL_INT ku
upper band width
Definition: dgbmatrix.hpp:12
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
_dgematrix operator+ ( const dsymatrix matA,
const _dgbmatrix matB 
)
friend

dsymatrix+_dgbmatrix operator

Definition at line 3 of file dsymatrix-_dgbmatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dgematrix newmat(matA.n, matA.n);
15 
16  for(CPPL_INT i=0; i<matB.m; i++){
17  for(CPPL_INT j=i; j<matA.n; j++){
18  newmat(i,j) = newmat(j,i) = matA(i,j);
19  }
20  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
21  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
22  newmat(i,j) += matB(i,j);
23  }
24  }
25 
26  matB.destroy();
27  return _(newmat);
28 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT ku
upper band width
Definition: _dgbmatrix.hpp:12
void destroy() const
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: _dgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dgbmatrix.hpp:10
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT m
matrix row size
Definition: _dgbmatrix.hpp:9
_dgematrix operator+ ( const dsymatrix matA,
const dgsmatrix matB 
)
friend

dsymatrix+dgsmatrix operator

Definition at line 3 of file dsymatrix-dgsmatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.m || matA.n!=matB.n){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dgematrix newmat( matA.to_dgematrix() );
15 
16  const std::vector<dcomponent>::const_iterator matB_data_end =matB.data.end();
17  for(std::vector<dcomponent>::const_iterator it=matB.data.begin(); it!=matB_data_end; it++){
18  newmat(it->i,it->j) += it->v;
19  }
20 
21  return _(newmat);
22 }
friend _dsymatrix _(dsymatrix &)
std::vector< dcomponent > data
matrix data
Definition: dgsmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: dgsmatrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
_dgematrix to_dgematrix() const
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT m
matrix row size
Definition: dgsmatrix.hpp:9
_dgematrix operator+ ( const dsymatrix matA,
const _dgsmatrix matB 
)
friend

dsymatrix+_dgsmatrix operator

Definition at line 3 of file dsymatrix-_dgsmatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.m || matA.n!=matB.n){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dgematrix newmat( matA.to_dgematrix() );
15 
16  const std::vector<dcomponent>::const_iterator matB_data_end =matB.data.end();
17  for(std::vector<dcomponent>::const_iterator it=matB.data.begin(); it!=matB_data_end; it++){
18  newmat(it->i,it->j) += it->v;
19  }
20 
21  matB.destroy();
22  return _(newmat);
23 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT n
matrix column size
Definition: _dgsmatrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: _dgsmatrix.hpp:9
void destroy() const
_dgematrix to_dgematrix() const
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
std::vector< dcomponent > data
matrix data
Definition: _dgsmatrix.hpp:11
_dsymatrix operator+ ( const dsymatrix ,
const dssmatrix  
)
friend
_dsymatrix operator+ ( const dsymatrix ,
const _dssmatrix  
)
friend
_dgematrix operator- ( const dsymatrix matA,
const dgematrix matB 
)
friend

dsymatrix-dgematrix operator

Definition at line 27 of file dsymatrix-dgematrix.hpp.

28 {CPPL_VERBOSE_REPORT;
29 #ifdef CPPL_DEBUG
30  if(matA.n!=matB.n || matA.n!=matB.m){
31  ERROR_REPORT;
32  std::cerr << "These two matrises can not make a summation." << std::endl
33  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
34  exit(1);
35  }
36 #endif//CPPL_DEBUG
37 
38  dgematrix newmat =-matB;
39 
40  for(CPPL_INT i=0; i<matA.n; i++){
41  for(CPPL_INT j=0; j<matA.n; j++){
42  newmat(i,j) += matA(i,j);
43  }
44  }
45 
46  return _(newmat);
47 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT m
matrix row size
Definition: dgematrix.hpp:9
CPPL_INT n
matrix column size
Definition: dgematrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
_dgematrix operator- ( const dsymatrix matA,
const _dgematrix matB 
)
friend

_dgematrix-dgematrix operator

Definition at line 25 of file dsymatrix-_dgematrix.hpp.

26 {CPPL_VERBOSE_REPORT;
27 #ifdef CPPL_DEBUG
28  if(matA.n!=matB.n || matA.n!=matB.m){
29  ERROR_REPORT;
30  std::cerr << "These two matrises can not make a subtraction." << std::endl
31  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl;
32  exit(1);
33  }
34 #endif//CPPL_DEBUG
35 
36  for(CPPL_INT i=0; i<matA.n; i++){
37  for(CPPL_INT j=0; j<matA.n; j++){
38  matB(i,j) =matA(i,j)-matB(i,j);
39  }
40  }
41 
42  return matB;
43 }
CPPL_INT m
matrix row size
Definition: _dgematrix.hpp:9
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dgematrix.hpp:10
_dsymatrix operator- ( const dsymatrix matA,
const dsymatrix matB 
)
friend

dsymatrix-dsymatrix operator

Definition at line 85 of file dsymatrix-dsymatrix.hpp.

86 {CPPL_VERBOSE_REPORT;
87 #ifdef CPPL_DEBUG
88  if(matA.n!=matB.n){
89  ERROR_REPORT;
90  std::cerr << "These two matrises can not make a subtraction." << std::endl
91  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl;
92  exit(1);
93  }
94 #endif//CPPL_DEBUG
95 
96  dsymatrix newmat(matA.n);
97 
98  for(CPPL_INT j=0; j<matA.n; j++){
99  for(CPPL_INT i=j; i<matA.n; i++){
100  newmat.darray[j][i] =matA.darray[j][i] -matB.darray[j][i];
101  }
102  }
103 
104  return _(newmat);
105 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dsymatrix operator- ( const dsymatrix matA,
const _dsymatrix matB 
)
friend

dsymatrix-_dsymatrix operator

Definition at line 87 of file dsymatrix-_dsymatrix.hpp.

88 {CPPL_VERBOSE_REPORT;
89 #ifdef CPPL_DEBUG
90  if(matA.n!=matB.n){
91  ERROR_REPORT;
92  std::cerr << "These two matrises can not make a subtraction." << std::endl
93  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl;
94  exit(1);
95  }
96 #endif//CPPL_DEBUG
97 
98  for(CPPL_INT j=0; j<matA.n; j++){
99  for(CPPL_INT i=j; i<matA.n; i++){
100  matB.darray[j][i] =matA.darray[j][i] -matB.darray[j][i];
101  }
102  }
103 
104  return matB;
105 }
friend _dsymatrix i(const dsymatrix &)
double ** darray
array of pointers of column head addresses
Definition: _dsymatrix.hpp:13
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dgematrix operator- ( const dsymatrix matA,
const dgbmatrix matB 
)
friend

dsymatrix-dgbmatrix operator

Definition at line 31 of file dsymatrix-dgbmatrix.hpp.

32 {CPPL_VERBOSE_REPORT;
33 #ifdef CPPL_DEBUG
34  if(matA.n!=matB.n || matA.n!=matB.m){
35  ERROR_REPORT;
36  std::cerr << "These two matrises can not make a summation." << std::endl
37  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
38  exit(1);
39  }
40 #endif//CPPL_DEBUG
41 
42  dgematrix newmat(matA.n, matA.n);
43 
44  for(CPPL_INT i=0; i<matB.m; i++){
45  for(CPPL_INT j=i; j<matA.n; j++){
46  newmat(i,j) = newmat(j,i) = matA(i,j);
47  }
48  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
49  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
50  newmat(i,j) -= matB(i,j);
51  }
52  }
53 
54  return _(newmat);
55 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT m
matrix row size
Definition: dgbmatrix.hpp:9
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: dgbmatrix.hpp:11
CPPL_INT ku
upper band width
Definition: dgbmatrix.hpp:12
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
_dgematrix operator- ( const dsymatrix matA,
const _dgbmatrix matB 
)
friend

dsymatrix-_dgbmatrix operator

Definition at line 32 of file dsymatrix-_dgbmatrix.hpp.

33 {CPPL_VERBOSE_REPORT;
34 #ifdef CPPL_DEBUG
35  if(matA.n!=matB.n || matA.n!=matB.m){
36  ERROR_REPORT;
37  std::cerr << "These two matrises can not make a summation." << std::endl
38  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
39  exit(1);
40  }
41 #endif//CPPL_DEBUG
42 
43  dgematrix newmat(matA.n, matA.n);
44 
45  for(CPPL_INT i=0; i<matB.m; i++){
46  for(CPPL_INT j=i; j<matA.n; j++){
47  newmat(i,j) = newmat(j,i) = matA(i,j);
48  }
49  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
50  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
51  newmat(i,j) -= matB(i,j);
52  }
53  }
54 
55  matB.destroy();
56  return _(newmat);
57 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT ku
upper band width
Definition: _dgbmatrix.hpp:12
void destroy() const
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: _dgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dgbmatrix.hpp:10
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT m
matrix row size
Definition: _dgbmatrix.hpp:9
_dgematrix operator- ( const dsymatrix matA,
const dgsmatrix matB 
)
friend

dsymatrix-dgsmatrix operator

Definition at line 26 of file dsymatrix-dgsmatrix.hpp.

27 {CPPL_VERBOSE_REPORT;
28 #ifdef CPPL_DEBUG
29  if(matA.n!=matB.m || matA.n!=matB.n){
30  ERROR_REPORT;
31  std::cerr << "These two matrises can not make a subtraction." << std::endl
32  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl;
33  exit(1);
34  }
35 #endif//CPPL_DEBUG
36 
37  dgematrix newmat( matA.to_dgematrix() );
38 
39  const std::vector<dcomponent>::const_iterator matB_data_end =matB.data.end();
40  for(std::vector<dcomponent>::const_iterator it=matB.data.begin(); it!=matB_data_end; it++){
41  newmat(it->i,it->j) -= it->v;
42  }
43 
44  return _(newmat);
45 }
friend _dsymatrix _(dsymatrix &)
std::vector< dcomponent > data
matrix data
Definition: dgsmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: dgsmatrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
_dgematrix to_dgematrix() const
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT m
matrix row size
Definition: dgsmatrix.hpp:9
_dgematrix operator- ( const dsymatrix matA,
const _dgsmatrix matB 
)
friend

dsymatrix-_dgsmatrix operator

Definition at line 27 of file dsymatrix-_dgsmatrix.hpp.

28 {CPPL_VERBOSE_REPORT;
29 #ifdef CPPL_DEBUG
30  if(matA.n!=matB.m || matA.n!=matB.n){
31  ERROR_REPORT;
32  std::cerr << "These two matrises can not make a subtraction." << std::endl
33  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl;
34  exit(1);
35  }
36 #endif//CPPL_DEBUG
37 
38  dgematrix newmat( matA.to_dgematrix() );
39 
40  const std::vector<dcomponent>::const_iterator matB_data_end =matB.data.end();
41  for(std::vector<dcomponent>::const_iterator it=matB.data.begin(); it!=matB_data_end; it++){
42  newmat(it->i,it->j) -= it->v;
43  }
44 
45  matB.destroy();
46  return _(newmat);
47 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT n
matrix column size
Definition: _dgsmatrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: _dgsmatrix.hpp:9
void destroy() const
_dgematrix to_dgematrix() const
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
std::vector< dcomponent > data
matrix data
Definition: _dgsmatrix.hpp:11
_dsymatrix operator- ( const dsymatrix ,
const dssmatrix  
)
friend
_dsymatrix operator- ( const dsymatrix ,
const _dssmatrix  
)
friend
_dcovector operator* ( const dsymatrix mat,
const dcovector vec 
)
friend

dsymatrix*dcovector operator

Definition at line 3 of file dsymatrix-dcovector.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(mat.n!=vec.l){
7  ERROR_REPORT;
8  std::cerr << "These matrix and vector can not make a product." << std::endl
9  << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dcovector newvec(mat.n);
15  char uplo ='l';
16  double alpha =1.;
17  CPPL_INT inc =1;
18  double beta =0.;
19 
20  dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc );
21 
22  return _(newvec);
23 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
_dcovector operator* ( const dsymatrix mat,
const _dcovector vec 
)
friend

dsymatrix*_dcovector operator

Definition at line 3 of file dsymatrix-_dcovector.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(mat.n!=vec.l){
7  ERROR_REPORT;
8  std::cerr << "These matrix and vector can not make a product." << std::endl
9  << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dcovector newvec(mat.n);
15  char uplo ='l';
16  double alpha =1.;
17  CPPL_INT inc =1;
18  double beta =0.;
19 
20  dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc );
21 
22  vec.destroy();
23  return _(newvec);
24 }
CPPL_INT l
vector size
Definition: _dcovector.hpp:9
friend _dsymatrix _(dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
void destroy() const
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
double * array
1D array to store vector data
Definition: _dcovector.hpp:11
_dgematrix operator* ( const dsymatrix matA,
const dgematrix matB 
)
friend

dsymatrix*dgematrix operator

Definition at line 52 of file dsymatrix-dgematrix.hpp.

53 {CPPL_VERBOSE_REPORT;
54 #ifdef CPPL_DEBUG
55  if(matA.n!=matB.m){
56  ERROR_REPORT;
57  std::cerr << "These two matrises can not make a product." << std::endl
58  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
59  exit(1);
60  }
61 #endif//CPPL_DEBUG
62 
63  dgematrix newmat( matA.n, matB.n );
64  char side ='l';
65  char uplo ='l';
66  double alpha =1.;
67  double beta =0.;
68 
69  dsymm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.m, &beta, newmat.array, &newmat.m );
70 
71  return _(newmat);
72 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT m
matrix row size
Definition: dgematrix.hpp:9
double * array
1D array to store matrix data
Definition: dgematrix.hpp:11
CPPL_INT n
matrix column size
Definition: dgematrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
_dgematrix operator* ( const dsymatrix matA,
const _dgematrix matB 
)
friend

_dgematrix*dgematrix operator

Definition at line 47 of file dsymatrix-_dgematrix.hpp.

48 {CPPL_VERBOSE_REPORT;
49 #ifdef CPPL_DEBUG
50  if(matA.n!=matB.m){
51  ERROR_REPORT;
52  std::cerr << "These two matrises can not make a product." << std::endl
53  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
54  exit(1);
55  }
56 #endif//CPPL_DEBUG
57 
58  dgematrix newmat( matA.n, matB.n );
59  char side ='l';
60  char uplo ='l';
61  double alpha =1.;
62  double beta =0.;
63 
64  dsymm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.m, &beta, newmat.array, &newmat.m );
65 
66  matB.destroy();
67  return _(newmat);
68 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: _dgematrix.hpp:9
double * array
1D array to store matrix data
Definition: _dgematrix.hpp:11
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: _dgematrix.hpp:10
void destroy() const
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
_dgematrix operator* ( const dsymatrix matA,
const dsymatrix matB 
)
friend

dsymatrix*dsymatrix operator

Definition at line 109 of file dsymatrix-dsymatrix.hpp.

110 {CPPL_VERBOSE_REPORT;
111 #ifdef CPPL_DEBUG
112  if(matA.n!=matB.n){
113  ERROR_REPORT;
114  std::cerr << "These two matrises can not make a product." << std::endl
115  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl;
116  exit(1);
117  }
118 #endif//CPPL_DEBUG
119 
120  matB.complete();
121 
122  dgematrix newmat(matA.n, matA.n);
123  char side ='l';
124  char uplo ='l';
125  double alpha =1.;
126  double beta =0.;
127 
128  dsymm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.m, &beta, newmat.array, &newmat.m );
129 
130  return _(newmat);
131 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT const & m
matrix row size
Definition: dsymatrix.hpp:9
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
void complete() const
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
_dgematrix operator* ( const dsymatrix matA,
const _dsymatrix matB 
)
friend

dsymatrix*_dsymatrix operator

Definition at line 109 of file dsymatrix-_dsymatrix.hpp.

110 {CPPL_VERBOSE_REPORT;
111 #ifdef CPPL_DEBUG
112  if(matA.n!=matB.n){
113  ERROR_REPORT;
114  std::cerr << "These two matrises can not make a product." << std::endl
115  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl;
116  exit(1);
117  }
118 #endif//CPPL_DEBUG
119 
120  matB.complete();
121 
122  dgematrix newmat( matA.n, matA.n );
123  char side ='l';
124  char uplo ='l';
125  double alpha =1.;
126  double beta =0.;
127 
128  dsymm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.m, &beta, newmat.array, &newmat.m );
129 
130  matB.destroy();
131  return _(newmat);
132 }
friend _dsymatrix _(dsymatrix &)
void destroy() const
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
double * array
1D array to store matrix data
Definition: _dsymatrix.hpp:12
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
void complete() const
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
CPPL_INT const & m
matrix row size
Definition: _dsymatrix.hpp:10
_dgematrix operator* ( const dsymatrix matA,
const dgbmatrix matB 
)
friend

dsymatrix*dgbmatrix operator

Definition at line 59 of file dsymatrix-dgbmatrix.hpp.

60 {CPPL_VERBOSE_REPORT;
61 #ifdef CPPL_DEBUG
62  if(matA.n!=matB.m){
63  ERROR_REPORT;
64  std::cerr << "These two matrises can not make a product." << std::endl
65  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
66  exit(1);
67  }
68 #endif//CPPL_DEBUG
69 
70  dgematrix newmat( matA.n, matB.n );
71  newmat.zero();
72 
73  for(CPPL_INT i=0; i<newmat.m; i++){
74  for(CPPL_INT j=0; j<newmat.n; j++){
75  const CPPL_INT kmax =std::min(matB.m,j+matB.kl+1);
76  for(CPPL_INT k=std::max(CPPL_INT(0),j-matB.ku); k<kmax; k++){
77  newmat(i,j) += matA(i,k)*matB(k,j);
78  }
79  }
80  }
81 
82  return _(newmat);
83 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT m
matrix row size
Definition: dgbmatrix.hpp:9
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: dgbmatrix.hpp:11
CPPL_INT ku
upper band width
Definition: dgbmatrix.hpp:12
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
CPPL_INT const & m
matrix row size
Definition: _dsymatrix.hpp:10
_dgematrix operator* ( const dsymatrix matA,
const _dgbmatrix matB 
)
friend

dsymatrix*_dgbmatrix operator

Definition at line 61 of file dsymatrix-_dgbmatrix.hpp.

62 {CPPL_VERBOSE_REPORT;
63 #ifdef CPPL_DEBUG
64  if(matA.n!=matB.m){
65  ERROR_REPORT;
66  std::cerr << "These two matrises can not make a product." << std::endl
67  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
68  exit(1);
69  }
70 #endif//CPPL_DEBUG
71 
72  dgematrix newmat( matA.n, matB.n );
73  newmat.zero();
74 
75  for(CPPL_INT i=0; i<newmat.m; i++){
76  for(CPPL_INT j=0; j<newmat.n; j++){
77  const CPPL_INT kmax =std::min(matB.m,j+matB.kl+1);
78  for(CPPL_INT k=std::max(CPPL_INT(0),j-matB.ku); k<kmax; k++){
79  newmat(i,j) += matA(i,k)*matB(k,j);
80  }
81  }
82  }
83 
84  matB.destroy();
85  return _(newmat);
86 }
friend _dsymatrix _(dsymatrix &)
CPPL_INT ku
upper band width
Definition: _dgbmatrix.hpp:12
void destroy() const
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: _dgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dgbmatrix.hpp:10
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT const & m
matrix row size
Definition: _dsymatrix.hpp:10
CPPL_INT m
matrix row size
Definition: _dgbmatrix.hpp:9
_dgematrix operator* ( const dsymatrix matA,
const dgsmatrix matB 
)
friend

dsymatrix*dgsmatrix operator

Definition at line 49 of file dsymatrix-dgsmatrix.hpp.

50 {CPPL_VERBOSE_REPORT;
51 #ifdef CPPL_DEBUG
52  if(matA.n!=matB.m){
53  ERROR_REPORT;
54  std::cerr << "These two matrises can not make a product." << std::endl
55  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
56  exit(1);
57  }
58 #endif//CPPL_DEBUG
59 
60  dgematrix newmat(matA.n, matB.n);
61  newmat.zero();
62 
63  const std::vector<dcomponent>::const_iterator matB_data_end =matB.data.end();
64  for(std::vector<dcomponent>::const_iterator it=matB.data.begin(); it!=matB_data_end; it++){
65  for(CPPL_INT i=0; i<matA.n; i++){
66  newmat(i,it->j) += matB(i,it->i)*it->v;
67  }
68  }
69 
70  return _(newmat);
71 }
friend _dsymatrix i(const _dsymatrix &)
friend _dsymatrix _(dsymatrix &)
std::vector< dcomponent > data
matrix data
Definition: dgsmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: dgsmatrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
CPPL_INT m
matrix row size
Definition: dgsmatrix.hpp:9
_dgematrix operator* ( const dsymatrix matA,
const _dgsmatrix matB 
)
friend

dsymatrix*_dgsmatrix operator

Definition at line 51 of file dsymatrix-_dgsmatrix.hpp.

52 {CPPL_VERBOSE_REPORT;
53 #ifdef CPPL_DEBUG
54  if(matA.n!=matB.m){
55  ERROR_REPORT;
56  std::cerr << "These two matrises can not make a product." << std::endl
57  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
58  exit(1);
59  }
60 #endif//CPPL_DEBUG
61 
62  dgematrix newmat(matA.n, matB.n);
63  newmat.zero();
64 
65  const std::vector<dcomponent>::const_iterator matB_data_end =matB.data.end();
66  for(std::vector<dcomponent>::const_iterator it=matB.data.begin(); it!=matB_data_end; it++){
67  for(CPPL_INT i=0; i<matA.n; i++){
68  newmat(i,it->j) += matB(i,it->i)*it->v;
69  }
70  }
71 
72  matB.destroy();
73  return _(newmat);
74 }
friend _dsymatrix i(const _dsymatrix &)
friend _dsymatrix _(dsymatrix &)
CPPL_INT n
matrix column size
Definition: _dgsmatrix.hpp:10
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: _dgsmatrix.hpp:9
void destroy() const
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
std::vector< dcomponent > data
matrix data
Definition: _dgsmatrix.hpp:11
_dsymatrix operator* ( const dsymatrix ,
const dssmatrix  
)
friend
_dsymatrix operator* ( const dsymatrix ,
const _dssmatrix  
)
friend
_dsymatrix operator* ( const dsymatrix mat,
const double &  d 
)
friend

dsymatrix*double operator

Definition at line 33 of file dsymatrix-double.hpp.

34 {CPPL_VERBOSE_REPORT;
35  dsymatrix newmat(mat.n);
36 
37  for(CPPL_INT j=0; j<mat.n; j++){
38  for(CPPL_INT i=j; i<mat.n; i++){
39  newmat.darray[j][i] =mat.darray[j][i]*d;
40  }
41  }
42 
43  return _(newmat);
44 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dsymatrix operator/ ( const dsymatrix mat,
const double &  d 
)
friend

dsymatrix/double operator

Definition at line 48 of file dsymatrix-double.hpp.

49 {CPPL_VERBOSE_REPORT;
50  dsymatrix newmat(mat.n);
51 
52  for(CPPL_INT j=0; j<mat.n; j++){
53  for(CPPL_INT i=j; i<mat.n; i++){
54  newmat.darray[j][i] =mat.darray[j][i]/d;
55  }
56  }
57 
58  return _(newmat);
59 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12
_dsymatrix operator* ( const double &  d,
const dsymatrix mat 
)
friend

double*dsymatrix operator

Definition at line 3 of file double-dsymatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5  dsymatrix newmat(mat.n);
6 
7  for(CPPL_INT j=0; j<mat.n; j++){
8  for(CPPL_INT i=j; i<mat.n; i++){
9  newmat.darray[j][i] =d*mat.darray[j][i];
10  }
11  }
12 
13  return _(newmat);
14 }
friend _dsymatrix _(dsymatrix &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
double ** darray
array of pointers of column head addresses
Definition: dsymatrix.hpp:12

Member Data Documentation

CPPL_INT const& dsymatrix::m

matrix row size

Definition at line 9 of file dsymatrix.hpp.

Referenced by col(), dsymatrix_small< n >::dsymatrix_small(), operator*(), and row().

CPPL_INT dsymatrix::n
double* dsymatrix::array
double** dsymatrix::darray

The documentation for this class was generated from the following files: