December 2016
Intermediate to advanced
332 pages
6h 2m
English
Ex. 1 → Two matrices A, B are called similar, if there exists a matrix S, such that B = S-1 A S. A and B have the same eigenvalues. Write a test checking that two matrices are similar, by comparing their eigenvalues. Is it a functional or a unit test?
Ex. 2 → Create two vectors of large dimension. Compare the execution time of various ways to compute their dot product:
dot(v,w)sum((x*y for x,y in zip(v,w)))sum([x*y for x,y in zip(v,w)])Ex. 3 → Let u be a vector. The vector v with components
is called a moving average of u. Determine which of the two alternatives to ...
Read now
Unlock full access