Mercurial > forge
comparison extra/nurbs/src/nrb_srf_basisfun_der__.cc @ 12672:59e8aae64812 octave-forge
prepare for release
author | cdf |
---|---|
date | Mon, 17 Aug 2015 10:23:44 +0000 |
parents | 27ae5ff9ec05 |
children |
comparison
equal
deleted
inserted
replaced
12671:20e8aca47b2c | 12672:59e8aae64812 |
---|---|
44 const NDArray u(points.index (idx).squeeze ()); // u = points(1,:); | 44 const NDArray u(points.index (idx).squeeze ()); // u = points(1,:); |
45 | 45 |
46 idx(0) = 1; | 46 idx(0) = 1; |
47 const NDArray v(points.index (idx).squeeze ()); // v = points(2,:); | 47 const NDArray v(points.index (idx).squeeze ()); // v = points(2,:); |
48 | 48 |
49 octave_idx_type npt = u.length (); // npt = length(u); | 49 octave_idx_type npt = u.numel (); // npt = length(u); |
50 | 50 |
51 RowVector M(p+1, 0.0), N (q+1, 0.0); | 51 RowVector M(p+1, 0.0), N (q+1, 0.0); |
52 Matrix Nout(npt, (p+1)*(q+1), 0.0); | 52 Matrix Nout(npt, (p+1)*(q+1), 0.0); |
53 Matrix Bu(npt, (p+1)*(q+1), 0.0); | 53 Matrix Bu(npt, (p+1)*(q+1), 0.0); |
54 Matrix Bv(npt, (p+1)*(q+1), 0.0); | 54 Matrix Bv(npt, (p+1)*(q+1), 0.0); |
74 | 74 |
75 newargs(3) = U; newargs(2) = p; newargs(1) = u; newargs(0) = spu; | 75 newargs(3) = U; newargs(2) = p; newargs(1) = u; newargs(0) = spu; |
76 Matrix Ik = feval (std::string("numbasisfun"), newargs, 1)(0).matrix_value (); // Ik = numbasisfun (spu, u, p, U); | 76 Matrix Ik = feval (std::string("numbasisfun"), newargs, 1)(0).matrix_value (); // Ik = numbasisfun (spu, u, p, U); |
77 | 77 |
78 RowVector spv(v); | 78 RowVector spv(v); |
79 for (octave_idx_type ii(0); ii < v.length(); ii++) | 79 for (octave_idx_type ii(0); ii < v.numel (); ii++) |
80 { | 80 { |
81 spv(ii) = findspan(n, q, v(ii), V); | 81 spv(ii) = findspan(n, q, v(ii), V); |
82 } // spv = findspan (n, q, v, V); | 82 } // spv = findspan (n, q, v, V); |
83 | 83 |
84 newargs(3) = V; newargs(2) = q; newargs(1) = v; newargs(0) = spv; | 84 newargs(3) = V; newargs(2) = q; newargs(1) = v; newargs(0) = spv; |
89 { | 89 { |
90 basisfun (int(spu(ii)), u(ii), p, U, M); | 90 basisfun (int(spu(ii)), u(ii), p, U, M); |
91 NuIkuk.insert (M, ii, 0); | 91 NuIkuk.insert (M, ii, 0); |
92 } // NuIkuk = basisfun (spu, u, p, U); | 92 } // NuIkuk = basisfun (spu, u, p, U); |
93 | 93 |
94 Matrix NvJkvk(v.length (), q+1, 0.0); | 94 Matrix NvJkvk(v.numel (), q+1, 0.0); |
95 for (octave_idx_type ii(0); ii < npt; ii++) | 95 for (octave_idx_type ii(0); ii < npt; ii++) |
96 { | 96 { |
97 basisfun(int(spv(ii)), v(ii), q, V, N); | 97 basisfun(int(spv(ii)), v(ii), q, V, N); |
98 NvJkvk.insert (N, ii, 0); | 98 NvJkvk.insert (N, ii, 0); |
99 } // NvJkvk = basisfun (spv, v, q, V); | 99 } // NvJkvk = basisfun (spv, v, q, V); |