sc::SCMatrix3(3)
β¨ NAME β¨
sc::SCMatrix3 β bestie it's a 3Γ3 matrix class from the MPQC library (this is the Library Functions Manual page, page sc::SCMatrix3(3), in case u were wondering where u are π
)
π¦ SYNOPSIS π¦
okay so here's the whole squad of public member functions, no gatekeeping:
SCMatrix3 (const SCMatrix3 &)
SCMatrix3 (const RefSCMatrix3 &)
SCMatrix3 (double x[9])
SCMatrix3 (const SCVector3 &p1, const SCVector3 &p2, const SCVector3 &p3)
SCMatrix3 & operator= (const SCMatrix3 &)
SCMatrix3 operator* (double) const
SCMatrix3 operator* (const SCMatrix3 &) const
SCVector3 operator* (const SCVector3 &v) const
SCMatrix3 operator+ (const SCMatrix3 &) const
SCMatrix3 operator- (const SCMatrix3 &) const
double & elem (int i, int j)
const double & elem (int i, int j) const
double & elem (int i)
const double & elem (int i) const
double & operator[] (int i)
const double & operator[] (int i) const
double & operator() (int i, int j)
const double & operator() (int i, int j) const
const double * data () const
void print (std::ostream &=ExEnv::out0()) const
π DESCRIPTION π
so like. it's sc::SCMatrix3. a 3Γ3 matrix. that's the vibe. she's small, she's mighty, she's the main character of ur little corner of linear algebra πΈ
π PUBLIC MEMBER FUNCTIONS π
the way that this class has SO many ways to be constructed and indexed... it's giving overachiever and honestly? we love that for her π
π Constructors β pick ur fighter
SCMatrix3 (const SCMatrix3 &)β copy constructor bestie. makes a whole newSCMatrix3that's a twin of an existing one. slay β¨SCMatrix3 (const RefSCMatrix3 &)β builds one from aRefSCMatrix3. yes she can do that too.SCMatrix3 (double x[9])β feed her an array ofdoubleand she'll become a matrix. nine of them. that's the whole thing π₯SCMatrix3 (const SCVector3 &p1, const SCVector3 &p2, const SCVector3 &p3)β threeSCVector3s walk into a bar and out comes aSCMatrix3. iconic behavior honestly π«Ά
π Assignment
SCMatrix3 & operator= (const SCMatrix3 &)β the classic. takes anotherSCMatrix3and copies it right on over. no cap π
β Math Time (the fun part)
SCMatrix3 operator* (double) constβ scale her by adouble, get a freshSCMatrix3back. math but make it cute.SCMatrix3 operator* (const SCMatrix3 &) constβ matrix times matrix. she said "i contain multitudes" and multiplied π§SCVector3 operator* (const SCVector3 &v) constβ matrix timesSCVector3v, and u get anSCVector3back. transformation era π«SCMatrix3 operator+ (const SCMatrix3 &) constβ adding twoSCMatrix3s together. wholesome.SCMatrix3 operator- (const SCMatrix3 &) constβ subtracting oneSCMatrix3from another. it's giving subtraction but make it personal π
π Element Access β the many doors to the same room
not me realizing there are literally four different ways to grab an element. obsessed.
double & elem (int i, int j)β hand overiandjand get a mutable reference to that element. go off, change it, live ur truth πconst double & elem (int i, int j) constβ samei,jsituation but read-only. look but don't touch bestie.double & elem (int i)β just one indexi, still a mutable reference. she's flexible like that.const double & elem (int i) constβ one index, read-only, no funny business.double & operator[] (int i)β bracket notation, mutable reference. very coder-core of her.const double & operator[] (int i) constβ bracket notation but read-only. the const version said "i'm just here to look cute" πdouble & operator() (int i, int j)β call her like a function withiandj, get a mutable reference. function-call syntax in a matrix?? she contains multitudes fr fr.const double & operator() (int i, int j) constβ same call syntax,iandj, read-only. periodt.
π¦ Data + Output
const double * data () constβ hands u aconst double *pointing at the raw data. peek behind the curtain, but respectfully β it'sconst, so no editing πvoid print (std::ostream &=ExEnv::out0()) constβ prints her out. and yes, the stream argument defaults toExEnv::out0()so if u don't pass one she'll just use that. queen of convenience π
πΈ AUTHOR πΈ
Generated automatically by Doxygen for MPQC from the source code. (so if u have beef with the docs, take it up with Doxygen, not me π«Ά)
that's the whole page bestie, every single member function accounted for, nothing skipped, nothing invented. iykyk π
and that's a wrap β¨ this was sc::SCMatrix3(3) from MPQC, Version 2.3.1 β stay iconic, stay const-correct, and go build urself a 3Γ3 matrix ππ¦π
π¦ where this page comes from
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- ubuntu noble: libsc-doc 2.3.1-22build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms