28 #ifndef _math_scmat_repl_h
29 #define _math_scmat_repl_h
31 #include <util/group/message.h>
33 #include <math/scmat/block.h>
34 #include <math/scmat/matrix.h>
35 #include <math/scmat/abstract.h>
63 double *data,
int ndata);
74 void init_blocklist();
82 void assign_p(
const double*);
97 void vprint(
const char* title=0,
101 double *get_data() {
return vector; }
119 size_t compute_offset(
int,
int)
const;
120 void init_blocklist();
122 void before_elemop();
132 void set_element(
int,
int,
double);
133 void accumulate_element(
int,
int,
double);
140 void assign_column(
SCVector *v,
int i);
142 void accumulate_column(
SCVector *v,
int i);
143 void assign_p(
const double*);
144 void assign_pp(
const double**);
145 void convert_p(
double*)
const;
146 void convert_pp(
double**)
const;
169 void vprint(
const char* title=0,
173 double *get_data() {
return matrix; }
174 double **get_rows() {
return rows; }
193 size_t compute_offset(
int,
int)
const;
194 void init_blocklist();
196 void before_elemop();
205 void assign_p(
const double*);
206 void assign_pp(
const double**);
207 void convert_p(
double*)
const;
208 void convert_pp(
double**)
const;
210 void set_element(
int,
int,
double);
211 void accumulate_element(
int,
int,
double);
235 void accumulate_symmetric_outer_product(
SCVector*);
248 void vprint(
const char* title=0,
252 double *get_data() {
return matrix; }
253 double **get_rows() {
return rows; }
268 void init_blocklist();
271 void before_elemop();
280 void set_element(
int,
double);
281 void accumulate_element(
int,
double);
293 void vprint(
const char* title=0,
297 double *get_data() {
return matrix; }
void element_op(const Ref< SCElementOp > &)
only applied to the unique elements of this.
void accumulate_row(SCVector *v, int i)
Sum v to a row of this.
void assign_val(double)
Overridden to implement to assign members.
double get_element(int, int) const
Return or modify an element.
void accumulate_element(int, double)
Add val to element i.
void sigma(const CI< Type, Index > &ci, const mpqc::Vector &h, const Matrix &V, ci::Vector &C, ci::Vector &S)
Computes sigma 1,2,3 contributions.
Definition: sigma.hpp:30
Replicated SymmSCMatrix.
Definition: repl.h:183
The SCVector class is the abstract base class for double valued vectors.
Definition: abstract.h:97
double trace()
Return the trace.
void element_op(const Ref< SCElementOp > &)
Perform the element operation op on each element of this.
void element_op(const Ref< SCElementOp > &)
Perform the element operation op on each element of this.
void set_element(int, double)
Set element i to val.
void assign_subblock(SCMatrix *, int, int, int, int)
Assign m to a subblock of this.
void gen_invert_this(double condition_number_threshold=1e8)
Return the generalized inverse of this using SVD decomposition.
void scale(double)
Multiply all elements by val.
A template class that maintains references counts.
Definition: ref.h:361
Matrix class derived from Eigen::Matrix with additional MPQC integration.
Definition: matrix.hpp:21
double invert_this()
Invert this.
void accumulate_symmetric_product(SCMatrix *)
Sum into this a * a.t()
SCMatrix * matrix(const RefSCDimension &, const RefSCDimension &)
Given the dimensions, create matrices or vectors.
double get_element(int, int) const
Return or modify an element.
The SCMatrixKit abstract class acts as a factory for producing matrices.
Definition: abstract.h:57
double determ_this()
Return the determinant of this. this is overwritten.
void diagonalize(DiagSCMatrix *, SCMatrix *)
Diagonalize this, placing the eigenvalues in d and the eigenvectors in m.
double scalar_product(SCVector *)
Return the scalar obtained by multiplying this on the left and right by v.
double trace()
Return the trace.
void assign_val(double)
Overridden to implement the assign functions.
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this matrix.
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) blocks used in this matrix.
SCMatrix * get_subblock(int, int, int, int)
Return a subblock of this.
The SymmSCMatrix class is the abstract base class for diagonal double valued matrices.
Definition: abstract.h:551
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this matrix.
void assign_row(SCVector *v, int i)
Assign v to a row or column of this.
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:152
double determ_this()
Return the determinant of this. this is overwritten.
double get_element(int) const
Return or modify an element.
void eigensystem(SymmSCMatrix *, DiagSCMatrix *, SCMatrix *)
Solve generalized eigensystem for this with metric s, placing the eigenvalues in d and the eigenvecto...
void accumulate_outer_product(SCVector *, SCVector *)
Sum into this the products of various vectors or matrices.
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this matrix.
void accumulate_subblock(SCMatrix *, int, int, int, int)
Sum m into a subblock of this.
double determ_this()
Return the determinant of this. this is overwritten.
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) blocks used in this matrix.
void transpose_this()
Transpose this.
void accumulate(const SCMatrix *)
Sum m into this.
double trace()
Return the trace.
SCMatrix * get_subblock(int, int, int, int)
Return a subblock of this.
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) blocks used in this vector.
void gen_invert_this(double condition_number_threshold=1e8)
Return the generalized inverse of this using SVD decomposition.
SCVector * get_row(int i)
Return a row or column of this.
void accumulate_symmetric_sum(SCMatrix *)
Sum into a + a.t()
The SymmSCMatrix class is the abstract base class for symmetric double valued matrices.
Definition: abstract.h:385
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this vector.
void svd_this(SCMatrix *U, DiagSCMatrix *sigma, SCMatrix *V)
Compute the singular value decomposition for this, possibly destroying this.
double invert_this()
Invert this.
void accumulate_row(SCVector *v, int i)
Sum v to a row or column of this.
Transform
types of matrix transforms. Only real-valued matrices are assumed.
Definition: abstract.h:205
void accumulate(const SCVector *)
Sum v into this.
void assign_val(double)
Overridden to implement the assign members.
void accumulate(const SymmSCMatrix *)
Sum m into this.
SCVector * get_row(int i)
Return a row of this.
void accumulate_subblock(SCMatrix *, int, int, int, int, int=0, int=0)
Sum m into a subblock of this.
static std::ostream & out0()
Return an ostream that writes from node 0.
The SCMatrix class is the abstract base class for general double valued n by m matrices.
Definition: abstract.h:195
int schmidt_orthog_tol(SymmSCMatrix *, double tol, double *res=0)
Schmidt orthogonalize this.
double invert_this()
Invert this.
void schmidt_orthog(SymmSCMatrix *, int)
Schmidt orthogonalize this.
double scalar_product(SCVector *)
Return the dot product.
Vector class derived from Eigen::Matrix with additional MPQC integration.
Definition: matrix.hpp:133
void assign_row(SCVector *v, int i)
Assign v to a row of this.
The ReplSCMatrixKit produces matrices that work in a many processor environment.
Definition: repl.h:42
void element_op(const Ref< SCElementOp > &)
Perform the element operation op on each element of this.
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) blocks used in this matrix.
double get_element(int) const
Return the value of element i.
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
void accumulate(const DiagSCMatrix *)
Sum m into this.
void assign_val(double)
Overridden to implement the assign functions.
void assign_subblock(SCMatrix *, int, int, int, int, int=0, int=0)
Assign m to a subblock of this.
Replicated DiagSCMatrix.
Definition: repl.h:262
Generated at Sun Jan 26 2020 23:24:00 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.