Whole-array inequalities between matrices can have context-dependent 
meanings. For example, you can define a very useful ordering among the set 
of positive semidefinite symmetric matrices - this is used in constrained 
optimization (semidefinite programming) since the space of positive 
semidefinite matrices is a convex cone. There are special symbols often 
used for this (\succeq, \preceq, etc) but not always consistently.


On Sunday, April 6, 2014 1:57:35 AM UTC-7, Mikael Simberg wrote:
>
>  
>  
>  
> On Sat, Apr 5, 2014, at 15:45, [email protected] <javascript:> wrote:
>
> Sorry, the dot makes it not clear, but even more confusing. Actually, ".*" 
> reads like dot (.) product (*).
> E.g. in Python/Numpy and IDL +,-,*,/ are used for element-wise operation.
>  
> Moreover,
> julia> [1 2 3] + [1 2 3]
> 1x3 Array{Int64,2}:
>  2  4  6
> julia> [1 2 3] * [1 2 3]
> DimensionMismatch("*")
>  
> The more complicated symbols (as ".*") should be used for more complicated 
> operations like inner/outer product, i.e. when I have to think about 
> dimension shapes.
>  
> In which situation I can use "<" for arrays? Never? Then we carry all the 
> time the dot with us.
>  
>  
> Just an idea: I don't know how common this use would be in code, but a < b 
> (without the dot) could be used to compare if array b dominates a i.e. all 
> elements of b are strictly greater than a. Likewise for >, <= and >=. This 
> is certainly used as mathematical notation and they're currently not 
> defined in Julia and could be implemented more efficiently than the 
> element-wise comparisons. 
>  
>  
> So I find a very inconvenient decision was made.
>  
> Friedrich
>  
>  
>
> The `.` in `.<` makes it clear that the operation is element-wise; this is 
> especially important in `.*`, for example.
>  
>  
>  

Reply via email to