Declaration and implementation of Array class and Array algorithms. More...
#include <ogdf/basic/basic.h>Go to the source code of this file.
Classes | |
| class | ogdf::Array< E, INDEX > |
| The parameterized class Array<E,INDEX> implements dynamic arrays of type E. More... | |
Namespaces | |
| namespace | ogdf |
The namespace for all OGDF objects. | |
Defines | |
| #define | forall_arrayindices(i, A) for(i = (A).low(); i<=(A).high(); ++i) |
| Iteration over all indices i of an array A. | |
| #define | forall_rev_arrayindices(i, A) for(i = (A).high(); i>=(A).low(); --i) |
| Iteration over all indices i of an array A, in reverse order. | |
Functions | |
| template<class E , class INDEX > | |
| void | ogdf::print (ostream &os, const Array< E, INDEX > &a, char delim= ' ') |
| template<class E , class INDEX > | |
| ostream & | ogdf::operator<< (ostream &os, const ogdf::Array< E, INDEX > &a) |
Variables | |
| const size_t | ogdf::maxSizeInsertionSort = 40 |
Declaration and implementation of Array class and Array algorithms.
Copyright (C). All rights reserved. See README.txt in the root directory of the OGDF installation for details.
Definition in file Array.h.
| #define forall_arrayindices | ( | i, | ||
| A | ||||
| ) | for(i = (A).low(); i<=(A).high(); ++i) |
Iteration over all indices i of an array A.
Note that the index variable i has to be defined prior to this macro (just as for forall_edges, etc.).
Array<double> A; ... int i; forall_arrayindices(i, A) { cout << A[i] << endl; }
Note that this code is equivalent to the following tedious long version
Array<double> A; ... int i; for(i = A.low(); i <= A.high(); ++i) { cout << A[i] << endl; }
| #define forall_rev_arrayindices | ( | i, | ||
| A | ||||
| ) | for(i = (A).high(); i>=(A).low(); --i) |
Iteration over all indices i of an array A, in reverse order.
Note that the index variable i has to be defined prior to this macro (just as for forall_edges, etc.). See forall_arrayindices for an example