Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
olaf_deque.h
Go to the documentation of this file.
1// Olaf: Overly Lightweight Acoustic Fingerprinting
2// Copyright (C) 2019-2023 Joren Six
3
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Affero General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Affero General Public License for more details.
13
14// You should have received a copy of the GNU Affero General Public License
15// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
27#ifndef OLAF_DEQUE
28#define OLAF_DEQUE
29
37 typedef struct Olaf_Deque Olaf_Deque;
38
46 Olaf_Deque * olaf_deque_new(size_t size);
47
54 void olaf_deque_push_back(Olaf_Deque * olaf_deque,size_t value);
55
63 size_t olaf_deque_back(Olaf_Deque * olaf_deque);
64
72 bool olaf_deque_empty(Olaf_Deque * olaf_deque);
73
81 size_t olaf_deque_front(Olaf_Deque * olaf_deque);
82
88 void olaf_deque_pop_back(Olaf_Deque * olaf_deque);
89
95 void olaf_deque_pop_front(Olaf_Deque * olaf_deque);
96
102 void olaf_deque_destroy(Olaf_Deque * olaf_deque);
103
104
105#endif // OLAF_DEQUE
size_t olaf_deque_back(Olaf_Deque *olaf_deque)
Return the back of the deque.
Definition: olaf_deque.c:60
void olaf_deque_pop_back(Olaf_Deque *olaf_deque)
Pop the back from the deque.
Definition: olaf_deque.c:74
void olaf_deque_push_back(Olaf_Deque *olaf_deque, size_t value)
Push a value to the end of the deque.
Definition: olaf_deque.c:49
void olaf_deque_pop_front(Olaf_Deque *olaf_deque)
Remove the front of the deque.
Definition: olaf_deque.c:78
void olaf_deque_destroy(Olaf_Deque *olaf_deque)
Free resources and memory related to the deque.
Definition: olaf_deque.c:43
size_t olaf_deque_front(Olaf_Deque *olaf_deque)
The front of the deque.
Definition: olaf_deque.c:65
bool olaf_deque_empty(Olaf_Deque *olaf_deque)
Checks if the deque is empty.
Definition: olaf_deque.c:70
Olaf_Deque * olaf_deque_new(size_t size)
Create an new double ended queue.
Definition: olaf_deque.c:33
Contains state information related to the deque.
Definition: olaf_deque.c:26