nov 6, add -lm appended to make test due to my (admittedly heavy) usage of clang

This commit is contained in:
Elizabeth Hunt 2023-11-06 10:17:14 -07:00
parent fcb00cd969
commit 586d8056c1
Signed by: simponic
GPG Key ID: 52B3774857EB24B1
2 changed files with 26 additions and 1 deletions

View File

@ -22,7 +22,7 @@ LDFLAGS := -lm
all: $(TEST_EXE) all: $(TEST_EXE)
$(TEST_EXE): $(TEST_OBJ) $(LIBRARY) | $(BIN_DIR) $(TEST_EXE): $(TEST_OBJ) $(LIBRARY) | $(BIN_DIR)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS)
$(LIBRARY): $(OBJ) | $(LIB_DIR) $(LIBRARY): $(OBJ) | $(LIB_DIR)
ar rcs $(LIBRARY) $(OBJ_DIR)/*.o ar rcs $(LIBRARY) $(OBJ_DIR)/*.o

25
notes/Nov-6.org Normal file
View File

@ -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