Skip to content

Commit

Permalink
Add ⊗ as synonym for kron
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahao committed Apr 19, 2014
1 parent 7f615cf commit 0625671
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export
|,
~,
:,
,
A_ldiv_B!,
A_ldiv_Bc,
A_ldiv_Bt,
Expand Down
2 changes: 2 additions & 0 deletions base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ fld{T<:Real}(x::T, y::T) = convert(T,round((x-mod(x,y))/y))
# operator alias
const % = rem
.%(x::Real, y::Real) = x%y
const = kron

This comment has been minimized.

Copy link
@StefanKarpinski

StefanKarpinski May 5, 2014

Member

I'm not convinced this alias should be defined by default. It may be better to allow users to choose their own meaning for ⊗.

This comment has been minimized.

Copy link
@StefanKarpinski

StefanKarpinski May 5, 2014

Member

Oh, I see, nevermind. This was later reverted, but the operator stayed.


# mod returns in [0,y) whereas mod1 returns in (0,y]
mod1{T<:Real}(x::T, y::T) = y-mod(y-x,y)
Expand Down Expand Up @@ -396,6 +397,7 @@ export
|>,
<|,
~,
,
colon,
hcat,
vcat,
Expand Down
2 changes: 1 addition & 1 deletion src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(: |..|)
(+ - |.+| |.-| |\|| $)
(<< >> >>> |.<<| |.>>| |.>>>|)
(* / |./| % |.%| & |.*| |\\| |.\\|)
(* / |./| % |.%| & |.*| |\\| |.\\|)
(// .//)
(^ |.^|)
(|::|)
Expand Down

3 comments on commit 0625671

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

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

That easy, huh?

@jiahao
Copy link
Member Author

@jiahao jiahao commented on 0625671 Apr 19, 2014

Choose a reason for hiding this comment

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

You're not cross, are you?

@pao
Copy link
Member

@pao pao commented on 0625671 Apr 19, 2014

Choose a reason for hiding this comment

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

Is someone collecting @jiahao's puns for a future Julia joke book?

Please sign in to comment.