You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document export of package functions in LorentzVectorBase (#33)
* Document export of package functions in LorentzVectorBase
Added notes on exporting package functions and provided an example module.
* Clarify export status of package functions
* spelling from @Copilot
Copy file name to clipboardExpand all lines: docs/src/10-interface.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,22 @@ This allows users to choose more descriptive or domain-specific terminology with
120
120
|`azimuthal_angle`|`phi`|
121
121
|`pseudorapidity`|`eta`|
122
122
123
+
124
+
Note, that most of the package functions are not exported. They can always be called with `LorentzVectorBase.` prefix.
125
+
For convenience, these methods can be exported in custom packages that utilize LorentzVectorBase.
126
+
For example, as follows,
127
+
128
+
```julia
129
+
module Custom4Vector
130
+
131
+
import LorentzVectorBase: invariant_mass
132
+
export invariant_mass
133
+
134
+
end
135
+
```
136
+
137
+
See also [an example](https://github.com/mmikhasenko/FourVectors.jl/blob/main/src/FourVectors.jl#L28-L33) of exporting multiple selected methods in a loop.
138
+
123
139
## Coordinate System Tags
124
140
125
141
The following coordinate systems are supported via tags like `XYZT()`, `PtEtaPhiM()`, etc.:
0 commit comments