hsmet  1.0.0
he-matrix.h
gehe zur Dokumentation dieser Datei
1 
8 #ifndef HE_MATRIX_H_INCLUDED
9 #define HE_MATRIX_H_INCLUDED 1
10 
11 
12 #ifndef HE_CONF_H_INCLUDED
13 #include "he-conf.h"
14 #endif
15 
16 #if HAVE_STDLIB_H
17 #ifndef STDLIB_H_INCLUDED
18 #include <stdlib.h>
19 #define STDLIB_H_INCLUDED 1
20 #endif
21 #endif
22 
23 #if HAVE_STDINT_H
24 #ifndef STDINT_H_INCLUDED
25 #include <stdint.h>
26 #define STDINT_H_INCLUDED 1
27 #endif
28 #endif
29 
30 
35 typedef struct {
36  double *daten;
37  size_t zeilen;
38  size_t spalten;
39 } HE_MATRIX;
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
54 HE_MATRIX *
55 hsm_et_matrix_new(size_t zeilen, size_t spalten, double wert);
56 
63 HE_MATRIX *
64 hsm_et_matrix_from_text(const char *fn);
65 
69 void
71 
77 int
78 hsm_et_matrix_to_text(const char *fn, const HE_MATRIX *pm);
79 
87 int
88 hsm_et_matrix_set(HE_MATRIX *pm, size_t zeile, size_t spalte, double wert);
89 
96 double
97 hsm_et_matrix_get(const HE_MATRIX *pm, size_t zeile, size_t spalte);
98 
103 double
104 hsm_et_matrix_max(const HE_MATRIX *pm);
105 
110 double
111 hsm_et_matrix_min(const HE_MATRIX *pm);
112 
117 double
118 hsm_et_matrix_sum(const HE_MATRIX *pm);
119 
124 double
125 hsm_et_matrix_avg(const HE_MATRIX *pm);
126 
135 int
136 hsm_et_matrix_mult(HE_MATRIX *r,const HE_MATRIX *a,const HE_MATRIX *b);
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif
143 /* ifndef HE_MATRIX_H_INCLUDED */
144 
145 /* vim: set ai sw=4 ts=4 expandtab : */
146 
double hsm_et_matrix_avg(const HE_MATRIX *pm)
Mittelwertberechnung.
double hsm_et_matrix_min(const HE_MATRIX *pm)
Minimum-Suche.
size_t spalten
Spaltenanzahl.
Definition: he-matrix.h:38
double * daten
Werte: Zeile 1, Zeile 2, usw.
Definition: he-matrix.h:36
Matrix mit double-Werten.
Definition: he-matrix.h:35
HE_MATRIX * hsm_et_matrix_from_text(const char *fn)
Neue Matrix erstellen, Daten hierfuer aus Textdatei lesen.
void hsm_et_matrix_delete(HE_MATRIX *pm)
Von der Matrix belegten Speicherplatz wieder freigeben.
double hsm_et_matrix_max(const HE_MATRIX *pm)
Maximum-Suche.
int hsm_et_matrix_mult(HE_MATRIX *r, const HE_MATRIX *a, const HE_MATRIX *b)
Matrizenmultiplikation.
double hsm_et_matrix_sum(const HE_MATRIX *pm)
Summenberechnung.
Konfigurationseinstellungen.
int hsm_et_matrix_to_text(const char *fn, const HE_MATRIX *pm)
Matrix in Textdatei schreiben.
int hsm_et_matrix_set(HE_MATRIX *pm, size_t zeile, size_t spalte, double wert)
Wert setzen.
HE_MATRIX * hsm_et_matrix_new(size_t zeilen, size_t spalten, double wert)
Neue Matrix erstellen, alle Elemente mit Anfangswert fuellen.
double hsm_et_matrix_get(const HE_MATRIX *pm, size_t zeile, size_t spalte)
Wert ermitteln.
size_t zeilen
Zeilenanzahl.
Definition: he-matrix.h:37