mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-27 09:15:27 +01:00
change name IDSymbol -> IdSymbol
This commit is contained in:
parent
6fe2e62836
commit
31fe54b75b
@ -4,9 +4,8 @@ import Base: length, ==, hash, show
|
|||||||
import Base: one, inv, reduce, *, ^
|
import Base: one, inv, reduce, *, ^
|
||||||
|
|
||||||
export GSymbol, GWord
|
export GSymbol, GWord
|
||||||
export reduce!, reduce
|
|
||||||
|
|
||||||
export IDSymbol, change_pow, reduce!, reduce
|
export IdSymbol, change_pow
|
||||||
|
|
||||||
abstract GSymbol
|
abstract GSymbol
|
||||||
|
|
||||||
@ -20,9 +19,9 @@ end
|
|||||||
|
|
||||||
length(s::GSymbol) = (s.pow == 0 ? 0 : 1)
|
length(s::GSymbol) = (s.pow == 0 ? 0 : 1)
|
||||||
|
|
||||||
IDSymbol(T::Type{GSymbol}) = throw(ArgumentError("Define IDSymbol(::Type{$T}) which is the identity element for Your type!"))
|
IdSymbol(T::Type{GSymbol}) = throw(ArgumentError("Define IdSymbol(::Type{$T}) which is the identity element for Your type!"))
|
||||||
|
|
||||||
one{T<:GSymbol}(::Type{T}) = IDSymbol(T)
|
one{T<:GSymbol}(::Type{T}) = IdSymbol(T)
|
||||||
one(s::GSymbol) = one(typeof(s))
|
one(s::GSymbol) = one(typeof(s))
|
||||||
|
|
||||||
(*){T<:GSymbol}(s::T, t::T) = return GWord{T}([s])*t
|
(*){T<:GSymbol}(s::T, t::T) = return GWord{T}([s])*t
|
||||||
|
Loading…
Reference in New Issue
Block a user