#include <network.hh>
Public Member Functions | |
comm_matrix_t (int rows, int col, error_vector_t &arg0=gerr) | |
A contructor, creates matrix with rows rows and col columns. | |
int | getcolcount (void) |
Function that returns number of columns in the matrix. | |
int | getrowcount (void) |
Function that returns number of rows in the matrix. | |
int & | operator() (int row, int col) |
Operator that retrieves elements of the matrix. | |
~comm_matrix_t () | |
A destructor, frees space allocated for the matrix. | |
Protected Attributes | |
error_vector_t & | errvec |
Friends | |
pcomm_matrix_t | operator* (const pcomm_matrix_t &m, int a) |
Operator that multiplies matrix m by integer a, analogous to operator*(). | |
pcomm_matrix_t | operator* (int a, const pcomm_matrix_t &m) |
Operator that multiplies matrix m by integer a. | |
pcomm_matrix_t | operator+ (const pcomm_matrix_t &m1, const pcomm_matrix_t &m2) |
Operator that adds matrix m1 to matrix m2. | |
pcomm_matrix_t | operator- (const pcomm_matrix_t &m1, const pcomm_matrix_t &m2) |
Operator that subtracts matrix m2 from matrix m1 (element-wise). | |
pcomm_matrix_t | operator- (const pcomm_matrix_t &m) |
Operator that inverts all elements in the matrix ("puts minus" in front of every element). |
Matrix returned by methods of network_t is usually of size cl_size * cl_size, where cl_size if the number of computers in the cluster, which can be retrieved by network_t::get_cluster_size() method. In i-th row and j-th column of the matrix is an integer that stores information about data sent by workstation with id i to workstation with id j.
comm_matrix_t | ( | int | rows, | |
int | col, | |||
error_vector_t & | arg0 = gerr | |||
) |
A contructor, creates matrix with rows rows and col columns.
rows | - number of rows of the matrix to be created | |
col | - number of columns of the matrix to be created | |
arg0 | - object used for error reporting |
int getcolcount | ( | void | ) | [inline] |
Function that returns number of columns in the matrix.
int getrowcount | ( | void | ) | [inline] |
Function that returns number of rows in the matrix.
int & operator() | ( | int | row, | |
int | col | |||
) |
Operator that retrieves elements of the matrix.
row | - specifies the row of the element to be retrieved | |
col | - specifies the column of the element to be retrieved |
pcomm_matrix_t operator* | ( | int | a, | |
const pcomm_matrix_t & | m | |||
) | [friend] |
Operator that multiplies matrix m by integer a.
a | - integer that is to be multiplied with all elements of the matrix passed as second parameter | |
m | - pointer to matrix whose elements are to be multiplied by the integer passed as first parameter |
pcomm_matrix_t operator+ | ( | const pcomm_matrix_t & | m1, | |
const pcomm_matrix_t & | m2 | |||
) | [friend] |
Operator that adds matrix m1 to matrix m2.
m1 | - pointer to matrix, first addend | |
m2 | - pointer to matrix, second addend |
pcomm_matrix_t operator- | ( | const pcomm_matrix_t & | m1, | |
const pcomm_matrix_t & | m2 | |||
) | [friend] |
Operator that subtracts matrix m2 from matrix m1 (element-wise).
m1 | - pointer to matrix, minuend | |
m2 | - pointer to matrix, subtrahend |
pcomm_matrix_t operator- | ( | const pcomm_matrix_t & | m | ) | [friend] |
Operator that inverts all elements in the matrix ("puts minus" in front of every element).
m | - pointer to matrix whose elements are to be inverted |