sc::SCMatrix(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’– 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, with NormalTransform = 0 and TransposeTransform = 1, exactly as the page says πŸ¦‹

πŸ’… Public Member Functions πŸ’…

  • SCMatrix (const RefSCDimension &, const RefSCDimension &, SCMatrixKit *) β€” the constructor, taking two RefSCDimensions and an SCMatrixKit *.
  • 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 the SCMatrixKit used 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 -1 and 1.
  • void assign (double val) β€” set all elements to val.
  • void assign (const double *m) β€” assign element i, j to m[ir*nrow()+j] β€” yes, exactly like that.
  • void assign (const double **m) β€” assign element i, j to m[i][j].
  • void assign (SCMatrix *m) β€” make this have the same elements as m. 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 an SCMatrix of 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 by val.
  • virtual void scale_diagonal (double val) β€” scale the diagonal elements by val.
  • virtual void shift_diagonal (double val) β€” shift the diagonal elements by val.
  • 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 β€” assign m to a subblock of this. Pure virtual.
  • virtual void accumulate_subblock (SCMatrix *m, int, int, int, int, int=0, int=0)=0 β€” sum m into 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 β€” assign v to a row or column of this. Pure virtual.
  • virtual void assign_column (SCVector *v, int i)=0 β€” assign v to a row or column of this. Pure virtual.
  • virtual void accumulate_row (SCVector *v, int i)=0 β€” sum v to a row or column of this. Pure virtual.
  • virtual void accumulate_column (SCVector *v, int i)=0 β€” sum v to a row or column of this. Pure virtual.
  • virtual void accumulate (const SCMatrix *m)=0 β€” sum m into this. Pure virtual.
  • virtual void accumulate (const SymmSCMatrix *m)=0 β€” the SymmSCMatrix accumulate overload. Pure virtual.
  • virtual void accumulate (const DiagSCMatrix *m)=0 β€” the DiagSCMatrix accumulate overload. Pure virtual.
  • virtual void accumulate (const SCVector *)=0 β€” the SCVector accumulate 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. this is 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 operation op on 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