SoPlex
Toggle main menu visibility
Loading...
Searching...
No Matches
src
soplex
cring.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the class library */
4
/* SoPlex --- the Sequential object-oriented simPlex. */
5
/* */
6
/* Copyright (c) 1996-2026 Zuse Institute Berlin (ZIB) */
7
/* */
8
/* Licensed under the Apache License, Version 2.0 (the "License"); */
9
/* you may not use this file except in compliance with the License. */
10
/* You may obtain a copy of the License at */
11
/* */
12
/* http://www.apache.org/licenses/LICENSE-2.0 */
13
/* */
14
/* Unless required by applicable law or agreed to in writing, software */
15
/* distributed under the License is distributed on an "AS IS" BASIS, */
16
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17
/* See the License for the specific language governing permissions and */
18
/* limitations under the License. */
19
/* */
20
/* You should have received a copy of the Apache-2.0 license */
21
/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22
/* */
23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25
#ifndef _CRING_H_
26
#define _CRING_H_
27
28
/***************************************************************
29
Double linked ring
30
***************************************************************/
31
32
#define initDR(ring) ((ring).prev = (ring).next = &(ring))
33
34
#define init2DR(elem, ring) \
35
{ \
36
(elem).next = (ring).next; \
37
(elem).next->prev = &(elem); \
38
(elem).prev = &(ring); \
39
(ring).next = &(elem); \
40
}
41
42
#define removeDR(ring) \
43
{ \
44
(ring).next->prev = (ring).prev; \
45
(ring).prev->next = (ring).next; \
46
}
47
48
#endif
// _CRING_H_
Generated by
1.17.0