Skip to content

Commit

Permalink
Update src/BitStringAddresses/occupationnumberfs.jl
Browse files Browse the repository at this point in the history
Co-authored-by: mtsch <matijacufar@gmail.com>
  • Loading branch information
joachimbrand and mtsch authored Jan 16, 2024
1 parent a689e70 commit b4b2ec6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BitStringAddresses/occupationnumberfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function print_address(io::IO, ofs::OccupationNumberFS{M,T}; compact=false) wher
end

onr(ofs::OccupationNumberFS) = ofs.onr
num_occupied_modes(ofs::OccupationNumberFS) = mapreduce(!iszero, +, onr(ofs))
num_particles(ofs::OccupationNumberFS) = sum(onr(ofs))|>Int
num_occupied_modes(ofs::OccupationNumberFS) = count(!iszero, onr(ofs))
num_particles(ofs::OccupationNumberFS) = Int(sum(onr(ofs)))
# `num_modes` does not have to be defined here, because it is defined for the abstract type

"""
Expand Down

0 comments on commit b4b2ec6

Please sign in to comment.