00001 #ifndef MATRECT_HEADER
00002 #define MATRECT_HEADER
00003
00004
00005
00012
00013
00014
00015
00016 #include <stdlib.h>
00017 #include <stdio.h>
00018
00019
00020
00021 #ifdef __cplusplus
00022 namespace RazorBack {
00023 #endif
00024
00031 typedef struct
00032 {
00033 double **Mat;
00034 unsigned int Rno, Cno;
00035 unsigned int Rlen, Elen;
00036 } Matrect_;
00037
00038
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00051 void init_matrect(Matrect_ *M, unsigned int Rno, unsigned int Cno);
00052
00064 void array_matrect(Matrect_ *M, const double *Array);
00065
00074 void resize_matrect(Matrect_ *M, unsigned int Newrno, unsigned int Newcno);
00075
00081 void copy_matrect(const Matrect_ *From, Matrect_ *To);
00082
00089 int read_matrect(FILE *In, Matrect_ *M);
00090
00097 void write_matrect(FILE *Out, const Matrect_ *M, int Prec);
00098
00105 void free_matrect(Matrect_ *M);
00106
00107 #ifdef __cplusplus
00108 } }
00109 #endif
00110
00111
00112
00113 #endif