C Workshop
Transpose.h File Reference
#include <stdio.h>

Go to the source code of this file.

Macros

#define CELL_WIDTH   3
 
#define CELL_PRECISION   0
 

Typedefs

typedef double matrix_element
 Type definition for a numeric matrix element. More...
 

Functions

void TransposeMatrix (matrix_element **matrix, size_t size)
 Recieves a square matrix and transposes it in place. More...
 
void SwapElements (matrix_element *first, matrix_element *second)
 Swaps two matrix elements. More...
 
void PrintMatrix (matrix_element **matrix, size_t size)
 Prints a square matrix. More...
 

Macro Definition Documentation

◆ CELL_PRECISION

#define CELL_PRECISION   0

◆ CELL_WIDTH

#define CELL_WIDTH   3

Typedef Documentation

◆ matrix_element

typedef double matrix_element

Type definition for a numeric matrix element.

Function Documentation

◆ PrintMatrix()

void PrintMatrix ( matrix_element **  matrix,
size_t  size 
)

Prints a square matrix.

Parameters
matrixMatrix to print
sizeSize of the matrix (rows and columns)

◆ SwapElements()

void SwapElements ( matrix_element first,
matrix_element second 
)

Swaps two matrix elements.

Parameters
firstThe first element
secondThe element to swap with

◆ TransposeMatrix()

void TransposeMatrix ( matrix_element **  matrix,
size_t  size 
)

Recieves a square matrix and transposes it in place.

Parameters
matrixThe matrix to transpose
sizeThe size of the matrix (rows and columns)