Skip to content

Commit

Permalink
Removed functions that widen grades for multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
brainandforce committed May 8, 2024
1 parent 42c6008 commit 554f035
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Calculates the geometric product of `x` and `y`, returning the smallest type whi
represent all nonzero basis blades of the result.
"""
@inline function *(x::AbstractCliffordNumber{Q}, y::AbstractCliffordNumber{Q}) where Q
return mul(scalar_promote(widen_grade_for_mul(x), widen_grade_for_mul(y))...)
return mul(scalar_promote(x, y)...)
end

# KVector{0,Q} is just a scalar compatible with an AbstractCliffordNumber{Q}
Expand Down
4 changes: 3 additions & 1 deletion src/multiply.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ function nondegenerate_mask(a::BitIndex{Q}, B::NTuple{L,BitIndex{Q}}) where {L,Q
return map(b -> nondegenerate_mult(a, b), B)
end

#=
"""
CliffordNumbers.widen_for_mul(x::AbstractCliffordNumber)
CliffordNumbers.widen_grade_for_mul(x::AbstractCliffordNumber)
Widens `x` to an `EvenCliffordNumber`, `OddCliffordNumber`, or `CliffordNumber` as appropriate
for the fast multiplication kernel.
Expand All @@ -46,6 +47,7 @@ function widen_grade_for_mul(x::AbstractCliffordNumber)
all(iodd, nonzero_grades(x)) && return OddCliffordNumber(x)
return CliffordNumber(x)
end
=#

#---Grade filters----------------------------------------------------------------------------------#
"""
Expand Down

0 comments on commit 554f035

Please sign in to comment.