Loading...
Searching...
No Matches
Go to the documentation of this file.
4#include "../tnt/tnt_array1d.h"
5#include "../tnt/tnt_array2d.h"
6#include "../tnt/tnt_math_utils.h"
75 for (
i =
k;
i < m;
i++) {
84 for (
i =
k;
i < m;
i++) {
90 for (
j =
k+1;
j <
n;
j++) {
92 for (
i =
k;
i < m;
i++) {
93 s += QR_[
i][
k]*QR_[
i][
j];
96 for (
i =
k;
i < m;
i++) {
97 QR_[
i][
j] += s*QR_[
i][
k];
113 for (
int j = 0;
j <
n;
j++)
137 for (
int i = 0;
i < m;
i++)
139 for (
int j = 0;
j <
n;
j++)
160 for (
int i = 0;
i <
n;
i++) {
161 for (
int j = 0;
j <
n;
j++) {
188 for (
k =
n-1;
k >= 0;
k--) {
189 for (
i = 0;
i < m;
i++) {
193 for (
j =
k;
j <
n;
j++) {
194 if (QR_[
k][
k] != 0) {
196 for (
i =
k;
i < m;
i++) {
197 s += QR_[
i][
k]*Q[
i][
j];
200 for (
i =
k;
i < m;
i++) {
201 Q[
i][
j] += s*QR_[
i][
k];
230 for (
int k = 0;
k <
n;
k++)
233 for (
int i =
k;
i < m;
i++)
238 for (
int i =
k;
i < m;
i++)
244 for (
int k =
n-1;
k >= 0;
k--)
247 for (
int i = 0;
i <
k;
i++) {
248 x[
i] -= x[
k]*QR_[
i][
k];
255 for (
int i=0;
i<
n;
i++)
283 for (
k = 0;
k <
n;
k++) {
284 for (
j = 0;
j < nx;
j++) {
286 for (
i =
k;
i < m;
i++) {
287 s += QR_[
i][
k]*X[
i][
j];
290 for (
i =
k;
i < m;
i++) {
291 X[
i][
j] += s*QR_[
i][
k];
296 for (
k =
n-1;
k >= 0;
k--) {
297 for (
j = 0;
j < nx;
j++) {
300 for (
i = 0;
i <
k;
i++) {
301 for (
j = 0;
j < nx;
j++) {
302 X[
i][
j] -= X[
k][
j]*QR_[
i][
k];