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.
std::istream & operator>> (std::istream &in, matrix &m)
 Reconfigures the matrix to match data read from a stream.


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.

std::istream& csci146::operator>> ( std::istream &  in,
matrix &  m 
)

Reconfigures the matrix to match data read from a stream.

The input must have the same number of columns per line and must be terminated with a blank line.


Generated on Thu Jan 27 12:58:28 2011 by  doxygen 1.5.6