[−][src]Crate calcify
Calcify
A crate for 3-D and 4-D vector and matrix algebra, conceived for use in physics simulations. Builds out from a basic ThreeVec struct including most commonly used operations built in. Includes physics constants, 3 and 4-D vectors and matrices and many associated operations, collections, histograms, and output trees, which are serialized in json.
Notes
-
Branches can now be extracted from Trees, but this is not an ideal process. Trees should still be seen as containers for output only.
-
All physics constants are exported in the top in SI units. To retrieve them in Planck or natural units call calcify::Consts::planck() or calcify::Consts::natural().
-
FourMat::lambda() has been replaced by fn boost(initial: FourVec, v: ThreeVec). The math has been changed.
todo
- Plotting tool
- to_bytes
- Four-Momentum
Modules
consts | consts module |
Structs
Bin | A histogram is a Collection of Bins |
Branch | Branch |
Collection | A wrapper around the std::vec::vec |
FourMat | Four Matrix |
FourVec | Four Vector |
ThreeMat | Three Matrix |
ThreeVec | Three Vector |
Tree | Tree of Collections for saving to a file. |
Enums
Sinv | Variants of S space-time invariant |
Traits
Serializable | Must return a json compliant String |
Functions
beta | Beta factor, |v| over the speed pf light in a vacuum, in SI. |
boost | Returns a FourVec, inside a Result, boosted into a frame of arbitrary velocity v. |
degrees_between | Return the angle between two vectors in degrees |
gamma | Gamma, the lorentz factor, in SI. |
radians_between | Return the angle between two vectors in radians |