.TH "sc::SCMatrix" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::SCMatrix \- The \fBSCMatrix\fP class is the abstract base class for general double valued n by m matrices\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::DescribedClass\fP\&. .PP Inherited by \fBsc::BlockedSCMatrix\fP, \fBsc::DistSCMatrix\fP, \fBsc::LocalSCMatrix\fP, and \fBsc::ReplSCMatrix\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBTransform\fP { \fBNormalTransform\fP = 0, \fBTransposeTransform\fP = 1 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSCMatrix\fP (const \fBRefSCDimension\fP &, const \fBRefSCDimension\fP &, \fBSCMatrixKit\fP *)" .br .ti -1c .RI "virtual void \fBsave\fP (\fBStateOut\fP &)" .br .RI "Save and restore this in an implementation independent way\&. " .ti -1c .RI "virtual void \fBrestore\fP (\fBStateIn\fP &)" .br .ti -1c .RI "\fBRef\fP< \fBSCMatrixKit\fP > \fBkit\fP () const" .br .RI "Return the \fBSCMatrixKit\fP used to create this object\&. " .ti -1c .RI "int \fBnrow\fP () const" .br .RI "Return the number of rows\&. " .ti -1c .RI "int \fBncol\fP () const" .br .RI "Return the number of columns\&. " .ti -1c .RI "virtual double \fBmaxabs\fP () const" .br .RI "Return the maximum absolute value element\&. " .ti -1c .RI "virtual void \fBrandomize\fP ()" .br .RI "Assign each element to a random number between -1 and 1\&. " .ti -1c .RI "void \fBassign\fP (double val)" .br .RI "Set all elements to val\&. " .ti -1c .RI "void \fBassign\fP (const double *m)" .br .RI "Assign element i, j to m[ir*nrow()+j]\&. " .ti -1c .RI "void \fBassign\fP (const double **m)" .br .RI "Assign element i, j to m[i][j]\&. " .ti -1c .RI "void \fBassign\fP (\fBSCMatrix\fP *m)" .br .RI "Make this have the same elements as m\&. The dimensions must match\&. " .ti -1c .RI "virtual void \fBassign_val\fP (double val)" .br .RI "Overridden to implement to assign members\&. " .ti -1c .RI "virtual void \fBassign_p\fP (const double *m)" .br .ti -1c .RI "virtual void \fBassign_pp\fP (const double **m)" .br .ti -1c .RI "virtual void \fBassign_r\fP (\fBSCMatrix\fP *m)" .br .ti -1c .RI "virtual void \fBconvert\fP (double *) const" .br .RI "Like the assign members, but these write values to the arguments\&. " .ti -1c .RI "virtual void \fBconvert\fP (double **) const" .br .ti -1c .RI "virtual void \fBconvert\fP (\fBSCMatrix\fP *)" .br .RI "Convert an \fBSCMatrix\fP of a different specialization to this specialization and possibly accumulate the data\&. " .ti -1c .RI "virtual void \fBconvert_accumulate\fP (\fBSCMatrix\fP *)" .br .ti -1c .RI "virtual void \fBscale\fP (double val)" .br .RI "Multiply all elements by val\&. " .ti -1c .RI "virtual void \fBscale_diagonal\fP (double val)" .br .RI "Scale the diagonal elements by val\&. " .ti -1c .RI "virtual void \fBshift_diagonal\fP (double val)" .br .RI "Shift the diagonal elements by val\&. " .ti -1c .RI "virtual void \fBunit\fP ()" .br .RI "Make this equal to the unit matrix\&. " .ti -1c .RI "virtual \fBSCMatrix\fP * \fBcopy\fP ()" .br .RI "Return a matrix with the same dimension and same elements\&. " .ti -1c .RI "virtual \fBSCMatrix\fP * \fBclone\fP ()" .br .RI "Return a matrix with the same dimension but uninitialized memory\&. " .ti -1c .RI "\fBRefSCDimension\fP \fBrowdim\fP () const" .br .RI "Return the row or column dimension\&. " .ti -1c .RI "\fBRefSCDimension\fP \fBcoldim\fP () const" .br .ti -1c .RI "virtual double \fBget_element\fP (int, int) const =0" .br .RI "Return or modify an element\&. " .ti -1c .RI "virtual void \fBset_element\fP (int, int, double)=0" .br .ti -1c .RI "virtual void \fBaccumulate_element\fP (int, int, double)=0" .br .ti -1c .RI "virtual \fBSCMatrix\fP * \fBget_subblock\fP (int br, int er, int bc, int ec)=0" .br .RI "Return a subblock of this\&. " .ti -1c .RI "virtual void \fBassign_subblock\fP (\fBSCMatrix\fP *m, int, int, int, int, int=0, int=0)=0" .br .RI "Assign m to a subblock of this\&. " .ti -1c .RI "virtual void \fBaccumulate_subblock\fP (\fBSCMatrix\fP *m, int, int, int, int, int=0, int=0)=0" .br .RI "Sum m into a subblock of this\&. " .ti -1c .RI "virtual \fBSCVector\fP * \fBget_row\fP (int i)=0" .br .RI "Return a row or column of this\&. " .ti -1c .RI "virtual \fBSCVector\fP * \fBget_column\fP (int i)=0" .br .ti -1c .RI "virtual void \fBassign_row\fP (\fBSCVector\fP *v, int i)=0" .br .RI "Assign v to a row or column of this\&. " .ti -1c .RI "virtual void \fBassign_column\fP (\fBSCVector\fP *v, int i)=0" .br .ti -1c .RI "virtual void \fBaccumulate_row\fP (\fBSCVector\fP *v, int i)=0" .br .RI "Sum v to a row or column of this\&. " .ti -1c .RI "virtual void \fBaccumulate_column\fP (\fBSCVector\fP *v, int i)=0" .br .ti -1c .RI "virtual void \fBaccumulate\fP (const \fBSCMatrix\fP *m)=0" .br .RI "Sum m into this\&. " .ti -1c .RI "virtual void \fBaccumulate\fP (const \fBSymmSCMatrix\fP *m)=0" .br .ti -1c .RI "virtual void \fBaccumulate\fP (const \fBDiagSCMatrix\fP *m)=0" .br .ti -1c .RI "virtual void \fBaccumulate\fP (const \fBSCVector\fP *)=0" .br .ti -1c .RI "virtual void \fBaccumulate_outer_product\fP (\fBSCVector\fP *, \fBSCVector\fP *)=0" .br .RI "Sum into this the products of various vectors or matrices\&. " .ti -1c .RI "void \fBaccumulate_product\fP (\fBSCMatrix\fP *m1, \fBSCMatrix\fP *m2)" .br .ti -1c .RI "void \fBaccumulate_product\fP (\fBSCMatrix\fP *m1, \fBSymmSCMatrix\fP *m2)" .br .ti -1c .RI "void \fBaccumulate_product\fP (\fBSCMatrix\fP *m1, \fBDiagSCMatrix\fP *m2)" .br .ti -1c .RI "void \fBaccumulate_product\fP (\fBSymmSCMatrix\fP *m1, \fBSCMatrix\fP *m2)" .br .ti -1c .RI "void \fBaccumulate_product\fP (\fBDiagSCMatrix\fP *m1, \fBSCMatrix\fP *m2)" .br .ti -1c .RI "void \fBaccumulate_product\fP (\fBSymmSCMatrix\fP *m1, \fBSymmSCMatrix\fP *m2)" .br .ti -1c .RI "virtual void \fBaccumulate_product_rr\fP (\fBSCMatrix\fP *, \fBSCMatrix\fP *)=0" .br .ti -1c .RI "virtual void \fBaccumulate_product_rs\fP (\fBSCMatrix\fP *, \fBSymmSCMatrix\fP *)" .br .ti -1c .RI "virtual void \fBaccumulate_product_rd\fP (\fBSCMatrix\fP *, \fBDiagSCMatrix\fP *)" .br .ti -1c .RI "virtual void \fBaccumulate_product_sr\fP (\fBSymmSCMatrix\fP *, \fBSCMatrix\fP *)" .br .ti -1c .RI "virtual void \fBaccumulate_product_dr\fP (\fBDiagSCMatrix\fP *, \fBSCMatrix\fP *)" .br .ti -1c .RI "virtual void \fBaccumulate_product_ss\fP (\fBSymmSCMatrix\fP *, \fBSymmSCMatrix\fP *)" .br .ti -1c .RI "virtual void \fBtranspose_this\fP ()=0" .br .RI "Transpose this\&. " .ti -1c .RI "virtual double \fBtrace\fP ()=0" .br .RI "Return the trace\&. " .ti -1c .RI "virtual double \fBinvert_this\fP ()=0" .br .RI "Invert this\&. " .ti -1c .RI "virtual double \fBdeterm_this\fP ()=0" .br .RI "Return the determinant of this\&. this is overwritten\&. " .ti -1c .RI "virtual void \fBsvd_this\fP (\fBSCMatrix\fP *U, \fBDiagSCMatrix\fP *sigma, \fBSCMatrix\fP *V)" .br .RI "\fBCompute\fP the singular value decomposition for this, possibly destroying this\&. " .ti -1c .RI "virtual double \fBsolve_this\fP (\fBSCVector\fP *)=0" .br .ti -1c .RI "virtual void \fBgen_invert_this\fP ()" .br .ti -1c .RI "virtual void \fBschmidt_orthog\fP (\fBSymmSCMatrix\fP *, int n)=0" .br .RI "Schmidt orthogonalize this\&. " .ti -1c .RI "virtual int \fBschmidt_orthog_tol\fP (\fBSymmSCMatrix\fP *, double tol, double *res=0)=0" .br .RI "Schmidt orthogonalize this\&. " .ti -1c .RI "virtual void \fBelement_op\fP (const \fBRef\fP< \fBSCElementOp\fP > &)=0" .br .RI "Perform the element operation op on each element of this\&. " .ti -1c .RI "virtual void \fBelement_op\fP (const \fBRef\fP< \fBSCElementOp2\fP > &, \fBSCMatrix\fP *)=0" .br .ti -1c .RI "virtual void \fBelement_op\fP (const \fBRef\fP< \fBSCElementOp3\fP > &, \fBSCMatrix\fP *, \fBSCMatrix\fP *)=0" .br .ti -1c .RI "void \fBprint\fP (std::ostream &o=\fBExEnv::out0\fP()) const" .br .RI "Print out the matrix\&. " .ti -1c .RI "void \fBprint\fP (const char *title=0, std::ostream &out=\fBExEnv::out0\fP(), int=10) const" .br .ti -1c .RI "virtual void \fBvprint\fP (const char *title=0, std::ostream &out=\fBExEnv::out0\fP(), int=10) const =0" .br .ti -1c .RI "\fBRef\fP< \fBMessageGrp\fP > \fBmessagegrp\fP () const" .br .RI "Returns the message group used by the matrix kit\&. " .ti -1c .RI "virtual \fBRef\fP< \fBSCMatrixSubblockIter\fP > \fBlocal_blocks\fP (SCMatrixSubblockIter::Access)=0" .br .RI "Returns iterators for the local (rapidly accessible) blocks used in this matrix\&. " .ti -1c .RI "virtual \fBRef\fP< \fBSCMatrixSubblockIter\fP > \fBall_blocks\fP (SCMatrixSubblockIter::Access)=0" .br .RI "Returns iterators for the all blocks used in this matrix\&. " .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBRefSCDimension\fP \fBd1\fP" .br .ti -1c .RI "\fBRefSCDimension\fP \fBd2\fP" .br .ti -1c .RI "\fBRef\fP< \fBSCMatrixKit\fP > \fBkit_\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSCMatrix\fP class is the abstract base class for general double valued n by m matrices\&. For symmetric matrices use \fBSymmSCMatrix\fP and for diagonal matrices use \fBDiagSCMatrix\fP\&. .SH "Member Function Documentation" .PP .SS "virtual \fBSCMatrix\fP* sc::SCMatrix::get_subblock (int br, int er, int bc, int ec)\fC [pure virtual]\fP" .PP Return a subblock of this\&. The subblock is defined as the rows starting at br and ending at er, and the columns beginning at bc and ending at ec\&. .PP Implemented in \fBsc::ReplSCMatrix\fP, \fBsc::LocalSCMatrix\fP, \fBsc::DistSCMatrix\fP, and \fBsc::BlockedSCMatrix\fP\&. .SS "virtual void sc::SCMatrix::schmidt_orthog (\fBSymmSCMatrix\fP *, int n)\fC [pure virtual]\fP" .PP Schmidt orthogonalize this\&. S is the overlap matrix\&. n is the number of columns to orthogonalize\&. .PP Implemented in \fBsc::ReplSCMatrix\fP, \fBsc::LocalSCMatrix\fP, \fBsc::DistSCMatrix\fP, and \fBsc::BlockedSCMatrix\fP\&. .SS "virtual int sc::SCMatrix::schmidt_orthog_tol (\fBSymmSCMatrix\fP *, double tol, double * res = \fC0\fP)\fC [pure virtual]\fP" .PP Schmidt orthogonalize this\&. S is the overlap matrix\&. tol is the tolerance\&. The number of linearly independent vectors is returned\&. .PP Implemented in \fBsc::ReplSCMatrix\fP, \fBsc::LocalSCMatrix\fP, \fBsc::DistSCMatrix\fP, and \fBsc::BlockedSCMatrix\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.