Ignore:
Timestamp:
Dec 9, 2009, 8:59:51 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
dea29fb
Parents:
9776d22
Message:

Preparing for derivation and integration methods

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1770 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol_pkg/MulVarFunAprox/DesignC2.tol

    r9776d22 r2fb8329  
    44// PURPOSE: Defines Class @DesignC2
    55//////////////////////////////////////////////////////////////////////////////
     6
    67
    78//////////////////////////////////////////////////////////////////////////////
    … …  
    9192
    9293  //////////////////////////////////////////////////////////////////////////////
    93     VMatrix build.obs(VMatrix X, VMatrix X.h)
     94    VMatrix build.obs.eval(VMatrix X, VMatrix X.h, FunRn2R::@BaseC2.Eval eval)
    9495  //////////////////////////////////////////////////////////////////////////////
    9596  {
    … …  
    109110    WriteLn("TRACE "+_MID+"2");
    110111    Set X.weight = get.X.weight(X.dif);
    111     WriteLn("TRACE "+_MID+"2");
    112     FunRn2R::@BaseC2 b = get.base(0);
    113112    WriteLn("TRACE "+_MID+"2");
    114113    Matrix QX.triplet = Group("ConcatRows", For(1,_.X.maxNeighbour,Matrix(Real i)
    … …  
    120119      VMatrix Xdif.i = SubRow(X.dif[i],sel.rows);
    121120      VMatrix X.j.i = SubRow(X.j,sel.rows);
    122       Real b::upgrade.cache(Xdif.i,0);
     121      Real eval::upgrade.cache(Xdif.i);
    123122      Group("ConcatRows", For(1,_.K,Matrix(Real k)
    124123      {
    125         VMatrix pk = b::function.v(k,Xdif.i);
     124        VMatrix pk = eval::evaluate.v(k,Xdif.i);
    126125        VMatrix qk = wi$*pk;
    127126        VMat2Mat(X.j.i | (X.hiK+k) | qk)
    … …  
    130129    Pack(Convert(Triplet(QX.triplet, m, _.N),"Cholmod.R.Sparse"))
    131130  })};
     131
     132  //////////////////////////////////////////////////////////////////////////////
     133    VMatrix build.obs(VMatrix X, VMatrix X.h)
     134  //////////////////////////////////////////////////////////////////////////////
     135  {
     136    FunRn2R::@BaseC2.Eval.Function eval =
     137     FunRn2R::@BaseC2.Eval.Function::New(get.base(0));
     138    build.obs.eval(X,X.h,eval)
     139  };
     140  //////////////////////////////////////////////////////////////////////////////
     141    VMatrix build.obs.partial.derivative.1(VMatrix X, VMatrix X.h, Real s)
     142  //////////////////////////////////////////////////////////////////////////////
     143  {
     144    FunRn2R::@BaseC2.Eval.Partial.Derivative.1 eval =
     145     FunRn2R::@BaseC2.Eval.Partial.Derivative.1::New(get.base(0), s);
     146    build.obs.eval(X,X.h,eval)
     147  };
     148  //////////////////////////////////////////////////////////////////////////////
     149    VMatrix build.obs.partial.derivative.2(VMatrix X, VMatrix X.h,
     150                                           Real s1, Real s2)
     151  //////////////////////////////////////////////////////////////////////////////
     152  {
     153    FunRn2R::@BaseC2.Eval.Partial.Derivative.2 eval =
     154     FunRn2R::@BaseC2.Eval.Partial.Derivative.2::New(get.base(0), s1, s2);
     155    build.obs.eval(X,X.h,eval)
     156  };
     157  //////////////////////////////////////////////////////////////////////////////
     158    VMatrix build.obs.partial.integrate.1(VMatrix X, VMatrix X.h, Real s)
     159  //////////////////////////////////////////////////////////////////////////////
     160  {
     161    FunRn2R::@BaseC2.Eval.Partial.Integrate.1 eval =
     162     FunRn2R::@BaseC2.Eval.Partial.Integrate.1::New(get.base(0), s);
     163    build.obs.eval(X,X.h,eval)
     164  };
    132165  //////////////////////////////////////////////////////////////////////////////
    133166    VMatrix build.border.prior(Real void)
Note: See TracChangeset for help on using the changeset viewer.