| 606 | // Method to return the norm of vector. (non-const as may save norm for later) |
| 607 | |
| 608 | double |
| 609 | Vector::Norm(void) const |
| 610 | { |
| 611 | double value = 0; |
| 612 | for (int i=0; i<sz; i++) { |
| 613 | double data = theData[i]; |
| 614 | value += data*data; |
| 615 | } |
| 616 | return sqrt(value); |
| 617 | } |
| 618 | |
| 619 | double |
| 620 | Vector::pNorm(int p) const |
no outgoing calls