test commit

This commit is contained in:
Krishna Vedala 2020-07-10 22:00:57 -04:00
parent 523475b183
commit dc6f322975
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7
2 changed files with 3 additions and 4 deletions

View File

@ -180,14 +180,13 @@ void test2() {
}
/**
* @brief Test function to find *maxima* for the function
* @brief Test function to find *minima* for the function
* \f$f(x)= \cos x\f$
* in the interval \f$[0,12]\f$
* \n Expected result: \f$\pi\approx 3.14159265358979312\f$
*/
void test3() {
// define the function to maximize as a lambda function
// since we are maximixing, we negated the function return value
// define the function to minimize as a lambda function
std::function<double(double)> func = [](double x) { return std::cos(x); };
std::cout << "Test 3.... ";

View File

@ -212,7 +212,7 @@ void test1() {
std::complex<double>(0., -2.) // known expected roots
};
/* initialize root approximations with random values */
/* Initialize root approximations with random values */
for (int n = 0; n < roots.size(); n++) {
roots[n] = std::complex<double>(std::rand() % 100, std::rand() % 100);
roots[n] -= 50.f;