-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComplexMatrix.h
47 lines (28 loc) · 968 Bytes
/
ComplexMatrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Complex.h
// Lab4
//
// Created by Animesh Patel on 10/23/17.
// Copyright © 2017 Animesh Patel. All rights reserved.
#ifndef ComplexMatrix_h
#define ComplexMatrix_h
#include <string>
#include "Complex.h"
#include <iostream>
#include <cmath>
class ComplexMatrix{
public:
ComplexMatrix(int = 0); // constructor, with single argument to 0
ComplexMatrix(const ComplexMatrix &); //copy constructor
~ComplexMatrix(); // destructor
ComplexMatrix& operator = (const ComplexMatrix&); // Assignment operator
friend ostream &operator << (ostream &, const ComplexMatrix &);
void fillMatrix(); // to take user input
ComplexMatrix operator + (ComplexMatrix &); // Matrix Addition
ComplexMatrix operator * (ComplexMatrix &); // Matrix Multiplication
Complex& operator()(int, int); // return reference
private:
int dimension;
size_t size;
Complex *ptr;
};
#endif