Skip to content

Commit 78f6aea

Browse files
committed
fixed CGA complement bug
1 parent 97c9678 commit 78f6aea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DirectSum"
22
uuid = "22fd7b30-a8c0-5bf2-aabe-97783860d07c"
33
authors = ["Michael Reed"]
4-
version = "0.5.7"
4+
version = "0.5.8"
55

66
[deps]
77
ComputedFieldTypes = "459fdd68-db75-56b8-8c15-d717a790f88e"

src/operations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ end
318318
## complement parity
319319

320320
@pure parityrighthodge(V::Int,B,G,N=nothing) = isodd(V)parityright(V,B,G,N)
321-
@pure paritylefthodge(V::Int,B,G,N) = (isodd(G) && iseven(N)) parityrightgrade(V,B,G,N)
321+
@pure paritylefthodge(V::Int,B,G,N) = (isodd(G) && iseven(N)) parityrighthodge(V,B,G,N)
322322
@pure parityright(V::Int,B,G,N=nothing) = isodd(B+Int((G+1)*G/2))
323323
@pure parityleft(V::Int,B,G,N) = (isodd(G) && iseven(N)) parityright(V,B,G,N)
324324

@@ -366,8 +366,8 @@ for side ∈ (:left,:right)
366366
end
367367
@pure function $pg(V::$Q,B,G=count_ones(B))
368368
ind = indices(B&(UInt(1)<<(ndims(V)-diffvars(V))-1),ndims(V))
369-
g = prod(V[ind])
370-
$p(0,sum(ind),G,ndims(V)-diffvars(V)) ? -(g) : g
369+
g,c = prod(V[ind]), hasconformal(V) && (B&UInt(3) == UInt(2))
370+
$p(0,sum(ind),G,ndims(V)-diffvars(V))c ? -(g) : g
371371
end
372372
end
373373
end

0 commit comments

Comments
 (0)