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

Functions

enum matrix_type 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...
 

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()

enum matrix_type 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)