Changeset dac8deb in tol for tol_pkg/FunRn2R/BaseC2.Cache.tol
- Timestamp:
- Dec 15, 2009, 5:39:55 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 8fd1737
- Parents:
- 8642d7e
- File:
-
- 1 edited
-
tol_pkg/FunRn2R/BaseC2.Cache.tol (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol_pkg/FunRn2R/BaseC2.Cache.tol
r8642d7e rdac8deb 17 17 Set _.partial.derivative.1 = Copy(Empty); 18 18 Set _.partial.derivative.2 = Copy(Empty); 19 Set _.partial.integrate.1 = Copy(Empty); 19 20 20 21 //Returns the cached value of the k-th basic function for an … … 37 38 Real j_ = Min(i,j); 38 39 SubCol(_.partial.derivative.2[i_][j_],[[k]]) 40 }; 41 //Returns the cached value of the first partial integration of k-th basic 42 //function for an array of points given as the rows of a matrix 43 VMatrix partial.integrate.1.v(Real k, VMatrix X, Real i) 44 { 45 SubCol(_.partial.integrate.1[i],[[k]]) 39 46 }; 40 47 … … 62 69 }; 63 70 71 //Evaluates the first partial integration of all basic functions, one in 72 //each returned column, for an array of points given as the rows of a 73 //matrix 74 VMatrix partial.integrate.1.m(VMatrix X, Real i) 75 { 76 _.partial.integrate.1[i] 77 }; 64 78 //Some bases are more efficient using cache 65 Real _build.cache(VMatrix X, Real order)79 Real _build.cache(VMatrix X, Real deriv.order, Real integ.order) 66 80 { 67 VMatrix If(order>=0, { _.function.r := 68 _build.function.m(X) 69 }); 70 Set If(order>=1, { _.partial.derivative.1 := 81 VMatrix _.function := _build.function.m(X); 82 Set If(deriv.order>=1, { _.partial.derivative.1 := 71 83 For(1, _.n, VMatrix(Real i) 72 84 { _build.partial.derivative.1.m(X,i) }) 73 85 }); 74 Set If( order>=2, { _.partial.derivative.2 :=86 Set If(deriv.order>=2, { _.partial.derivative.2 := 75 87 For(1, _.n, Set(Real i) 76 88 { … … 81 93 }) 82 94 }); 95 Set If(integ.order>=1, { _.partial.integrate.1 := 96 For(1, _.n, VMatrix(Real i) 97 { _build.partial.integrate.1.m(X,i) }) 98 }); 83 99 True 84 100 }
Note: See TracChangeset
for help on using the changeset viewer.
