// Matrix Utilities for Capacity Calculations // by Florian Kaltenberger // Created 10.10.2007 # include "matrix_util.h" #include #include // This function calculates HxH^H for a complex matrix H // HH must be a pre-allocated matrix of size rows x rows // The function returns NULL on error and a pointer to the // calculated matrix otherwise struct complexf **square_mat(struct complexf **H, int rows, int cols, struct complexf **HH) { int r,r2,c; if (H==NULL || HH==NULL || rows == 0 || cols == 0) return NULL; for (r=0; r