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

SCM Repository

[diderot] Diff of /trunk/src/compiler/fields/kernel.sml
ViewVC logotype

Diff of /trunk/src/compiler/fields/kernel.sml

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

revision 155, Fri Jul 9 21:38:01 2010 UTC revision 165, Wed Jul 21 15:20:53 2010 UTC
# Line 20  Line 20 
20    (* kernel name *)    (* kernel name *)
21      val name : kernel -> string      val name : kernel -> string
22    
23      (* are two kernels the same *)
24        val same : kernel * kernel -> bool
25    
26      (* hash value *)
27        val hash : kernel -> word
28    
29    (* kernel support *)    (* kernel support *)
30      val support : kernel -> int      val support : kernel -> int
31    
# Line 83  Line 89 
89    
90      datatype kernel = K of {      datatype kernel = K of {
91          name : string,          name : string,
92            id : Stamp.stamp,       (* unique ID *)
93          support : int,          (* number of samples to left/right *)          support : int,          (* number of samples to left/right *)
94          curves : curve option array (* cache of curves indexed by differentiation level *)          curves : curve option array (* cache of curves indexed by differentiation level *)
95        }        }
# Line 107  Line 114 
114    (* kernel support *)    (* kernel support *)
115      fun support (K{support, ...}) = support      fun support (K{support, ...}) = support
116    
117        fun hash (K{id, ...}) = Stamp.hash id
118        fun same (K{id=a, ...}, K{id=b, ...}) = Stamp.same (a, b)
119    
120    (* representation of i'th derivative of the kernel *)    (* representation of i'th derivative of the kernel *)
121      fun curve (K{curves, ...}, k) = (case A.sub(curves, k)      fun curve (K{curves, ...}, k) = (case A.sub(curves, k)
122             of SOME curve => curve             of SOME curve => curve
# Line 152  Line 162 
162                    }                    }
163              in              in
164                A.update (curves, 0, SOME curve0);                A.update (curves, 0, SOME curve0);
165                K{name=name, support=support, curves=curves}                K{name=name, id=Stamp.new(), support=support, curves=curves}
166              end              end
167      in      in
168      val tent : kernel = mkKernel{       (* linear interpolation *)      val tent : kernel = mkKernel{       (* linear interpolation *)

Legend:
Removed from v.155  
changed lines
  Added in v.165

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