Skip to content

Commit

Permalink
refined grade parity of tangent basis
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Oct 6, 2019
1 parent 2826467 commit b6a79ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/parity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ for side ∈ (:left,:right)
@pure $p(V::Bits,B::Bits,N::Int) = $p(count_ones(V&B),sum(indices(B,N)),count_ones(B),N)
@pure function $p(V::Signature,B,G=count_ones(B))
o = hasorigin(V) && (hasinf(V) ? iszero(B&UInt(1))&(!iszero(B&UInt(2))) : isodd(B))
$p(count_ones(value(V)&B),sum(indices(B,ndims(V))),G,ndims(V)-diffvars(V))o
b = B&(UInt(1)<<(ndims(V)-diffvars(V))-1)
$p(count_ones(value(V)&b),sum(indices(b,ndims(V))),count_ones(b),ndims(V)-diffvars(V))o
end
@pure function $p(V::DiagonalForm,B,G=count_ones(B))
ind = indices(B,ndims(V))
ind = indices(B&(UInt(1)<<(ndims(V)-diffvars(V))-1),ndims(V))
g = prod(V[ind])
$p(0,sum(ind),G,ndims(V)-diffvars(V)) ? -(g) : g
end
Expand Down

2 comments on commit b6a79ab

@chakravala
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/4124

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" b6a79abe2adbfe7d9e0bba6e3bb8e4238349436d
git push origin v0.3.1

Please sign in to comment.