[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/cablegui/Prototype_pattern_exercise/master/NumericMatrix.cpp [Back]  [Original]

// NumericMatrix.cpp
//
// Numeric matrix class.
// This is a matrix class for numerical data. Derived from Matrix and 
// it adds mathematical functions.
//
// 2 february 1999	RD	Started
// 2002-4-9 DD removed functions that belong elsewhere
// 2005-12-4 DD bug fix m1 + and - m2
// 2005-12-17 DD size_t -> I
// 2006-8-10 DD fix a bug mat*mat
// 2009-4-10 DD Transpose function; fix in mat*mat
//
// (C) Datasim Component Technology 1999-2006

#ifndef NumericMatrix_cpp
#define NumericMatrix_cpp

#include "NumericMatrix.hpp"


// Constructors & destructor
template 
NumericMatrix::NumericMatrix(): Matrix()
{ // Default constructor
}

template 
NumericMatrix::NumericMatrix(I rows, I columns): Matrix(rows, columns)
{ // Constructor with size. Start index=0.
}

template 
NumericMatrix::NumericMatrix(I rows, I columns, I rowStart, I columnStart): Matrix(rows, columns, rowStart, columnStart)
{ // Constructor with size & start index
}

template 
NumericMatrix::NumericMatrix(const Matrix& source): Matrix(source)
{ // Constructor with matrix
}

template 
NumericMatrix::NumericMatrix(const NumericMatrix& source): Matrix(source)
{ // Copy constructor
}

template 
NumericMatrix::~NumericMatrix()
{ // Destructor
}

// Selectors
template 
Vector NumericMatrix::Row(I row) const
{ // Return row. Overloads Matrix::Row() to return Vector instead of Array

	//return Vector(Matrix::Row(row));
	// We make a copy in this version
	Vector result(Columns(), MinColumnIndex());
	for (I j = result.MinIndex(); j 

Web Proxy Viewer  |  New URL  |  Original Page