diff --git a/README.md b/README.md index da5202e3a7fac371f40e77b5bb21b16f4c6d8138..13c79bcdc871a7aaf06fcde5c9cd4f3a0ede4687 100644 --- a/README.md +++ b/README.md @@ -5,28 +5,40 @@ such that it is flexible enough to adapt easily to any given situation. ## Structure The code is structured in an object oriented approach. The classes that likely will -not need to be adapted for a new situation are found in the `lib` folder. They -consist of the following: +not need to be adapted for a new situation are found in the `lib` folder. They are +described in the following. Note that qualifiers, references and the like are discarded +where it improves legibility. Consult the source files for more information. ### Template Type `Vec2` (`vec2.hpp`), 2-vector utility class -1. Template parameters: +1. Template parameters - `value_t`: type of vector entries -2. Members: - - Access: - - `value_t x()`: returns x entry - - `value_t y()`: returns y entry - - `Vec2 normalized()`: returns normalized version of vector - - `value_t r()`: returns length - - `value_t phi()`: returns angle (`std::atan2` version of it) - - Member functions: - - `value_t r_wrt(Vec2)`: returns length with origin at argument - - `value_t phi_wrt(Vec2)`: returns angle with origin at argument - - `value_t norm()`: returns norm - - `value_t norm_sq()`: returns square of norm - - Modifiers: - - `Vec2 normalize()`: normalize the vector - - `Vec2 rotate(Vec2, value_t)`: rotate the vector - - Supported Operators: All of these work as one would expect +2. Members + - Access + - `value_t x()` + - returns x entry + - `value_t y()` + - returns y entry + - `Vec2 normalized()` + - returns normalized version of vector + - `value_t r()` + - returns length + - `value_t phi()` + - returns angle (`std::atan2` version of it) + - Member functions + - `value_t r_wrt(Vec2)` + - returns length with origin at argument + - `value_t phi_wrt(Vec2)` + - returns angle with origin at argument + - `value_t norm()` + - returns norm + - `value_t norm_sq()` + - returns square of norm + - Modifiers + - `Vec2 normalize()` + - normalizes the vector and returns it + - `Vec2 rotate(Vec2, value_t)` + - rotates the vector and returns it + - Supported Operators, All of these work as one would expect - `*` with `Vec2` (inner product) and `value_t` - `/` with `value_t` - `+, -` with `Vec2` @@ -35,10 +47,14 @@ consist of the following: - `<<` with `std::ostream` ## Type `Diagonalizer` (`diagonalizer.hpp`), class to diagonalize symmetric Matrices -1. Members: - - `std::vector<double> ev(std::vector<double> mat, size_t N)`: +1. Members + - `std::vector<double> ev(std::vector<double> mat, size_t N)` - returns eigenvalues of the symmetric matrix mat of linear size N - throws upon diagonalization failure - - `std::pair<std::vector<double>, std::vector<double> > evv(std::vector<double> mat, size_t N)`: + - `std::pair<std::vector<double>, std::vector<double> > evv(std::vector<double> mat, size_t N)` - returns pair of (eigenvalues, eigenvectors) of the symmetric matrix mat of size N - throws upon diagonalization failure +2. Further developments + - Only finding eigenvectors and -values in a certain range may be added later on + +## Type