?? matrixinverse.h
字號:
/*
* A byproduct of my project, I hope it can be a little useful to us.
* only used for intercommunacation, anyone who is interested in this
* arithmetic can contact with the author
* Version: 1.0
* Author: SEwind
* Date: 2005.7
* Email: zhchangan@yahoo.com.cn
*/
#ifndef MATRIXINVERSE_H
#define MATRIXINVERSE_H
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef struct
{
float re;
float im;
}floatComplex;
typedef struct
{
size_t row;
size_t col;
floatComplex **a;
}floatComplexMatrix;
/* Dynamically allocate memory for a matrix */
floatComplexMatrix *floatComplexMatrixAlloc(size_t row,size_t col);
/* Free the allocated memory for a matrix */
void floatComplexMatrixFree(floatComplexMatrix *mat);
/* Print a matrix */
void floatPrintComplexMatrix(floatComplexMatrix *mat);
/* Set valure for a floatComplex type variable */
floatComplex floatComplexSet(float real,float imag);
/* Get the modulus of a floatComplex type variable */
float floatComplexAbs(floatComplex x);
/* Two variable's addition:x+y */
floatComplex floatCAdd(floatComplex x,floatComplex y);
/* Two variable's multiplication:x*y */
floatComplex floatCMpy(floatComplex x,floatComplex y);
/* Two matrix's multiplication:A*B */
floatComplexMatrix *floatComplexMatrixMpy(floatComplexMatrix *mat1,floatComplexMatrix *mat2);
/* Get the inverse of a matrix */
floatComplexMatrix *floatComplexMatrixInverse(floatComplexMatrix *mat);
#endif /*MATRIXINVERSE_H*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -