From 586d8056c1c9e4bb4b8ef219babadc997559b83d Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 6 Nov 2023 10:17:14 -0700 Subject: [PATCH] nov 6, add -lm appended to make test due to my (admittedly heavy) usage of clang --- Makefile | 2 +- notes/Nov-6.org | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 notes/Nov-6.org diff --git a/Makefile b/Makefile index 0b1a81a..09e44d2 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ LDFLAGS := -lm all: $(TEST_EXE) $(TEST_EXE): $(TEST_OBJ) $(LIBRARY) | $(BIN_DIR) - $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ + $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LIBRARY): $(OBJ) | $(LIB_DIR) ar rcs $(LIBRARY) $(OBJ_DIR)/*.o diff --git a/notes/Nov-6.org b/notes/Nov-6.org new file mode 100644 index 0000000..4a9562f --- /dev/null +++ b/notes/Nov-6.org @@ -0,0 +1,25 @@ +* Power Method +v_{k+1} = A v_k, k = 0,1,2 + +** Properties +1. \frac{A v_k}{||v_k||} \rightarrow v_1 +2. \frac{v_k^T A v_k}{v_k^T v_k} \rightarrow \lambda_1 +3. If \lambda is a n eigenvalue of A, then \frac{1}{\lambda} is an eigenvalue of A^-1 +4. Av = \lambda v + Av - \mu v = (\lambda-\mu)v = (A - \mu I)v +5. If \lambda is an eigenvalue of A, then \lambda - \mu is an eigenvalue of A \cdot \mu I + +** Shifting Eigenvalues +1. Partition [\lambda_n, \lambda_1] + + +* Lanczos Algorithm + +#+BEGIN_SRC c + for (int i = 0; i < n; i++) { + sum = a0; + v_dot_v(a[i], x); + + b[i] = sum; + } +#+END_SRC