Skip to content

Commit

Permalink
rewrite planar preprocessors (#95)
Browse files Browse the repository at this point in the history
* rewrite constructbraidingtensor preprocessor

* some more planar fixes

* fix construct and remove braidingtensor preprocessors

* Apply suggestions from code review

Co-authored-by: Lukas <[email protected]>

* update Project.toml and fix rebase result

---------

Co-authored-by: Lukas <[email protected]>
  • Loading branch information
Jutho and lkdvos authored Jan 5, 2024
1 parent bb2b4cf commit b62a772
Show file tree
Hide file tree
Showing 6 changed files with 348 additions and 231 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ HalfIntegers = "1"
LRUCache = "1.0.2"
PackageExtensionCompat = "1"
Strided = "2"
TensorOperations = "4.0.6 - 4.0.7"
TensorOperations = "4.1"
TupleTools = "1.1"
VectorInterface = "0.4"
WignerSymbols = "1,2"
Expand Down
4 changes: 4 additions & 0 deletions src/planar/analyzers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ function get_possible_planar_indices(ex)
end
end
return inds
elseif isexpr(ex, :call) && ex.args[1] == :/
return get_possible_planar_indices(ex.args[2])
elseif isexpr(ex, :call) && ex.args[1] == :\
return get_possible_planar_indices(ex.args[3])
else
return Any[]
end
Expand Down
2 changes: 1 addition & 1 deletion src/planar/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function _plansor(expr, kwargs...)

tparser = TO.tensorparser(expr, kwargs...)
pparser = planarparser(expr, kwargs...)
insert!(tparser.preprocessors, 5, _remove_braidingtensors)
insert!(tparser.preprocessors, 4, _remove_braidingtensors)
tensorex = tparser(expr)
planarex = pparser(expr)

Expand Down
Loading

0 comments on commit b62a772

Please sign in to comment.