+
+
227 double X[][2] = {{5, 7}, {7, 11}};
+
228 double y[] = {15.56158, 0.384227};
+
229 double eig_vals[2] = {0, 0};
+
+
+
232 double **A = (
double **)malloc(mat_size *
sizeof(
double *));
+
233 for (
int i = 0; i < mat_size; i++) A[i] = X[i];
+
+
235 printf(
"------- Test 1 -------\n");
+
+
+
+
239 for (
int i = 0; i < mat_size; i++)
+
+
241 printf(
"%d/5 Checking for %.3g --> ", i + 1, y[i]);
+
+
243 for (
int j = 0; j < mat_size && !result; j++)
+
+
245 if (fabs(y[i] - eig_vals[j]) < 0.1)
+
+
+
248 printf(
"(%.3g) ", eig_vals[j]);
+
+
+
+
+
+
+
+
256 printf(
"Test 1 Passed in %.3g sec\n\n", dtime);
+
+
\[\begin{bmatrix} -4& 4& 2& 0& -3\\ 4& -4& 4& -3& -1\\ 2& 4& 4& 3& -3\\ 0& -3& 3& -1&-1\\ -3& -1& -3& -3& 0 \end{bmatrix}\]
-
-
256 double X[][5] = {{-4, 4, 2, 0, -3},
-
-
-
-
260 {-3, -1, -3, -3, 0}};
-
261 double y[] = {9.27648, -9.26948, 2.0181, -1.03516,
-
-
-
-
-
266 double **A = (
double **)malloc(mat_size *
sizeof(
double *));
-
267 for (
int i = 0; i < mat_size; i++) A[i] = X[i];
-
-
269 printf(
"------- Test 2 -------\n");
-
-
-
-
273 for (
int i = 0; i < mat_size; i++)
-
-
275 printf(
"%d/5 Checking for %.3g --> ", i + 1, y[i]);
-
-
277 for (
int j = 0; j < mat_size && !result; j++)
-
-
279 if (fabs(y[i] - eig_vals[j]) < 0.1)
-
-
-
282 printf(
"(%.3g) ", eig_vals[j]);
-
-
-
-
-
-
-
-
290 printf(
"Test 2 Passed in %.3g sec\n\n", dtime);
-
-
+
+
+
274 double X[][5] = {{-4, 4, 2, 0, -3},
+
+
+
+
278 {-3, -1, -3, -3, 0}};
+
279 double y[] = {9.27648, -9.26948, 2.0181, -1.03516,
+
+
+
+
+
284 double **A = (
double **)malloc(mat_size *
sizeof(
double *));
+
285 for (
int i = 0; i < mat_size; i++) A[i] = X[i];
+
+
287 printf(
"------- Test 2 -------\n");
+
+
+
+
291 for (
int i = 0; i < mat_size; i++)
+
+
293 printf(
"%d/5 Checking for %.3g --> ", i + 1, y[i]);
+
+
295 for (
int j = 0; j < mat_size && !result; j++)
+
+
297 if (fabs(y[i] - eig_vals[j]) < 0.1)
+
+
+
300 printf(
"(%.3g) ", eig_vals[j]);
+
+
+
+
+
+
+
+
308 printf(
"Test 2 Passed in %.3g sec\n\n", dtime);
+
+
@@ -607,7 +625,7 @@ Here is the call graph for this function:
void print_matrix(double **A, int M, int N)
function to display matrix on stdout
Definition: qr_decompose.h:22
double ** mat_mul(double **A, double **B, double **OUT, int R1, int C1, int R2, int C2)
Perform multiplication of two matrices.
Definition: qr_eigen_values.c:59
#define LIMS
limit of range of matrix values
Definition: qr_eigen_values.c:19
-
double eigen_values(double **A, double *eigen_vals, int mat_size, char debug_print)
Compute eigen values using iterative shifted QR decomposition algorithm as follows:
Definition: qr_eigen_values.c:104
+
double eigen_values(double **A, double *eigen_vals, int mat_size, char debug_print)
Compute eigen values using iterative shifted QR decomposition algorithm as follows:
Definition: qr_eigen_values.c:106
diff --git a/d7/dd8/c__atoi__str__to__integer_8c.html b/d7/dd8/c__atoi__str__to__integer_8c.html
index e771e12a..c49463f0 100644
--- a/d7/dd8/c__atoi__str__to__integer_8c.html
+++ b/d7/dd8/c__atoi__str__to__integer_8c.html
@@ -252,7 +252,7 @@ Here is the call graph for this function:
int compare(const void *a, const void *b)
comparison function for use with internal qsort algorithm
Definition: sol1.c:19
void shell_sort(char data[][MAX_NAME_LEN], int LEN)
Alphabetical sorting using 'shell sort' algorithm.
Definition: sol1.c:20
long long int get_product(FILE *fp, long start_pos, int num_digits)
Compute the product of two numbers in a file.
Definition: sol1.c:16
-
int main(int argc, char **argv)
main function
Definition: qr_eigen_values.c:297
+
int main(int argc, char **argv)
main function
Definition: qr_eigen_values.c:315
#define MAX_L
chunk size of array allocation
Definition: sol1.c:18
Definition: prime_factoriziation.c:25
void modifiedBinarySearch(const int **mat, int n, int m, int x)
Function to perform binary search on the mid values of row to get the desired pair of rows where the ...
Definition: modified_binary_search.c:48
@@ -265,7 +265,7 @@ Here is the call graph for this function:
void stats_computer1(float x, float *mean, float *variance, float *std)
continuous mean and variance computance using first value as an approximation for the mean.
Definition: realtime_stats.c:24