Hopsan

#include <matrix.h>

Public Member Functions

 Matrix ()
 default (no argument) constructor
 
 Matrix (int rows, int cols)
 constructs a Matrix of specified size
 
 Matrix (const Matrix &src)
 copy constructor
 
 ~Matrix ()
 
void create (int rows, int cols)
 creates(or resets) Matrix size and allocated space.
 
int cols () const
 returns the number of columns
 
int rows () const
 
Matrixset (double v)
 set Matrix elements to v
 
Matrixoperator= (const Matrix &mx)
 
Matrix operator* (const Matrix &mx) const
 Matrix multiplication.
 
void swaprows (int i, int j)
 swap rows
 
Matrix transpose ()
 returns the transpose of the Matrix
 
double * operator[] (int n) const
 returns a pointer to a Matrix row
 
void print () const
 prints Matrix (using mprint)
 
Vec operator* (const Vec &v) const
 matix multipled by Vec
 

Friends

Vec operator* (const Vec &v, const Matrix &mx)
 Vec multiplied by Matrix.
 

Detailed Description

defines a two-dimensional Matrix of doubles

Constructor & Destructor Documentation

◆ ~Matrix()

~Matrix ( )

destructor

Member Function Documentation

◆ rows()

int rows ( ) const
inline

returns the number of rows