sc::SCMatrix(3)
π sc::SCMatrix(3) β the MPQC manual page, bestie π
okay so this is sc::SCMatrix(3) from the MPQC manual, and itβs giving abstract-matrix main character energy β¨
πΈ NAME πΈ
sc::SCMatrix β the abstract base class for general double valued n by m matrices. Thatβs the whole name vibe, and yes, itβs iconic π
β¨ SYNOPSIS β¨
#include <abstract.h>
Inherits sc::DescribedClass.
Inherited by sc::BlockedSCMatrix, sc::DistSCMatrix, sc::LocalSCMatrix,
and sc::ReplSCMatrix.
π Public Types π
enum Transform { NormalTransform = 0, TransposeTransform = 1 }β the transform enum, withNormalTransform = 0andTransposeTransform = 1, exactly as the page says π¦
π Public Member Functions π
SCMatrix (const RefSCDimension &, const RefSCDimension &, SCMatrixKit *)β the constructor, taking twoRefSCDimensions and anSCMatrixKit *.virtual void save (StateOut &)β save and restore this in an implementation independent way πΎvirtual void restore (StateIn &)β the restore half of that implementation-independent save/restore situation.Ref< SCMatrixKit > kit () constβ return theSCMatrixKitused to create this object.int nrow () constβ return the number of rows.int ncol () constβ return the number of columns.virtual double maxabs () constβ return the maximum absolute value element.virtual void randomize ()β assign each element to a random number between-1and1.void assign (double val)β set all elements toval.void assign (const double *m)β assign elementi,jtom[ir*nrow()+j]β yes, exactly like that.void assign (const double **m)β assign elementi,jtom[i][j].void assign (SCMatrix *m)β make this have the same elements asm. The dimensions must match.virtual void assign_val (double val)β overridden to implement the assign members.virtual void assign_p (const double *m)β the page gives no extra prose here.virtual void assign_pp (const double **m)β the page gives no extra prose here either.virtual void assign_r (SCMatrix *m)β same assign family, still no extra prose in the page.virtual void convert (double *) constβ like the assign members, but these write values to the arguments.virtual void convert (double **) constβ the double-pointer convert sibling; no extra prose in the page.virtual void convert (SCMatrix *)β convert anSCMatrixof a different specialization to this specialization and possibly accumulate the data.virtual void convert_accumulate (SCMatrix *)β the page gives no extra prose here.virtual void scale (double val)β multiply all elements byval.virtual void scale_diagonal (double val)β scale the diagonal elements byval.virtual void shift_diagonal (double val)β shift the diagonal elements byval.virtual void unit ()β make this equal to the unit matrix.virtual SCMatrix * copy ()β return a matrix with the same dimension and same elements.virtual SCMatrix * clone ()β return a matrix with the same dimension but uninitialized memory.RefSCDimension rowdim () constβ return the row or column dimension; this is the row half of that pair.RefSCDimension coldim () constβ return the row or column dimension; this is the column half of that pair.virtual double get_element (int, int) const =0β return or modify an element. Pure virtual.virtual void set_element (int, int, double)=0β the set half of the βreturn or modify an elementβ note. Pure virtual.virtual void accumulate_element (int, int, double)=0β the accumulate half of that element note. Pure virtual.virtual SCMatrix * get_subblock (int br, int er, int bc, int ec)=0β return a subblock of this. Pure virtual, with the full definition below.virtual void assign_subblock (SCMatrix *m, int, int, int, int, int=0, int=0)=0β assignmto a subblock of this. Pure virtual.virtual void accumulate_subblock (SCMatrix *m, int, int, int, int, int=0, int=0)=0β summinto a subblock of this. Pure virtual.virtual SCVector * get_row (int i)=0β return a row or column of this. Pure virtual.virtual SCVector * get_column (int i)=0β return a row or column of this. Pure virtual.virtual void assign_row (SCVector *v, int i)=0β assignvto a row or column of this. Pure virtual.virtual void assign_column (SCVector *v, int i)=0β assignvto a row or column of this. Pure virtual.virtual void accumulate_row (SCVector *v, int i)=0β sumvto a row or column of this. Pure virtual.virtual void accumulate_column (SCVector *v, int i)=0β sumvto a row or column of this. Pure virtual.virtual void accumulate (const SCMatrix *m)=0β summinto this. Pure virtual.virtual void accumulate (const SymmSCMatrix *m)=0β theSymmSCMatrixaccumulate overload. Pure virtual.virtual void accumulate (const DiagSCMatrix *m)=0β theDiagSCMatrixaccumulate overload. Pure virtual.virtual void accumulate (const SCVector *)=0β theSCVectoraccumulate overload. Pure virtual.virtual void accumulate_outer_product (SCVector *, SCVector *)=0β sum into this the products of various vectors or matrices. Pure virtual.void accumulate_product (SCMatrix *m1, SCMatrix *m2)β product-accumulate overload; the page gives no extra prose for it.void accumulate_product (SCMatrix *m1, SymmSCMatrix *m2)β another product-accumulate overload.void accumulate_product (SCMatrix *m1, DiagSCMatrix *m2)β another product-accumulate overload.void accumulate_product (SymmSCMatrix *m1, SCMatrix *m2)β another product-accumulate overload.void accumulate_product (DiagSCMatrix *m1, SCMatrix *m2)β another product-accumulate overload.void accumulate_product (SymmSCMatrix *m1, SymmSCMatrix *m2)β another product-accumulate overload.virtual void accumulate_product_rr (SCMatrix *, SCMatrix *)=0β pure virtual product-accumulate overload.virtual void accumulate_product_rs (SCMatrix *, SymmSCMatrix *)β product-accumulate overload; no extra prose in the page.virtual void accumulate_product_rd (SCMatrix *, DiagSCMatrix *)β product-accumulate overload; no extra prose in the page.virtual void accumulate_product_sr (SymmSCMatrix *, SCMatrix *)β product-accumulate overload; no extra prose in the page.virtual void accumulate_product_dr (DiagSCMatrix *, SCMatrix *)β product-accumulate overload; no extra prose in the page.virtual void accumulate_product_ss (SymmSCMatrix *, SymmSCMatrix *)β product-accumulate overload; no extra prose in the page.virtual void transpose_this ()=0β transpose this. Pure virtual.virtual double trace ()=0β return the trace. Pure virtual.virtual double invert_this ()=0β invert this. Pure virtual.virtual double determ_this ()=0β return the determinant of this.thisis overwritten. Pure virtual.virtual void svd_this (SCMatrix *U, DiagSCMatrix *sigma, SCMatrix *V)β compute the singular value decomposition for this, possibly destroying this.virtual double solve_this (SCVector *)=0β pure virtual; the page gives no extra prose here.virtual void gen_invert_this ()β virtual; the page gives no extra prose here.virtual void schmidt_orthog (SymmSCMatrix *, int n)=0β Schmidt orthogonalize this. Pure virtual, with the full definition below.virtual int schmidt_orthog_tol (SymmSCMatrix *, double tol, double *res=0)=0β Schmidt orthogonalize this. Pure virtual, with the full definition below.virtual void element_op (const Ref< SCElementOp > &)=0β perform the element operationopon each element of this. Pure virtual.virtual void element_op (const Ref< SCElementOp2 > &, SCMatrix *)=0β the two-matrix element operation overload. Pure virtual.virtual void element_op (const Ref< SCElementOp3 > &, SCMatrix *, SCMatrix *)=0β the three-matrix element operation overload. Pure virtual.void print (std::ostream &o=ExEnv::out0()) constβ print out the matrix.void print (const char *title=0, std::ostream &out=ExEnv::out0(), int=10) constβ print out the matrix, with the title and stream and int defaults exactly as shown.virtual void vprint (const char *title=0, std::ostream &out=ExEnv::out0(), int=10) const =0β pure virtual print member; the page gives no extra prose here.Ref< MessageGrp > messagegrp () constβ returns the message group used by the matrix kit.virtual Ref< SCMatrixSubblockIter > local_blocks (SCMatrixSubblockIter::Access)=0β returns iterators for the local (rapidly accessible) blocks used in this matrix. Pure virtual.virtual Ref< SCMatrixSubblockIter > all_blocks (SCMatrixSubblockIter::Access)=0β returns iterators for the all blocks used in this matrix. Pure virtual.
π Protected Attributes π
RefSCDimension d1β protected attribute, exactly as listed.RefSCDimension d2β protected attribute, exactly as listed.Ref< SCMatrixKit > kit_β protected attribute, exactly as listed.
π Additional Inherited Members π
The manual puts this heading here and then moves on to the Detailed Description. No extra members are spelled out under it, no cap.
πΈ Detailed Description πΈ
The SCMatrix class is the abstract base class for general double valued n by m matrices. Thatβs the whole mood board π
For symmetric matrices use SymmSCMatrix, and for diagonal matrices use DiagSCMatrix. Very important, bestie, donβt mix up your matrix specializations β¨
π Member Function Documentation π
π« virtual SCMatrix* sc::SCMatrix::get_subblock (int br, int er, int bc, int ec) [pure virtual] π«
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. So yes: rows br through er, columns bc through ec π«Ά
Implemented in sc::BlockedSCMatrix, sc::ReplSCMatrix, sc::DistSCMatrix, and sc::LocalSCMatrix.
π« virtual void sc::SCMatrix::schmidt_orthog (SymmSCMatrix *, int n) [pure virtual] π«
Schmidt orthogonalize this. S is the overlap matrix. n is the number of columns to orthogonalize. Thatβs the whole note, and itβs lowkey important π
Implemented in sc::BlockedSCMatrix, sc::ReplSCMatrix, sc::DistSCMatrix, and sc::LocalSCMatrix.
π« virtual int sc::SCMatrix::schmidt_orthog_tol (SymmSCMatrix *, double tol, double * res = 0) [pure virtual] π«
Schmidt orthogonalize this. S is the overlap matrix. tol is the tolerance. The number of linearly independent vectors is returned. The return value is literally the count of linearly independent vectors, slay π¦
Implemented in sc::BlockedSCMatrix, sc::ReplSCMatrix, sc::DistSCMatrix, and sc::LocalSCMatrix.
π Author π
Generated automatically by Doxygen for MPQC from the source code. The robots did this one, bestie π€β¨
This page is from MPQC version 2.3.1, dated Sun Oct 4 2020, and itβs the sc::SCMatrix(3) manual page. Stay abstract, stay iconic ππ«Ά
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms