Skip to content

Commit

Permalink
transitioned to DirectSum v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Jun 30, 2019
1 parent d4cbc47 commit dceed14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Leibniz"
uuid = "edad4870-8a01-11e9-2d75-8f02e448fc59"
authors = ["Michael Reed"]
version = "0.0.1"
version = "0.0.2"

[deps]
AbstractTensors = "a8e43f4a-99b7-5565-8bf1-0165161caaea"
Expand All @@ -12,9 +12,11 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
julia = "1"
DirectSum = "0.3"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Grassmann = "4df31cd9-4c27-5bea-88d0-e6a7146666d8"

[targets]
test = ["Test"]
test = ["Test","Grassmann"]
8 changes: 4 additions & 4 deletions src/Leibniz.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Leibniz
using DirectSum, StaticArrays #, Requires
using LinearAlgebra, AbstractTensors, AbstractLattices
import Base: *, ^, +, -, /, show, zero
import DirectSum: value, V0, dualtype, pre
import DirectSum: value, V0, mixedmode, pre

export Differential, Monomial, Derivation, d, ∂, ∇, Δ, @operator

Expand All @@ -32,8 +32,8 @@ value(d::Monomial{V,G,D,T} where {V,G,D}) where T = d.v

sups(O) = O 1 ? DirectSum.sups[O] : ""

show(io::IO,d::Monomial{V,G,D,O,Bool} where G) where {V,D,O} = print(io,value(d) ? "" : "-",pre[dualtype(V)>0 ? 4 : 3],[DirectSum.subs[k] for k DirectSum.shift_indices(V,UInt(D))]...,sups(O))
show(io::IO,d::Monomial{V,G,D,O} where G) where {V,D,O} = print(io,value(d),pre[dualtype(V)>0 ? 4 : 3],[DirectSum.subs[k] for k DirectSum.shift_indices(V,UInt(D))]...,sups(O))
show(io::IO,d::Monomial{V,G,D,O,Bool} where G) where {V,D,O} = print(io,value(d) ? "" : "-",pre[mixedmode(V)>0 ? 4 : 3],[DirectSum.subs[k] for k DirectSum.shift_indices(V,UInt(D))]...,sups(O))
show(io::IO,d::Monomial{V,G,D,O} where G) where {V,D,O} = print(io,value(d),pre[mixedmode(V)>0 ? 4 : 3],[DirectSum.subs[k] for k DirectSum.shift_indices(V,UInt(D))]...,sups(O))
show(io::IO,d::Monomial{V,G,D,0,Bool} where {V,G,D}) = print(io,value(d) ? 1 : -1)
show(io::IO,d::Monomial{V,G,0,O,Bool} where {V,G,O}) = print(io,value(d) ? 1 : -1)
show(io::IO,d::Monomial{V,0,D,O,Bool} where {V,D,O}) = print(io,value(d) ? 1 : -1)
Expand All @@ -50,7 +50,7 @@ show(io::IO,d::Monomial{V,UInt(0)} where V) = print(io,value(d))
indexint(D) = DirectSum.bit2int(DirectSum.indexbits(max(D...),D))

(D::T...) where T<:Integer = Monomial{V0,length(D),indexint(D)}()
(V::S,D::T...) where {S<:VectorSpace,T<:Integer} = Monomial{V,length(D),indexint(D)}()
(V::S,D::T...) where {S<:VectorBundle,T<:Integer} = Monomial{V,length(D),indexint(D)}()

*(r,d::Monomial) = d*r
*(d::Monomial{V,G,D,0} where {V,G,D},r) = r
Expand Down

2 comments on commit dceed14

@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
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 created: JuliaRegistries/General/1670

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.0.2 -m "<description of version>" dceed14cb7e0db63b932ea5e18fe4f9e4fca2417
git push origin v0.0.2

Please sign in to comment.