Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/basis/basis-vars.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/basis/basis-vars.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1910, Tue Jun 5 12:02:36 2012 UTC revision 1911, Tue Jun 5 13:51:17 2012 UTC
# Line 286  Line 286 
286    (* functions *)    (* functions *)
287      val fn_atan2 = monoVar (N.fn_atan2, [Ty.realTy, Ty.realTy] --> Ty.realTy)      val fn_atan2 = monoVar (N.fn_atan2, [Ty.realTy, Ty.realTy] --> Ty.realTy)
288    
 (* the following is depreciated in favor of the infix operator *)  
     val fn_convolve = polyVar (N.fn_convolve, all([DK, NK, SK],  
             fn [Ty.DIFF k, Ty.DIM d, Ty.SHAPE dd] => let  
                 val k = Ty.DiffVar(k, 0)  
                 val d = Ty.DimVar d  
                 val dd = Ty.ShapeVar dd  
                 in  
                   [Ty.T_Kernel k, Ty.T_Image{dim=d, shape=dd}]  
                     --> field(k, d, dd)  
                 end))  
   
289      val fn_cos = monoVar (N.fn_cos, [Ty.realTy] --> Ty.realTy)      val fn_cos = monoVar (N.fn_cos, [Ty.realTy] --> Ty.realTy)
290    
291      local      local
# Line 307  Line 296 
296              end              end
297      in      in
298      val op_cross = monoVar (N.op_cross, crossTy)      val op_cross = monoVar (N.op_cross, crossTy)
     val fn_cross = monoVar (N.fn_cross, crossTy)  
299      end      end
300    
   (* the depriciated 'dot' function *)  
     val fn_dot = polyVar (N.fn_dot, allNK(fn tv => let  
           val t = tensor[Ty.DimVar tv]  
           in  
             [t, t] --> Ty.realTy  
           end))  
   
301    (* the inner product operator (including dot product) is treated as a special case in the    (* the inner product operator (including dot product) is treated as a special case in the
302     * typechecker.  It is not included in the basis environment, but we define its type scheme     * typechecker.  It is not included in the basis environment, but we define its type scheme
303     * here.  There is an implicit constraint on its type to have the following scheme:     * here.  There is an implicit constraint on its type to have the following scheme:
# Line 346  Line 327 
327                    [Ty.T_String] --> Ty.T_Image{dim=d, shape=dd}                    [Ty.T_String] --> Ty.T_Image{dim=d, shape=dd}
328                  end))                  end))
329    
330        val fn_fmod = monoVar (N.fn_fmod, [Ty.realTy, Ty.realTy] --> Ty.realTy)
331    
332        val fn_log10 = monoVar (N.fn_log10, [Ty.realTy] --> Ty.realTy)
333        val fn_ln = monoVar (N.fn_ln, [Ty.realTy] --> Ty.realTy)
334    
335      val fn_max = monoVar (N.fn_max, [Ty.realTy, Ty.realTy] --> Ty.realTy)      val fn_max = monoVar (N.fn_max, [Ty.realTy, Ty.realTy] --> Ty.realTy)
336      val fn_min = monoVar (N.fn_min, [Ty.realTy, Ty.realTy] --> Ty.realTy)      val fn_min = monoVar (N.fn_min, [Ty.realTy, Ty.realTy] --> Ty.realTy)
337    
# Line 373  Line 359 
359                [vt1, vt2] --> mt                [vt1, vt2] --> mt
360              end              end
361      in      in
     val fn_outer = polyVar (N.fn_outer, all([NK, NK], mkOuter))  
362      val op_outer = polyVar (N.op_outer, all([NK, NK], mkOuter))      val op_outer = polyVar (N.op_outer, all([NK, NK], mkOuter))
363      end      end
364    
     val fn_pow = monoVar (N.fn_pow, [Ty.realTy, Ty.realTy] --> Ty.realTy)  
   
365      val fn_principleEvec = polyVar (N.fn_principleEvec, all([NK],      val fn_principleEvec = polyVar (N.fn_principleEvec, all([NK],
366              fn [Ty.DIM d] => let              fn [Ty.DIM d] => let
367                  val d = Ty.DimVar d                  val d = Ty.DimVar d

Legend:
Removed from v.1910  
changed lines
  Added in v.1911

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0