![]() |
CS488 PA4
|
#include <Vector.h>
Inherits Matrix.
Public Member Functions | |
| Vector () | |
| Vector (int size) | |
| Vector (const Vector &original) | |
| Vector & | operator= (std::initializer_list< double > m) |
| Vector & | operator= (const Matrix &other) |
Public Member Functions inherited from Matrix | |
| Matrix () | |
| Matrix (int rows, int columns) | |
| Matrix (const Matrix &original) | |
| ~Matrix () | |
| double | get (int r, int c) const |
| double | get (int i) const |
| Matrix | getColumn (int c) const |
| int | getColumns () const |
| int | getRows () const |
| double & | operator() (int r, int c) |
| double & | operator() (int i) |
| Matrix & | operator= (std::initializer_list< double > values) |
| Matrix & | operator= (const Matrix &other) |
Friends | |
| double | norm (const Matrix &a) |
| Matrix | normalized (const Matrix &a) |
Additional Inherited Members | |
Protected Member Functions inherited from Matrix | |
| void | allocateMemory (int rows, int columns) |
| void | deallocateMemory () |
| void | setValues (double value) |
| void | setValues (const Matrix &other) |
| void | setValues (const double *values) |
| void | setValues (double **values) |
Protected Attributes inherited from Matrix | |
| double ** | values |
| int | columns |
| int | rows |
| Vector::Vector | ( | ) |
Construct a 2x1 Vector.
|
explicit |
Construct a size x 1 Vector.
| size | The number of rows |
| Vector & Vector::operator= | ( | std::initializer_list< double > | m | ) |
Assign an (appropriately sized) Matrix to this Vector.
Note: This method is not void so that one can write x = y = z (which first assigns z to y and then assigns the result of that assignment to x). It returns the result by reference because there is no concern that this will not refer to something.
| other | The Matrix to copy |
| length_error | if the sizes don't conform |
|
friend |
1.8.13