init fourier.* (will be changed)
[my-code/api.git] / fourier / fourier.h
diff --git a/fourier/fourier.h b/fourier/fourier.h
new file mode 100644 (file)
index 0000000..5a8ddb3
--- /dev/null
@@ -0,0 +1,33 @@
+/* fourier.h -- fourier headers */
+
+#ifndef FOURIER_H
+#define FOURIER_H
+
+/* includes */
+#include <stdio.h>
+
+/* defines */
+#define F_SUCCESS 1
+#define F_ERROR -1
+#define F_DIM_ERROR -2
+#define F_DLEN_ERROR -3
+#define F_MALLOC_ERROR -4
+#define F_SET_DLEN_ERROR -5
+
+#define MAX_DIM 3
+
+/* fourier specific variables */
+typedef struct s_complex {
+  double r;
+  double i;
+} t_complex;
+
+typedef struct s_fourier {
+  int outfd;
+  unsigned char type;
+  int dim;
+  t_complex *data[MAX_DIM];
+  int data_len[MAX_DIM];
+} t_fourier;
+
+#endif