imatrix Struct Reference

#include <matrix.h>

List of all members.

Public Member Functions

 imatrix (const imatrix &mat)
 copy constructor
 imatrix (long m, long n)
 default constructor
 imatrix ()
long & operator() (long i, long j)
long * operator[] (long i)
 ~imatrix ()
 destructor

Public Attributes

long * a
 pointer to onedimensional array with matrix elements stored in the rows
long m
 number of rows
long n
 number of columns

Detailed Description

This file declares struct imatrix, which implements matrix with elements type of long.

Definition at line 68 of file matrix.h.


Constructor & Destructor Documentation

imatrix (  )  [inline]

Definition at line 76 of file matrix.h.

References a, m, and n.

imatrix ( long  m,
long  n 
)

default constructor

allocating constructor

The constructor allocates memory form the heap to the member array a.

Parameters:
m is the number of rows
n is the number of columns

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 150 of file matrix-new.cpp.

References a, m, memset(), n, and print_err().

imatrix ( const imatrix mat  ) 

copy constructor

The copy constructor creates copy of the object given by the constant reference parameter.

Parameters:
v is reference to the object of the vector which should be copied

created 16.10.2003 by Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 174 of file matrix-new.cpp.

References a, m, n, print_err(), and print_warning().

~imatrix (  ) 

destructor

The destructor deallocates the memory occupied by the member array a.

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 206 of file matrix-new.cpp.

References a, m, and n.


Member Function Documentation

long& operator() ( long  i,
long  j 
) [inline]

The operator enables access to the elements of the member array a.

Parameters:
i is the index of row
j is the index of column

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 108 of file matrix.h.

References a, m, n, and print_err().

long* operator[] ( long  i  )  [inline]

The operator enables access to the rows of elements of the member array a.

Parameters:
i is the number of row

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 88 of file matrix.h.

References a, m, n, and print_err().


Member Data Documentation

long* a

pointer to onedimensional array with matrix elements stored in the rows

Definition at line 74 of file matrix.h.

Referenced by allocm(), findout_parentel_nod(), imatrix(), operator()(), operator[](), reallocm(), and ~imatrix().

long m

number of rows

Definition at line 72 of file matrix.h.

Referenced by allocm(), imatrix(), operator()(), operator[](), reallocm(), and ~imatrix().

long n

number of columns

Definition at line 73 of file matrix.h.

Referenced by allocm(), imatrix(), operator()(), operator[](), reallocm(), and ~imatrix().


The documentation for this struct was generated from the following files:

Generated by  doxygen 1.6.2