FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
hecmw_map_int.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2019 FrontISTR Commons
3 * This software is released under the MIT License, see LICENSE.txt
4 *****************************************************************************/
5
6#ifndef HECMW_MAP_INT_INCLUDED
7#define HECMW_MAP_INT_INCLUDED
8
9struct hecmw_bit_array;
10
12 int key;
13 void *val;
14};
15
17 int key;
18 int local;
19};
20
22 size_t n_val;
23 size_t max_val;
24
27
29 int sorted;
30
32
34 size_t iter;
35
36 void (*free_fnc)(void *);
37};
38
39extern int HECMW_map_int_init(struct hecmw_map_int *map,
40 void (*free_fnc)(void *));
41
42extern void HECMW_map_int_finalize(struct hecmw_map_int *map);
43
44extern size_t HECMW_map_int_nval(const struct hecmw_map_int *map);
45
46extern int HECMW_map_int_add(struct hecmw_map_int *map, int key, void *value);
47
48extern size_t HECMW_map_int_check_dup(struct hecmw_map_int *map);
49
50extern int HECMW_map_int_key2local(const struct hecmw_map_int *map, int key,
51 size_t *local);
52
53extern void *HECMW_map_int_get(const struct hecmw_map_int *map, int key);
54
55extern void HECMW_map_int_iter_init(struct hecmw_map_int *map);
56
57extern int HECMW_map_int_iter_next(struct hecmw_map_int *map, int *key,
58 void **value);
59
60extern int HECMW_map_int_mark_init(struct hecmw_map_int *map);
61
62extern int HECMW_map_int_mark(struct hecmw_map_int *map, int key);
63
64extern int HECMW_map_int_iter_next_unmarked(struct hecmw_map_int *map, int *key,
65 void **value);
66
67extern int HECMW_map_int_del_unmarked(struct hecmw_map_int *map);
68
69#endif /* HECMW_MAP_INT_INCLUDED */
size_t HECMW_map_int_nval(const struct hecmw_map_int *map)
Definition: hecmw_map_int.c:65
int HECMW_map_int_add(struct hecmw_map_int *map, int key, void *value)
int HECMW_map_int_iter_next(struct hecmw_map_int *map, int *key, void **value)
int HECMW_map_int_mark_init(struct hecmw_map_int *map)
int HECMW_map_int_mark(struct hecmw_map_int *map, int key)
int HECMW_map_int_iter_next_unmarked(struct hecmw_map_int *map, int *key, void **value)
int HECMW_map_int_del_unmarked(struct hecmw_map_int *map)
size_t HECMW_map_int_check_dup(struct hecmw_map_int *map)
void HECMW_map_int_iter_init(struct hecmw_map_int *map)
void HECMW_map_int_finalize(struct hecmw_map_int *map)
Definition: hecmw_map_int.c:40
int HECMW_map_int_key2local(const struct hecmw_map_int *map, int key, size_t *local)
void * HECMW_map_int_get(const struct hecmw_map_int *map, int key)
int HECMW_map_int_init(struct hecmw_map_int *map, void(*free_fnc)(void *))
Definition: hecmw_map_int.c:18
struct hecmw_map_int_value * vals
Definition: hecmw_map_int.h:25
struct hecmw_bit_array * mark
Definition: hecmw_map_int.h:31
struct hecmw_map_int_pair * pairs
Definition: hecmw_map_int.h:26
void(* free_fnc)(void *)
Definition: hecmw_map_int.h:36