|
Algorithms_in_C++
1.0.0
Set of algorithms implemented in C++.
|
#include <cassert>#include <cmath>#include <complex>#include <ctime>#include <iostream>#include <stdexcept>Classes | |
| class | Complex |
Functions | |
| bool | operator== (const Complex &a, const Complex &b) |
| std::ostream & | operator<< (std::ostream &os, const Complex &num) |
| double | get_rand () |
| void | tests () |
| int | main () |
A basic implementation of Complex Number field as a class with operators overloaded to accommodate (mathematical) field operations.
| double get_rand | ( | ) |
Function to get random numbers to generate our complex numbers for test
| int main | ( | ) |
| std::ostream& operator<< | ( | std::ostream & | os, |
| const Complex & | num | ||
| ) |
Overloaded insersion operator to accommodate the printing of our complex number in their standard form.
| os | The console stream |
| num | The complex number. |
Logical Equal overload for our Complex class.
| a | Left hand side of our expression |
| b | Right hand side of our expression |
| void tests | ( | ) |
Tests Function