Skip to content

Commit

Permalink
Remove (c)transpose definitions from operators.jl. Add them to string.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed Nov 26, 2014
1 parent 9d4924b commit af083ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ mod1{T<:Real}(x::T, y::T) = y-mod(y-x,y)
rem1{T<:Real}(x::T, y::T) = rem(x-1,y)+1
fld1{T<:Real}(x::T, y::T) = fld(x-1,y)+1

# transpose
transpose(x) = x
ctranspose(x) = conj(transpose(x))
conj(x) = x

# transposed multiply
Ac_mul_B (a,b) = ctranspose(a)*b
A_mul_Bc (a,b) = a*ctranspose(b)
Expand Down
3 changes: 3 additions & 0 deletions base/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ eltype{T<:AbstractString}(::Type{T}) = Char
(*)(s::AbstractString...) = string(s...)
(^)(s::AbstractString, r::Integer) = repeat(s,r)

transpose(s::AbstractString) = s
conj(s::AbstractString) = s

length(s::DirectIndexString) = endof(s)
function length(s::AbstractString)
i = start(s)
Expand Down

0 comments on commit af083ef

Please sign in to comment.