28 #ifndef _math_scmat_dist_h
29 #define _math_scmat_dist_h
31 #include <util/group/message.h>
32 #include <util/group/mstate.h>
34 #include <math/scmat/block.h>
35 #include <math/scmat/matrix.h>
36 #include <math/scmat/abstract.h>
61 void init_blocklist();
62 double *find_element(
int i)
const;
63 int element_to_node(
int i)
const;
64 int block_to_node(
int)
const;
66 void error(
const char *);
70 void assign_p(
const double*);
72 void convert(
double* v)
const;
87 void vprint(
const char* title=0,
109 void init_blocklist();
110 void error(
const char *);
111 double *find_element(
int i,
int j)
const;
112 int element_to_node(
int i,
int j)
const;
113 int block_to_node(
int,
int)
const;
118 enum VecOp {CopyFromVec, CopyToVec, AccumFromVec, AccumToVec};
119 enum Form { Row, Col } form;
120 void create_vecform(Form,
int nvec = -1);
121 void delete_vecform();
122 void vecform_op(VecOp op,
int *ivec = 0);
131 void set_element(
int,
int,
double);
132 void accumulate_element(
int,
int,
double);
139 void assign_column(
SCVector *v,
int i);
141 void accumulate_column(
SCVector *v,
int i);
163 void vprint(
const char* title=0,
165 void vprint(
const char* title=0,
183 void init_blocklist();
184 double *find_element(
int i,
int j)
const;
185 int element_to_node(
int i,
int j)
const;
186 int block_to_node(
int,
int)
const;
189 void error(
const char *msg);
196 void set_element(
int,
int,
double);
197 void accumulate_element(
int,
int,
double);
243 void init_blocklist();
244 double *find_element(
int i)
const;
245 int element_to_node(
int i)
const;
246 int block_to_node(
int)
const;
248 void error(
const char *msg);
255 void set_element(
int,
double);
256 void accumulate_element(
int,
double);
284 void maybe_advance_list();
void accumulate_subblock(SCMatrix *, int, int, int, int)
Sum m into a subblock of this.
void gen_invert_this(double condition_number_threshold=1e8)
uses invert_this()
Distributed DiagSCMatrix.
Definition: dist.h:236
void assign_subblock(SCMatrix *, int, int, int, int)
Assign m to a subblock of this.
Distributed SymmSCMatrix.
Definition: dist.h:175
void element_op(const Ref< SCElementOp > &)
Perform the element operation op on each element of this.
double get_element(int) const
Return or modify an element.
The SCVector class is the abstract base class for double valued vectors.
Definition: abstract.h:97
SCMatrix * matrix(const RefSCDimension &, const RefSCDimension &)
Given the dimensions, create matrices or vectors.
void accumulate_symmetric_sum(SCMatrix *)
Sum into a + a.t()
int schmidt_orthog_tol(SymmSCMatrix *, double tol, double *res=0)
Schmidt orthogonalize this.
void accumulate_row(SCVector *v, int i)
Sum v to a row or column of this.
Distributed SCMatrix.
Definition: dist.h:97
A template class that maintains references counts.
Definition: ref.h:361
double get_element(int, int) const
Return or modify an element.
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) blocks used in this vector.
void begin()
Start at the beginning.
The SCMatrixKit abstract class acts as a factory for producing matrices.
Definition: abstract.h:57
double trace()
Return the trace.
void accumulate_outer_product(SCVector *, SCVector *)
Sum into this the products of various vectors or matrices.
void accumulate(const SymmSCMatrix *)
Sum m into this.
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this matrix.
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this matrix.
void element_op(const Ref< SCElementOp > &)
only applied to the unique elements of this.
void assign_subblock(SCMatrix *, int, int, int, int, int=0, int=0)
Assign m to a subblock of this.
void assign_row(SCVector *v, int i)
Assign v to a row or column of this.
StateRecv is a concrete specialization of MsgStateRecv that does the receive part of point to point c...
Definition: mstate.h:193
The SymmSCMatrix class is the abstract base class for diagonal double valued matrices.
Definition: abstract.h:551
SCVector * get_row(int i)
Return a row of this.
std::vector< double > convert(const RefDiagSCMatrix &A)
Converts RefDiagSCMatrix to std::vector<double>
StateSend is a concrete specialization of MsgStateSend that does the send part of point to point comm...
Definition: mstate.h:165
void schmidt_orthog(SymmSCMatrix *, int)
Schmidt orthogonalize this.
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:152
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) 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.
void set_element(int, double)
Set element i to val.
void accumulate_subblock(SCMatrix *, int, int, int, int, int=0, int=0)
Sum m into a subblock of this.
void diagonalize(DiagSCMatrix *, SCMatrix *)
Diagonalize this, placing the eigenvalues in d and the eigenvectors in m.
double invert_this()
Invert this.
void eigensystem(SymmSCMatrix *, DiagSCMatrix *, SCMatrix *)
Solve generalized eigensystem for this with metric s, placing the eigenvalues in d and the eigenvecto...
double trace()
Return the trace.
void gen_invert_this(double condition_number_threshold=1e8)
uses invert_this()
double trace()
Return the trace.
void element_op(const Ref< SCElementOp > &)
Perform the element operation op on each element of this.
double determ_this()
Return the determinant of this. this is overwritten.
void accumulate_element(int, double)
Add val to element i.
void assign_row(SCVector *v, int i)
Assign v to a row of this.
void accumulate_row(SCVector *v, int i)
Sum v to a row of this.
double determ_this()
Return the determinant of this. this is overwritten.
double invert_this()
Invert this.
double get_element(int, int) const
Return or modify an element.
void accumulate(const SCVector *)
Sum v into this.
void element_op(const Ref< SCElementOp > &)
Perform the element operation op on each element of this.
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this vector.
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 matrix.
void gen_invert_this(double condition_number_threshold=1e8)
generalized-invert this
double get_element(int) const
Return the value of element i.
SCMatrix * get_subblock(int, int, int, int)
Return a subblock of this.
double scalar_product(SCVector *)
Return the dot product.
Ref< SCMatrixSubblockIter > local_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the local (rapidly accessible) blocks used in this matrix.
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
void accumulate(const DiagSCMatrix *)
Sum m into this.
Vector class derived from Eigen::Matrix with additional MPQC integration.
Definition: matrix.hpp:133
void next()
Proceed to the next block.
void transpose_this()
Transpose this.
void accumulate(const SCMatrix *)
Sum m into this.
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
double determ_this()
Return the determinant of this. this is overwritten.
SCVector * get_row(int i)
Return a row or column of this.
The DistSCMatrixKit produces matrices that work in a many processor environment.
Definition: dist.h:42
double invert_this()
Invert this.
Generated at Sun Jan 26 2020 23:24:00 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.