Skip to content

Commit

Permalink
Fixed documentation about inv() vs. dual()
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed Nov 30, 2023
1 parent 5a80285 commit e91f014
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lattices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ A `RealBasis` may be converted to a `ReciprocalBasis`, or vice versa, using eith
`convert(T::Electrum.LatticeBasis, b)` or the constructor `(T::Type{<:Electrum.LatticeBasis})(b)`.
This automatically multiplies or divides by 2π as needed.
The inverse operation `inv` also performs this conversion. This convention may change in a future
update, as the current definition may break other assumptions about matrix inversion.
The [`dual`](@ref) function always returns the dual lattice, which, when left or right multiplied
by the original lattice, returns the identity matrix scaled by 2π. The matrix inverse
[`inv`](@ref Base.inv(::Electrum.LatticeBasis)) returns an `SMatrix{D,D,T}` which returns an
identity matrix when left or right multiplied with the original lattice.
# Interoperability
Expand Down

0 comments on commit e91f014

Please sign in to comment.