| 593 | // a (n-1-reject)-tuple [nonexistent when reject=n-1]. |
| 594 | template <int32_t N, typename Real> |
| 595 | Vector<N - 1, Real> Project(Vector<N, Real> const& v, int32_t reject) |
| 596 | { |
| 597 | static_assert(N >= 2, "Invalid dimension."); |
| 598 | Vector<N - 1, Real> result; |
| 599 | for (int32_t i = 0, j = 0; i < N - 1; ++i, ++j) |
| 600 | { |
| 601 | if (j == reject) |
| 602 | { |
| 603 | ++j; |
| 604 | } |
| 605 | result[i] = v[j]; |
| 606 | } |
| 607 | return result; |
| 608 | } |
| 609 | } |
| 610 | |
| 611 |
no outgoing calls
no test coverage detected