source: tol/tol_pkg/FunRn2R/BaseC2.Map.tol @ 0dd5bc2a

1941-docker-image-to-testdevel
Last change on this file since 0dd5bc2a was eddd23a, checked in by Víctor de Buen <vdebuen@…>, 17 years ago

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

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/* -*- mode: C++ -*- */
2//////////////////////////////////////////////////////////////////////////////
3// FILE   : BaseC2.Map.tol
4// PURPOSE: Defines Class @BaseC2.Map
5//////////////////////////////////////////////////////////////////////////////
6
7//////////////////////////////////////////////////////////////////////////////
8Text _.autodoc.member.BaseC2.Map = "Extracts a sub-base of a given base "
9  "whose k-th basic function are given by _.map[k] basic function of "
10  "_.base. Of course _.map cannot have repated indexes to ensure linear "
11  "independence.";
12Class @BaseC2.Map : @BaseC2
13//////////////////////////////////////////////////////////////////////////////
14{
15  @BaseC2 _.base;
16  Set _.map;
17
18  ////////////////////////////////////////////////////////////////////////////
19  Static Text _.autodoc.member.New = "Creates an instance of "
20  "@BaseC2.Map on R^n with specified maximum degree.";
21  Static @BaseC2.Map New(@BaseC2 base, Set map)
22  ////////////////////////////////////////////////////////////////////////////
23  {
24    @BaseC2.Map aux = [[
25      Real _.n = base::_.n;
26      Real _.K = Card(map);
27      @BaseC2 _.base = base;
28      Set _.map = map   
29  ]]};
30
31  ////////////////////////////////////////////////////////////////////////////
32  Static Text _.autodoc.member._build.function.v =
33  "Evaluates the k-th basic function for an "
34  "array of points given as the rows of a matrix ";
35  VMatrix _build.function.v(Real k, VMatrix X)
36  ////////////////////////////////////////////////////////////////////////////
37  {
38    _.base::function.v(_.map[k], X)
39  };
40  ////////////////////////////////////////////////////////////////////////////
41  Static Text _.autodoc.member._build.partial.derivative.1.v =
42  "Evaluates the first partial derivative of k-th basic function for an "
43  "array of points given as the rows of a matrix";
44  VMatrix _build.partial.derivative.1.v(Real k, VMatrix X, Real i)
45  ////////////////////////////////////////////////////////////////////////////
46  {
47    _.base::partial.derivative.1.v(_.map[k], X, i)
48  };
49  ////////////////////////////////////////////////////////////////////////////
50  Static Text _.autodoc.member._build.partial.derivative.2.v =
51  "Evaluates the second partial derivative of k-th basic function for an "
52  "array of points given as the rows of a matrix";
53  VMatrix _build.partial.derivative.2.v(Real k, VMatrix X, Real i, Real j)
54  ////////////////////////////////////////////////////////////////////////////
55  {
56    _.base::partial.derivative.2.v(_.map[k], X, i, j)
57  };
58  ////////////////////////////////////////////////////////////////////////////
59  Static Text _.autodoc.member._build.function.m =
60  "Evaluates all basic functions for an "
61  "array of points given as the rows of a matrix ";
62  VMatrix _build.function.m(VMatrix X)
63  ////////////////////////////////////////////////////////////////////////////
64  {
65    SubCol(_.base::function.m(X),_.map)
66  };
67  ////////////////////////////////////////////////////////////////////////////
68  Static Text _.autodoc.member._build.partial.derivative.1.m =
69  "Evaluates the first partial derivative of all basic functions for an "
70  "array of points given as the rows of a matrix";
71  VMatrix _build.partial.derivative.1.m(VMatrix X, Real i)
72  ////////////////////////////////////////////////////////////////////////////
73  {
74    SubCol(_.base::partial.derivative.1.m(X,i),_.map)
75  };
76  ////////////////////////////////////////////////////////////////////////////
77  Static Text _.autodoc.member._build.partial.derivative.2.m =
78  "Evaluates the second partial derivative of all basic functions for an "
79  "array of points given as the rows of a matrix";
80  VMatrix _build.partial.derivative.2.m(VMatrix X, Real i, Real j)
81  ////////////////////////////////////////////////////////////////////////////
82  {
83    SubCol(_.base::partial.derivative.2.m(X,i,j),_.map)
84  }
85};
Note: See TracBrowser for help on using the repository browser.