sc::SCVector3(3)
πΈ sc::SCVector3 πΈ β Library Functions Manual
okay so bestie, welcome to sc::SCVector3 π it's a 3D vector class from MPQC, and this whole page is basically one giant SYNOPSIS flex. No long DESCRIPTION section, no vibes essay β just the full roster of constructors, operators and accessors, and we're gonna read every single one together. grab a strawberry π, hydrate, and let's go.
β¨ SYNOPSIS β¨
π Public Member Functions
SCVector3 (const double p[3])β build one straight out of a three-elementdoublearray. that's it, that's the constructor.SCVector3 (double d)β onedoublein, vector out.SCVector3 (double x, double y, double z)β the classic: three coords, one vector. main character energy πSCVector3 (const SCVector3 &p)β copy constructor, copying aSCVector3from anotherSCVector3.SCVector3 (const RefSCVector &)β constructor taking aconst RefSCVector &. no, the parameter has no name, that's just how it's written, don't @ me πSCVector3 (const Ref< KeyVal > &)β constructor taking aconst Ref< KeyVal > &. also unnamed. iconic of them.void normalize ()β the normalize call. it does the normalize thing, bestie.SCVector3 operator- ()β unary minus, hands you back anSCVector3.SCVector3 operator* (double) constβ multiply by adouble, get anSCVector3back. const-qualified, so it behaves. πvoid operator= (const double *x)β assignment from aconst double *namedx.void operator= (const SCVector3 &x)β assignment from anotherSCVector3namedx.void operator= (double d)β assignment from a plaindoublenamedd.void operator-= (const SCVector3 &v)β subtract-and-assign, other vector isv.void operator+= (const SCVector3 &v)β add-and-assign, other vector isv.void operator*= (double m)β multiply-and-assign bym.SCVector3 operator+ (const SCVector3 &v) constβ vector plus vector, returns a freshSCVector3, and it'sconstso it won't touch anything. π«ΆSCVector3 operator- (const SCVector3 &v) constβ vector minus vector, alsoconst, also returns anSCVector3.double dot (const SCVector3 &v) constβ thedotone. takes aconst SCVector3 &v, gives you adouble. the name is literally the description, iykyk.SCVector3 cross (const SCVector3 &) constβ thecrossone. takes an unnamedconst SCVector3 &, returns anSCVector3.SCVector3 perp_unit (const SCVector3 &) constβperp_unit, taking an unnamedconst SCVector3 &, returning anSCVector3. no cap.void spherical_coord (double theta, double phi, double r)β sets spherical coords fromtheta,phiandr. note the order: theta, phi, r. don't flip it bestie πvoid spherical_to_cartesian (SCVector3 &cart) constβ converts to cartesian, dropping the result into theSCVector3 &cartyou pass in. const method, so it's not messing with itself.double maxabs () constβmaxabs, returns adouble.double dist (const SCVector3 &) constβ distance to another (unnamed)SCVector3, returns adouble.void rotate (double theta, SCVector3 &v)β rotate bythetawith anSCVector3 &valong for the ride.double norm () constβnorm, returns adouble. we love a const method πdouble & elem (int xyz)β grab an element by indexxyz, and you get adouble &back. a real reference. handle with care.const double & elem (int xyz) constβ the const overload: indexxyz,const double &back. no touching.double & operator[] (int i)β bracket access with indexi, returnsdouble &. slay.const double & operator[] (int i) constβ const bracket access,const double &back.double & operator() (int i)β call-operator access with indexi, returnsdouble &.const double & operator() (int i) constβ const call-operator access,const double &back.const double * data () constβ hands you aconst double *to the underlying data. read-only situation.double * data ()β the non-constdata (), hands you a plaindouble *. yes bestie, that's a writable pointer. be normal about it πdouble & x ()β reference tox.double & y ()β reference toy.double & z ()β reference toz.const double & x () constβ const reference tox.const double & y () constβ const reference toy.const double & z () constβ const reference toz.double & r ()β reference tor.double & theta ()β reference totheta.double & phi ()β reference tophi.const double & r () constβ const reference tor.const double & theta () constβ const reference totheta.const double & phi () constβ const reference tophi.void print (std::ostream &=ExEnv::out0()) constβ print it out, with the stream defaulting toExEnv::out0(). note the&=in the signature, that's exactly how it's written, copy it character for character or perish π
every single one of these is const-qualified or not exactly as listed β the const-ness is part of the contract, so don't go assuming you can mutate through the const ones. nope. not today. β¨
π«Ά Friends
class SCMatrix3β yes,SCMatrix3is a friend. the friendship is canon, it's right there in the synopsis. π
π Author
Generated automatically by Doxygen for MPQC from the source code. not a human, just a little robot that reads headers and writes manpages π§
and that's the whole page bestie, we ate and left no crumbs π
this was sc::SCVector3(3) from the MPQC Library Functions Manual, Version 2.3.1 β go forth and vector responsibly π¦β
π¦ 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