Hawaii Hybrid
Loading...
Searching...
No Matches
array.h
Go to the documentation of this file.
1#ifndef ARRAY_H_
2#define ARRAY_H_
3
4#include <stdlib.h>
5#include <stdio.h>
6#include <assert.h>
7#include <string.h>
8
9#include "arena.h"
10
11typedef struct {
12 double *data;
13 size_t n;
14} Array;
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20Array create_array(size_t n);
21Array arena_create_array(Arena *a, size_t n);
22void free_array(Array *a);
23
24void init_array(Array *a, double *data, size_t n);
25
26void print_array(Array a);
27
28#ifdef __cplusplus
29}
30#endif
31
32#endif // ARRAY_H_
33
34/*
35 * Copyright (C) 2026 A.Finenko & D.Chistikov
36 * Distributed under the GNU General Public License, version 3
37 *
38 * This program is free software: you can redistribute it and/or modify
39 * it under the terms of the GNU General Public License as published by
40 * the Free Software Foundation, either version 3 of the License, or
41 * (at your option) any later version.
42 *
43 * This program is distributed in the hope that it will be useful,
44 * but WITHOUT ANY WARRANTY; without even the implied warranty of
45 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 * GNU General Public License for more details.
47 *
48 * You should have received a copy of the GNU General Public License
49 * along with this program. If not, see <http://www.gnu.org/licenses/>.
50 */
51
void init_array(Array *a, double *data, size_t n)
Definition array.c:3
Array create_array(size_t n)
Definition array.c:9
void free_array(Array *a)
Definition array.c:25
void print_array(Array a)
Definition array.c:29
Array arena_create_array(Arena *a, size_t n)
Definition array.c:17
Definition arena.h:56
Definition array.h:11
size_t n
Definition array.h:13
double * data
Definition array.h:12