Skip to content

Commit

Permalink
Fixed documentation for blade_count and genericized it
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed May 17, 2024
1 parent 02c501c commit 329c8ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/api/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CliffordNumbers.Metrics.STAP

```@docs
CliffordNumbers.dimension
CliffordNumbers.basis_blades
CliffordNumbers.blade_count
CliffordNumbers.grades
CliffordNumbers.is_degenerate
CliffordNumbers.is_positive_definite
Expand Down
7 changes: 4 additions & 3 deletions src/metrics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ is equal to `2^dimension(s)`.
dimension(s::AbstractSignature) = signed(s.dimensions)

"""
blade_count(s::AbstractSignature) -> Int64
blade_count(s) -> Int
Returns the total number of blades associated with `s`, which is equal to `2^dimension(s)`.
Returns the total number of blades associated with metric signature `s`, which is equal to
`2^dimension(s)`.
"""
blade_count(s::AbstractSignature) = 2^dimension(s)
blade_count(s) = 2^dimension(s)

"""
grades(s::AbstractSignature) -> UnitRange{Int8}
Expand Down

0 comments on commit 329c8ec

Please sign in to comment.