32 #ifndef _math_scmat_dist_h
33 #define _math_scmat_dist_h
35 #include <util/group/message.h>
36 #include <util/group/mstate.h>
38 #include <math/scmat/block.h>
39 #include <math/scmat/matrix.h>
40 #include <math/scmat/abstract.h>
65 void init_blocklist();
66 double *find_element(
int i)
const;
67 int element_to_node(
int i)
const;
68 int block_to_node(
int)
const;
70 void error(
const char *);
74 void assign_p(
const double*);
91 void vprint(
const char* title=0,
112 void init_blocklist();
113 void error(
const char *);
114 double *find_element(
int i,
int j)
const;
115 int element_to_node(
int i,
int j)
const;
116 int block_to_node(
int,
int)
const;
121 enum VecOp {CopyFromVec, CopyToVec, AccumFromVec, AccumToVec};
122 enum Form { Row, Col } form;
123 void create_vecform(Form,
int nvec = -1);
124 void delete_vecform();
125 void vecform_op(VecOp op,
int *ivec = 0);
134 void set_element(
int,
int,
double);
135 void accumulate_element(
int,
int,
double);
142 void assign_column(
SCVector *v,
int i);
144 void accumulate_column(
SCVector *v,
int i);
157 void gen_invert_this();
165 void vprint(
const char* title=0,
167 void vprint(
const char* title=0,
184 void init_blocklist();
185 double *find_element(
int i,
int j)
const;
186 int element_to_node(
int i,
int j)
const;
187 int block_to_node(
int,
int)
const;
190 void error(
const char *msg);
197 void set_element(
int,
int,
double);
198 void accumulate_element(
int,
int,
double);
216 void gen_invert_this();
241 void init_blocklist();
242 double *find_element(
int i)
const;
243 int element_to_node(
int i)
const;
244 int block_to_node(
int)
const;
246 void error(
const char *msg);
253 void set_element(
int,
double);
254 void accumulate_element(
int,
double);
281 void maybe_advance_list();
void accumulate_subblock(SCMatrix *, int, int, int, int)
Sum m into a subblock of this.
void assign_subblock(SCMatrix *, int, int, int, int)
Assign m to a subblock of this.
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 this the products of various vectors or matrices.
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.
A template class that maintains references counts.
Definition: ref.h:332
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:58
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 > &)
Perform the element operation op on each element 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:178
The SymmSCMatrix class is the abstract base class for diagonal double valued matrices.
Definition: abstract.h:503
SCVector * get_row(int i)
Return a row of this.
StateSend is a concrete specialization of MsgStateSend that does the send part of point to point comm...
Definition: mstate.h:157
void schmidt_orthog(SymmSCMatrix *, int)
Schmidt orthogonalize this.
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:156
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.
double trace()
Return the trace.
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:364
Ref< SCMatrixSubblockIter > all_blocks(SCMatrixSubblockIter::Access)
Returns iterators for the all blocks used in this matrix.
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.
void next()
Proceed to the next block.
void convert(double *v) const
Assign v[i] to element i for all i.
void transpose_this()
Transpose this.
void accumulate(const SCMatrix *)
Sum m into this.
double determ_this()
Return the determinant of this. this is overwritten.
SCVector * get_row(int i)
Return a row or column of this.
void gen_invert_this()
Do a generalized inversion of this.
The DistSCMatrixKit produces matrices that work in a many processor environment.
Definition: dist.h:46
double invert_this()
Invert this.
Generated at Sun Jan 26 2020 23:33:03 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.