sc::RefSCMatrix(3)

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

πŸ’– 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 to 0. The reference must be initialized before it is used.
  • RefSCMatrix (const RefSCMatrix &m) β€” Makes this and m refer to the same SCMatrix. Twin-flame pointer behavior. πŸ’–
  • RefSCMatrix (SCMatrix *m) β€” Makes this refer to m.
  • RefSCMatrix & operator= (SCMatrix *m) β€” Makes this refer to m.
  • RefSCMatrix & operator= (const RefSCMatrix &m) β€” Makes this and m refer to the same matrix.
  • RefSCMatrix (const RefSCDimension &d1, const RefSCDimension &d2, const Ref< SCMatrixKit > &) β€” Creates a vector with dimension d1 by d2. 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 the SCMatrix members of the same name after checking for references to 0.
  • RefSCMatrix copy () const β€” Same shared note as clone: calls the SCMatrix member of the same name after checking for references to 0.

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) const
  • RefSCVector get_column (int) const
  • void assign_row (const RefSCVector &, int) const
  • void assign_column (const RefSCVector &, int) const
  • void accumulate_row (const RefSCVector &, int) const
  • void accumulate_column (const RefSCVector &, int) const
  • void accumulate_outer_product (const RefSCVector &, const RefSCVector &) const
  • void accumulate_product (const RefSCMatrix &, const RefSCMatrix &) const
  • void assign (const RefSCMatrix &) const
  • void scale (double) const
  • void randomize () const
  • void assign (double) const
  • void assign (const double *) const
  • void assign (const double **) const
  • void convert (double *) const
  • void convert (double **) const
  • void accumulate (const RefSCMatrix &) const
  • void accumulate (const RefSymmSCMatrix &) const
  • void accumulate (const RefDiagSCMatrix &) const
  • void element_op (const Ref< SCElementOp > &) const
  • void element_op (const Ref< SCElementOp2 > &, const RefSCMatrix &) const
  • void element_op (const Ref< SCElementOp3 > &, const RefSCMatrix &, const RefSCMatrix &) const
  • int nrow () const
  • int ncol () const
  • RefSCDimension rowdim () const
  • RefSCDimension coldim () const
  • Ref< SCMatrixKit > kit () const
  • void set_element (int, int, double) const
  • void accumulate_element (int, int, double) const
  • double get_element (int, int) const
  • void print (std::ostream &) const
  • void print (const char *title=0, std::ostream &out=ExEnv::out0(), int=10) const
  • double trace () const
  • void save (StateOut &)

Back to the functions with actual notes attached:

  • void restore (StateIn &) β€” Restores the matrix from the StateIn object. 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 β€” Solves this 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 block i.

🫢 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