-
Notifications
You must be signed in to change notification settings - Fork 5
/
posets.h
68 lines (51 loc) · 1.3 KB
/
posets.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
This is posets.h
Coxeter version 3.0 Copyright (C) 2002 Fokko du Cloux
See file main.cpp for full copyright notice
*/
#ifndef POSETS_H /* guard against multiple inclusions */
#define POSETS_H
#include "globals.h"
namespace posets {
using namespace coxeter;
};
/******** type declarations *************************************************/
namespace posets {
typedef Ulong PosetElt;
class Poset;
};
/******** type definitions **************************************************/
#include "bits.h"
#include "list.h"
#include "memory.h"
#include "wgraph.h"
namespace posets {
using namespace bits;
using namespace list;
using namespace wgraph;
};
namespace posets {
class Poset {
List<BitMap> d_closure;
public:
/* constructors and destructors */
void operator delete(void* ptr, size_t size)
{return arena().free(ptr,sizeof(Poset));}
Poset();
Poset(const Ulong &n);
Poset(const OrientedGraph& G);
~Poset();
/* manipulators */
/* accessors */
void findMaximals(const BitMap& D, Set& a) const;
bool isTriangular() const;
Ulong size() const;
void hasseDiagram(OrientedGraph& H);
/* input/output */
};
};
/******** inline implementations ********************************************/
namespace posets {
inline Ulong Poset::size() const {return d_closure.size();}
};
#endif