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