From 062567193682ac5e10bad1865eb7ef736fdffb95 Mon Sep 17 00:00:00 2001 From: Jiahao Chen Date: Sat, 19 Apr 2014 09:30:01 -0400 Subject: [PATCH] =?UTF-8?q?Add=20=E2=8A=97=20as=20synonym=20for=20kron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/exports.jl | 1 + base/operators.jl | 2 ++ src/julia-parser.scm | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/base/exports.jl b/base/exports.jl index c862ebfda3323..393b975158c68 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -224,6 +224,7 @@ export |, ~, :, + ⊗, A_ldiv_B!, A_ldiv_Bc, A_ldiv_Bt, diff --git a/base/operators.jl b/base/operators.jl index f6674e9153873..c9f938267fbbd 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -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 # mod returns in [0,y) whereas mod1 returns in (0,y] mod1{T<:Real}(x::T, y::T) = y-mod(y-x,y) @@ -396,6 +397,7 @@ export |>, <|, ~, + ⊗, colon, hcat, vcat, diff --git a/src/julia-parser.scm b/src/julia-parser.scm index a87aa72ca0509..55c391c428ebc 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -12,7 +12,7 @@ (: |..|) (+ - |.+| |.-| |\|| $) (<< >> >>> |.<<| |.>>| |.>>>|) - (* / |./| % |.%| & |.*| |\\| |.\\|) + (* / |./| % |.%| & ⊗ |.*| |\\| |.\\|) (// .//) (^ |.^|) (|::|)