csci146 Namespace Reference

A namespace for all classes defined in our CSCI 146 project. More...


Classes

class  matrix
 Representation of a two-dimensional matrix. More...

Functions

matrix operator+ (double scalar, const matrix &m)
 Generates a matrix by adding a scalar constant to each element of another matrix.
matrix operator* (double scalar, const matrix &m)
 Generates a matrix by multiplying each element of another matrix by a scalar constant.
std::ostream & operator<< (std::ostream &out, const matrix &m)
 Outputs the contents of a matrix in tabular form.


Detailed Description

A namespace for all classes defined in our CSCI 146 project.

To use these classes from another problem, in addition to using the syntax

#include "matrix.h"

one should also use the command

using namespace csci146;

or else you must explicitly designate all uses of classes such as

csci146::matrix m;

Function Documentation

matrix csci146::operator* ( double  scalar,
const matrix &  m 
)

Generates a matrix by multiplying each element of another matrix by a scalar constant.

This allows a commutative syntax of (5 * A) to be equivalent to (A * 5).

matrix csci146::operator+ ( double  scalar,
const matrix &  m 
)

Generates a matrix by adding a scalar constant to each element of another matrix.

This allows a commutative syntax of (5 + A) to be equivalent to (A + 5).

std::ostream& csci146::operator<< ( std::ostream &  out,
const matrix &  m 
)

Outputs the contents of a matrix in tabular form.


Generated on Wed Sep 8 16:20:55 2010 by  doxygen 1.5.6