The linalg module consists of useful utility functions for basic linear algebra operations. Several of these functions can be used while implementing new algorithms.
Refer to the linalg.sql_in file for documentation on each of the utility functions.
norm1() | 1-norm of a vector. |
---|---|
norm2() | 2-norm of a vector. |
dist_norm1() | 1-norm of the difference between two vectors. |
dist_norm2() | 2-norm of the difference between two vectors. |
squared_dist_norm2() | Squared 2-norm of the difference between two vectors. |
dist_angle() | Angle between two vectors. |
dist_tanimoto() | Tanimoto distance between two vectors. |
closest_column() | Given matrix \( M \) and vector \( \vec x \) compute the column of \( M \) that is closest to \( \vec x \). |
closest_columns() | Given matrix \( M \) and vector \( \vec x \) compute the columns of \( M \) that are closest to \( \vec x \). |
avg() | Compute the average of vectors. |
normalized_avg() | Compute the normalized average of vectors. |
matrix_agg() | Combine vectors to a matrix. |
matrix_column() | Return the column of a matrix. |