chakravala / chakravala/Grassmann.jl
Nested geometric product error
- Dominant language
- Julia
- Stars
- 514
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
```Julia
julia> @basis 1
(⟨+⟩, v, v₁)
julia> @basis 2
(⟨++⟩, v, v₁, v₂, v₁₂)
julia> A = Chain{V,1}(Chain(v1), Chain(v1))
(1v₁ + 0v₂)v₁ + (1v₁ + 0v₂)v₂
julia> x = Chain(v2)
0v₁ + 1v₂
julia> A ⋅ x
1v₁ + 0v₂
julia> A * x
ERROR: MethodError: no method matching Chain{⟨++⟩,1,Int64,2}(::Float64)
Closest candidates are:
Chain{⟨++⟩,1,Int64,2}(::T) where T<:Number at boot.jl:715
Chain{⟨++⟩,1,Int64,2}(::Simplex{V,0,B,T} where T where B) where {V, G, T, X} at /Users/eschnett/.julia/packages/Grassmann/3DicJ/src/multivectors.jl:44
Chain{⟨++⟩,1,Int64,2}(::Base.TwicePrecision) where T<:Number at twiceprecision.jl:243
...
Stacktrace:
[1] convert(::Type{Chain{⟨++⟩,1,Int64,2}}, ::Float64) at ./number.jl:7
[2] macro expansion at /Users/eschnett/.julia/packages/StaticArrays/1g9bq/src/util.jl:11 [inlined]
[3] convert_ntuple at /Users/eschnett/.julia/packages/StaticArrays/1g9bq/src/util.jl:8 [inlined]
[4] SArray{Tuple{4},Chain{⟨++⟩,1,Int64,2},1,4}(::Tuple{Chain{⟨++⟩,1,Int64,2},Float64,Float64,Chain{⟨++⟩,1,Int64,2}}) at /Users/eschnett/.julia/packages/StaticArrays/1g9bq/src/SArray.jl:28
[5] StaticArray at /Users/eschnett/.julia/packages/StaticArrays/1g9bq/src/convert.jl:4 [inlined]
[6] macro expansion at /Users/eschnett/.julia/packages/Grassmann/3DicJ/src/products.jl:0 [inlined]
[7] *(::Chain{⟨++⟩,1,Chain{⟨++⟩,1,Int64,2},2}, ::Chain{⟨++⟩,1,Int64,2}) at /Users/eschnett/.julia/packages/Grassmann/3DicJ/src/products.jl:856
[8] top-level scope at REPL[67]:1
[9] eval(::Module, ::Any) at ./boot.jl:331
[10] eval_user_input(::Any, ::REPL.REPLBackend) at /Users/eschnett/src/julia-1.4/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
[11] run_backend(::REPL.REPLBackend) at /Users/eschnett/.julia/packages/Revise/0meWR/src/Revise.jl:1075
[12] top-level scope at none:0
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the nested Chain example in Julia, then inspect Grassmann's products.jl around line 856, where the stack trace reports the failing multiplication. Compare the working dot product with A * x and determine the expected geometric-product result; done means the multiplication no longer raises the shown MethodError and has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100