Class documentation of Concepts

Loading...
Searching...
No Matches
level.hh
Go to the documentation of this file.
1
6#ifndef level_hh
7#define level_hh
8
9#include <iostream>
10#include "typedefs.hh"
11
12namespace concepts {
13
14 // ***************************************************************** Level **
15
21 template<uint dim>
22 struct Level {
24 short l_[dim];
25
27 Level(const Level<dim>& l) {
28 for (uint i = 0; i < dim; ++i) l_[i] = l.l_[i]; }
30 Level(short l) { for (uint i = 0; i < dim; ++i) l_[i] = l; }
32 Level() { for (uint i = 0; i < dim; ++i) l_[i] = 0; }
33
35 void set(short l, uint i);
38
42 bool operator<(const Level<dim>& c) const;
46 bool operator>(const Level<dim>& c) const;
50 bool operator==(const Level<dim>& c) const;
51
54
57
59 void minimize(const Level<dim>& c);
61 void maximize(const Level<dim>& c);
62 };
63
64 template<uint dim>
65 std::ostream& operator<<(std::ostream& os, const Level<dim>& c);
66
67} // namespace concepts
68
69#endif // level_hh
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320
Level< dim > operator+(const Level< dim > &c) const
Addition operator.
Level(const Level< dim > &l)
Constructor.
Definition level.hh:27
Level()
Default constructor.
Definition level.hh:32
Level(short l)
Constructor.
Definition level.hh:30
void minimize(const Level< dim > &c)
Componentwise minimization.
bool operator==(const Level< dim > &c) const
void set(short l, uint i)
set Level
short l_[dim]
Level.
Definition level.hh:24
bool operator>(const Level< dim > &c) const
void maximize(const Level< dim > &c)
Componentwise maximazation.
Level< dim > operator-(const Level< dim > &c) const
Subtraction operator.
bool operator<(const Level< dim > &c) const
Level< dim > & operator=(const Level< dim > &c)
Assignement operator.