sc::RefSCMatrix(3)
π sc::RefSCMatrix β MPQC manual, section 3 π
Okay bestie, welcome to the MPQC manual page for sc::RefSCMatrix. Buckle up, itβs smart-pointer era. β¨
π¦ NAME π¦
sc::RefSCMatrix β the RefSCMatrix class is a smart pointer to an SCMatrix specialization. Thatβs the whole vibe. π
πΈ SYNOPSIS πΈ
#include <matrix.h>
Inherits sc::Ref< SCMatrix >.
π Public Member Functions π
Hereβs the full roster, in original order, no skips, no βoops I forgot one.β π«Ά
RefSCMatrix ()β Initializes the matrix pointer to0. The reference must be initialized before it is used.RefSCMatrix (const RefSCMatrix &m)β Makes this andmrefer to the sameSCMatrix. Twin-flame pointer behavior. πRefSCMatrix (SCMatrix *m)β Makes this refer tom.RefSCMatrix & operator= (SCMatrix *m)β Makes this refer tom.RefSCMatrix & operator= (const RefSCMatrix &m)β Makes this andmrefer to the same matrix.RefSCMatrix (const RefSCDimension &d1, const RefSCDimension &d2, const Ref< SCMatrixKit > &)β Creates a vector with dimensiond1byd2. The data values are undefined. Yes, it says vector β keeping the original wording exactly, donβt come for me πRefSCVector operator* (const RefSCVector &) constβ Multiply this by a vector and return a vector.RefSCMatrix operator* (const RefSCMatrix &) constβ Multiply this by a matrix and return a matrix.RefSCMatrix operator* (const RefSymmSCMatrix &) constβ Signature-only in the original. Exact overload, zero invented lore. β¨RefSCMatrix operator* (const RefDiagSCMatrix &) constβ Also signature-only in the original. πRefSCMatrix operator* (double) constβ Multiply this by a scalar and return the result.RefSCMatrix operator+ (const RefSCMatrix &) constβ Matrix addition.RefSCMatrix operator- (const RefSCMatrix &) constβ Matrix subtraction.RefSCMatrix t () constβ Return the transpose of this. Itβs giving flip. π¦RefSCMatrix i () constβ Return the inverse of this.RefSCMatrix gi () constβ Return the generalized inverse of this.RefSCMatrix clone () constβ These call theSCMatrixmembers of the same name after checking for references to0.RefSCMatrix copy () constβ Same shared note asclone: calls theSCMatrixmember of the same name after checking for references to0.
The next batch is signature-only in the original, so Iβm handing you the exact signatures with no extra claims. Periodt. π
RefSCMatrix get_subblock (int br, int er, int bc, int ec)void assign_subblock (const RefSCMatrix &, int br, int er, int bc, int ec, int source_br=0, int source_bc=0)void accumulate_subblock (const RefSCMatrix &, int, int, int, int, int source_br=0, int source_bc=0)RefSCVector get_row (int) constRefSCVector get_column (int) constvoid assign_row (const RefSCVector &, int) constvoid assign_column (const RefSCVector &, int) constvoid accumulate_row (const RefSCVector &, int) constvoid accumulate_column (const RefSCVector &, int) constvoid accumulate_outer_product (const RefSCVector &, const RefSCVector &) constvoid accumulate_product (const RefSCMatrix &, const RefSCMatrix &) constvoid assign (const RefSCMatrix &) constvoid scale (double) constvoid randomize () constvoid assign (double) constvoid assign (const double *) constvoid assign (const double **) constvoid convert (double *) constvoid convert (double **) constvoid accumulate (const RefSCMatrix &) constvoid accumulate (const RefSymmSCMatrix &) constvoid accumulate (const RefDiagSCMatrix &) constvoid element_op (const Ref< SCElementOp > &) constvoid element_op (const Ref< SCElementOp2 > &, const RefSCMatrix &) constvoid element_op (const Ref< SCElementOp3 > &, const RefSCMatrix &, const RefSCMatrix &) constint nrow () constint ncol () constRefSCDimension rowdim () constRefSCDimension coldim () constRef< SCMatrixKit > kit () constvoid set_element (int, int, double) constvoid accumulate_element (int, int, double) constdouble get_element (int, int) constvoid print (std::ostream &) constvoid print (const char *title=0, std::ostream &out=ExEnv::out0(), int=10) constdouble trace () constvoid save (StateOut &)
Back to the functions with actual notes attached:
void restore (StateIn &)β Restores the matrix from theStateInobject. The matrix must have been initialized already. π¨void svd (const RefSCMatrix &U, const RefDiagSCMatrix &sigma, const RefSCMatrix &V)β Compute the singular value decomposition,this = U sigma V.t().double solve_lin (const RefSCVector &v) constβ Solvesthis x = v.double determ () constβ Returns the determinant of the referenced matrix.SCMatrixdouble operator() (int i, int j) constβ Assign and examine matrix elements.int nblock () constβ If this matrix is blocked, return the number of blocks.RefSCMatrix block (int i) constβ If this matrix is blocked, return blocki.
π«Ά Additional Inherited Members π«Ά
The original page has this heading but doesnβt list any inherited members underneath it. So: heading acknowledged, nothing invented. πβ¨
π Detailed Description π
The RefSCMatrix class is a smart pointer to an SCMatrix specialization. Thatβs the whole main-character summary. π
π Constructor & Destructor Documentation π
π sc::RefSCMatrix::RefSCMatrix () π
Initializes the matrix pointer to 0.
π¨ The reference must be initialized before it is used, bestie. No raw uninitialized chaos.
π¦ sc::RefSCMatrix::RefSCMatrix (const RefSCDimension & d1, const RefSCDimension & d2, const Ref< SCMatrixKit > &) π¦
Create a vector with dimension d1 by d2. The data values are undefined.
β οΈ Undefined data values β the original says it, Iβm just relaying the message. Give them meaning before you trust them. π
π Member Function Documentation π
πΈ RefSCMatrix sc::RefSCMatrix::block (int i) const πΈ
If this matrix is blocked, return block i. Otherwise, return this as block 0.
π int sc::RefSCMatrix::nblock () const π
If this matrix is blocked, return the number of blocks. Otherwise, return 1.
π₯ double sc::RefSCMatrix::solve_lin (const RefSCVector & v) const π₯
Solves this x = v. Overwrites v with x.
β¨ void sc::RefSCMatrix::svd (const RefSCMatrix & U, const RefDiagSCMatrix & sigma, const RefSCMatrix & V) β¨
Compute the singular value decomposition, this = U sigma V.t().
The dimension of sigma is the smallest dimension of this. U, V, and sigma must already have the correct dimensions and are overwritten.
π Author π
Generated automatically by Doxygen for MPQC from the source code. π€β¨
π Thatβs the whole page, bestie. Cute sign-off: MPQC version 2.3.1, dated Sun Oct 4 2020 β page sc::RefSCMatrix(3). Go be iconic with your smart pointer. π«Άππ
π¦ 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