54 { (d_below[y] |= d_below[x]).
insert(x); }
66 explicit Poset(
const std::vector<C>& hasse);
69 Poset(
size_t n,
const std::vector<Link>&);
87 {
return i<j ? d_below[j].isMember(i) : i==j; }
91 size_t size()
const {
return d_below.size(); }
109 void resize(
unsigned long);
126 void extend(
const std::vector<Link>& lks)
128 for (
size_t i=0; i<lks.size(); ++i)
133 template<
typename C>
void new_max(C container)
135 size_t y=d_below.size();
138 for (
typename C::const_iterator
139 it=container.begin(); it!=container.end(); ++it)
150 (
const std::vector<set::EltList>& hasse);
165 for (
size_t i=0; i<hasse.size(); ++i)
168 for (
typename C::const_iterator
169 it=hasse[i].begin(); it!=hasse[i].end(); ++it)
size_t Elt
Definition: Atlas.h:52
bool operator==(const Poset &other) const
Definition: poset.cpp:79
size_t size() const
Definition: poset.h:91
uA p
Definition: lists.cpp:26
bitmap::BitMap above(set::Elt x) const
Definition: poset.cpp:91
std::vector< bitmap::BitMap > d_below
Matrix of order relations.
Definition: poset.h:50
set::EltList minima(const bitmap::BitMap &) const
Definition: poset.cpp:119
void swap(Poset &other)
Definition: poset.h:76
Poset()
Definition: poset.h:60
void extend(const std::vector< Link > &lks)
Transforms the poset into the weakest ordering containing the relations it previously contained...
Definition: poset.h:126
set::EltList covered_by(set::Elt y) const
Definition: poset.h:99
unsigned long n_comparable() const
Number of comparable pairs (including those on the diagonal)
Definition: poset.cpp:188
const bitmap::BitMap & below(set::Elt y) const
Definition: poset.h:93
bool lesseq(set::Elt i, set::Elt j) const
The order relation itself.
Definition: poset.h:86
void new_cover(unsigned long x, unsigned long y)
The basic method to add elementary relations.
Definition: poset.h:53
Represents a poset by the matrix of order relations.
Definition: poset.h:39
graph::OrientedGraph hasseDiagram() const
Puts in h the Hasse diagram of the poset.
Definition: poset.cpp:156
Definitions and declarations for the BitMap class.
void new_max(C container)
Definition: poset.h:133
unsigned long n
Definition: axis.cpp:77
~Poset()
Definition: poset.h:73
std::vector< Elt > EltList
Definition: Atlas.h:53
Container of a large (more than twice the machine word size) set of bits.
Definition: bitmap.h:52
set::EltList covers_of(set::Elt x) const
Definition: poset.cpp:130
void resize(unsigned long)
Resizes the poset to size n, adding only the diagonal for the new rows.
Definition: poset.cpp:203
unsigned long n_comparable_from_Hasse(const std::vector< set::EltList > &hasse)
Definition: poset.cpp:225
set::EltList maxima(const bitmap::BitMap &) const
Definition: poset.cpp:108