Public Member Functions | |
Status () | |
By default Status is the zero-dim universe assertion. | |
bool | OK () const |
Checks if all the invariants are satisfied. | |
void | ascii_dump () const |
Writes to std::cerr an ASCII representation of *this . | |
void | ascii_dump (std::ostream &s) const |
Writes to s an ASCII representation of *this . | |
void | print () const |
Prints *this to std::cerr using operator<< . | |
bool | ascii_load (std::istream &s) |
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this accordingly. Returns true if successful, false otherwise. | |
Test, remove or add an individual assertion from the conjunction | |
bool | test_zero_dim_univ () const |
void | reset_zero_dim_univ () |
void | set_zero_dim_univ () |
bool | test_empty () const |
void | reset_empty () |
void | set_empty () |
bool | test_c_up_to_date () const |
void | reset_c_up_to_date () |
void | set_c_up_to_date () |
bool | test_g_up_to_date () const |
void | reset_g_up_to_date () |
void | set_g_up_to_date () |
bool | test_c_minimized () const |
void | reset_c_minimized () |
void | set_c_minimized () |
bool | test_g_minimized () const |
void | reset_g_minimized () |
void | set_g_minimized () |
bool | test_sat_c_up_to_date () const |
void | reset_sat_c_up_to_date () |
void | set_sat_c_up_to_date () |
bool | test_sat_g_up_to_date () const |
void | reset_sat_g_up_to_date () |
void | set_sat_g_up_to_date () |
bool | test_c_pending () const |
void | reset_c_pending () |
void | set_c_pending () |
bool | test_g_pending () const |
void | reset_g_pending () |
void | set_g_pending () |
Private Types | |
typedef unsigned int | flags_t |
Status is implemented by means of a finite bitset. | |
Private Member Functions | |
Status (flags_t mask) | |
Construct from a bit-mask. | |
bool | test_all (flags_t mask) const |
Check whether all bits in mask are set. | |
bool | test_any (flags_t mask) const |
Check whether at least one bit in mask is set. | |
void | set (flags_t mask) |
Set the bits in mask . | |
void | reset (flags_t mask) |
Reset the bits in mask . | |
Private Attributes | |
flags_t | flags |
This holds the current bitset. | |
Static Private Attributes | |
Bit-masks for the individual assertions | |
static const flags_t | ZERO_DIM_UNIV = 0U |
static const flags_t | EMPTY = 1U << 0 |
static const flags_t | C_UP_TO_DATE = 1U << 1 |
static const flags_t | G_UP_TO_DATE = 1U << 2 |
static const flags_t | C_MINIMIZED = 1U << 3 |
static const flags_t | G_MINIMIZED = 1U << 4 |
static const flags_t | SAT_C_UP_TO_DATE = 1U << 5 |
static const flags_t | SAT_G_UP_TO_DATE = 1U << 6 |
static const flags_t | CS_PENDING = 1U << 7 |
static const flags_t | GS_PENDING = 1U << 8 |
Related Functions | |
(Note that these are not member functions.) | |
bool | get_field (std::istream &s, const char *keyword, bool &positive) |
The assertions supported are:
Not all the conjunctions of these elementary assertions constitute a legal Status. In fact:
Definition at line 2120 of file Polyhedron.defs.hh.
typedef unsigned int Parma_Polyhedra_Library::Polyhedron::Status::flags_t [private] |
Status is implemented by means of a finite bitset.
Definition at line 2182 of file Polyhedron.defs.hh.
Parma_Polyhedra_Library::Polyhedron::Status::Status | ( | ) | [inline] |
By default Status is the zero-dim universe assertion.
Definition at line 34 of file Ph_Status.inlines.hh.
00035 : flags(ZERO_DIM_UNIV) { 00036 }
Parma_Polyhedra_Library::Polyhedron::Status::Status | ( | flags_t | mask | ) | [inline, private] |
Construct from a bit-mask.
Definition at line 29 of file Ph_Status.inlines.hh.
00030 : flags(mask) { 00031 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_zero_dim_univ | ( | ) | const [inline] |
Definition at line 59 of file Ph_Status.inlines.hh.
References flags, and ZERO_DIM_UNIV.
Referenced by Parma_Polyhedra_Library::Polyhedron::add_space_dimensions_and_embed(), Parma_Polyhedra_Library::Polyhedron::add_space_dimensions_and_project(), ascii_dump(), and OK().
00059 { 00060 return flags == ZERO_DIM_UNIV; 00061 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_zero_dim_univ | ( | ) | [inline] |
Definition at line 64 of file Ph_Status.inlines.hh.
References EMPTY, flags, and ZERO_DIM_UNIV.
00064 { 00065 // This is a no-op if the current status is not zero-dim. 00066 if (flags == ZERO_DIM_UNIV) 00067 // In the zero-dim space, if it is not the universe it is empty. 00068 flags = EMPTY; 00069 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_zero_dim_univ | ( | ) | [inline] |
Definition at line 72 of file Ph_Status.inlines.hh.
References flags, and ZERO_DIM_UNIV.
Referenced by Parma_Polyhedra_Library::Polyhedron::add_generator(), Parma_Polyhedra_Library::Polyhedron::add_recycled_generators(), Parma_Polyhedra_Library::Polyhedron::add_recycled_generators_and_minimize(), ascii_load(), Parma_Polyhedra_Library::Polyhedron::set_zero_dim_univ(), and Parma_Polyhedra_Library::Polyhedron::simplify_using_context_assign().
00072 { 00073 // Zero-dim universe is incompatible with anything else. 00074 flags = ZERO_DIM_UNIV; 00075 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_empty | ( | ) | const [inline] |
Definition at line 78 of file Ph_Status.inlines.hh.
References EMPTY, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::marked_empty(), and OK().
void Parma_Polyhedra_Library::Polyhedron::Status::reset_empty | ( | ) | [inline] |
Definition at line 83 of file Ph_Status.inlines.hh.
References EMPTY, and reset().
Referenced by Parma_Polyhedra_Library::Polyhedron::clear_empty(), and OK().
void Parma_Polyhedra_Library::Polyhedron::Status::set_empty | ( | ) | [inline] |
Definition at line 88 of file Ph_Status.inlines.hh.
Referenced by Parma_Polyhedra_Library::Polyhedron::add_recycled_constraints(), ascii_load(), Parma_Polyhedra_Library::Polyhedron::Polyhedron(), Parma_Polyhedra_Library::Polyhedron::refine_with_constraints(), and Parma_Polyhedra_Library::Polyhedron::set_empty().
bool Parma_Polyhedra_Library::Polyhedron::Status::test_c_up_to_date | ( | ) | const [inline] |
Definition at line 93 of file Ph_Status.inlines.hh.
References C_UP_TO_DATE, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::constraints_are_up_to_date(), and OK().
00093 { 00094 return test_any(C_UP_TO_DATE); 00095 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_c_up_to_date | ( | ) | [inline] |
Definition at line 98 of file Ph_Status.inlines.hh.
References C_UP_TO_DATE, and reset().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_constraints_up_to_date().
00098 { 00099 reset(C_UP_TO_DATE); 00100 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_c_up_to_date | ( | ) | [inline] |
Definition at line 103 of file Ph_Status.inlines.hh.
References C_UP_TO_DATE.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_constraints_up_to_date().
00103 { 00104 set(C_UP_TO_DATE); 00105 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_g_up_to_date | ( | ) | const [inline] |
Definition at line 108 of file Ph_Status.inlines.hh.
References G_UP_TO_DATE, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::generators_are_up_to_date(), and OK().
00108 { 00109 return test_any(G_UP_TO_DATE); 00110 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_g_up_to_date | ( | ) | [inline] |
Definition at line 113 of file Ph_Status.inlines.hh.
References G_UP_TO_DATE, and reset().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_generators_up_to_date().
00113 { 00114 reset(G_UP_TO_DATE); 00115 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_g_up_to_date | ( | ) | [inline] |
Definition at line 118 of file Ph_Status.inlines.hh.
References G_UP_TO_DATE.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_generators_up_to_date().
00118 { 00119 set(G_UP_TO_DATE); 00120 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_c_minimized | ( | ) | const [inline] |
Definition at line 123 of file Ph_Status.inlines.hh.
References C_MINIMIZED, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::constraints_are_minimized(), and OK().
00123 { 00124 return test_any(C_MINIMIZED); 00125 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_c_minimized | ( | ) | [inline] |
Definition at line 128 of file Ph_Status.inlines.hh.
References C_MINIMIZED, and reset().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_constraints_minimized().
00128 { 00129 reset(C_MINIMIZED); 00130 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_c_minimized | ( | ) | [inline] |
Definition at line 133 of file Ph_Status.inlines.hh.
References C_MINIMIZED.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_constraints_minimized().
00133 { 00134 set(C_MINIMIZED); 00135 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_g_minimized | ( | ) | const [inline] |
Definition at line 138 of file Ph_Status.inlines.hh.
References G_MINIMIZED, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::generators_are_minimized(), and OK().
00138 { 00139 return test_any(G_MINIMIZED); 00140 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_g_minimized | ( | ) | [inline] |
Definition at line 143 of file Ph_Status.inlines.hh.
References G_MINIMIZED, and reset().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_generators_minimized().
00143 { 00144 reset(G_MINIMIZED); 00145 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_g_minimized | ( | ) | [inline] |
Definition at line 148 of file Ph_Status.inlines.hh.
References G_MINIMIZED.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_generators_minimized().
00148 { 00149 set(G_MINIMIZED); 00150 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_sat_c_up_to_date | ( | ) | const [inline] |
Definition at line 185 of file Ph_Status.inlines.hh.
References SAT_C_UP_TO_DATE, and test_any().
Referenced by ascii_dump(), OK(), and Parma_Polyhedra_Library::Polyhedron::sat_c_is_up_to_date().
00185 { 00186 return test_any(SAT_C_UP_TO_DATE); 00187 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_sat_c_up_to_date | ( | ) | [inline] |
Definition at line 190 of file Ph_Status.inlines.hh.
References reset(), and SAT_C_UP_TO_DATE.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_sat_c_up_to_date().
00190 { 00191 reset(SAT_C_UP_TO_DATE); 00192 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_sat_c_up_to_date | ( | ) | [inline] |
Definition at line 195 of file Ph_Status.inlines.hh.
References SAT_C_UP_TO_DATE.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_sat_c_up_to_date().
00195 { 00196 set(SAT_C_UP_TO_DATE); 00197 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_sat_g_up_to_date | ( | ) | const [inline] |
Definition at line 200 of file Ph_Status.inlines.hh.
References SAT_G_UP_TO_DATE, and test_any().
Referenced by ascii_dump(), OK(), and Parma_Polyhedra_Library::Polyhedron::sat_g_is_up_to_date().
00200 { 00201 return test_any(SAT_G_UP_TO_DATE); 00202 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_sat_g_up_to_date | ( | ) | [inline] |
Definition at line 205 of file Ph_Status.inlines.hh.
References reset(), and SAT_G_UP_TO_DATE.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_sat_g_up_to_date().
00205 { 00206 reset(SAT_G_UP_TO_DATE); 00207 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_sat_g_up_to_date | ( | ) | [inline] |
Definition at line 210 of file Ph_Status.inlines.hh.
References SAT_G_UP_TO_DATE.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_sat_g_up_to_date().
00210 { 00211 set(SAT_G_UP_TO_DATE); 00212 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_c_pending | ( | ) | const [inline] |
Definition at line 154 of file Ph_Status.inlines.hh.
References CS_PENDING, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::has_pending_constraints(), Parma_Polyhedra_Library::Polyhedron::has_something_pending(), and OK().
00154 { 00155 return test_any(CS_PENDING); 00156 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_c_pending | ( | ) | [inline] |
Definition at line 159 of file Ph_Status.inlines.hh.
References CS_PENDING, and reset().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_pending_constraints().
00159 { 00160 reset(CS_PENDING); 00161 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_c_pending | ( | ) | [inline] |
Definition at line 164 of file Ph_Status.inlines.hh.
References CS_PENDING.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_constraints_pending().
00164 { 00165 set(CS_PENDING); 00166 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_g_pending | ( | ) | const [inline] |
Definition at line 169 of file Ph_Status.inlines.hh.
References GS_PENDING, and test_any().
Referenced by ascii_dump(), Parma_Polyhedra_Library::Polyhedron::has_pending_generators(), Parma_Polyhedra_Library::Polyhedron::has_something_pending(), and OK().
00169 { 00170 return test_any(GS_PENDING); 00171 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset_g_pending | ( | ) | [inline] |
Definition at line 174 of file Ph_Status.inlines.hh.
References GS_PENDING, and reset().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::clear_pending_generators().
00174 { 00175 reset(GS_PENDING); 00176 }
void Parma_Polyhedra_Library::Polyhedron::Status::set_g_pending | ( | ) | [inline] |
Definition at line 179 of file Ph_Status.inlines.hh.
References GS_PENDING.
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::set_generators_pending().
00179 { 00180 set(GS_PENDING); 00181 }
bool Parma_Polyhedra_Library::Polyhedron::Status::OK | ( | ) | const |
Checks if all the invariants are satisfied.
Definition at line 162 of file Ph_Status.cc.
References reset_empty(), test_c_minimized(), test_c_pending(), test_c_up_to_date(), test_empty(), test_g_minimized(), test_g_pending(), test_g_up_to_date(), test_sat_c_up_to_date(), test_sat_g_up_to_date(), and test_zero_dim_univ().
Referenced by ascii_load(), and Parma_Polyhedra_Library::Polyhedron::OK().
00162 { 00163 #ifndef NDEBUG 00164 using std::endl; 00165 using std::cerr; 00166 #endif 00167 00168 if (test_zero_dim_univ()) 00169 // Zero-dim universe is OK. 00170 return true; 00171 00172 if (test_empty()) { 00173 Status copy = *this; 00174 copy.reset_empty(); 00175 if (copy.test_zero_dim_univ()) 00176 return true; 00177 else { 00178 #ifndef NDEBUG 00179 cerr << "The empty flag is incompatible with any other one." 00180 << endl; 00181 #endif 00182 return false; 00183 } 00184 } 00185 00186 if ((test_sat_c_up_to_date() || test_sat_g_up_to_date()) 00187 && !(test_c_up_to_date() && test_g_up_to_date())) { 00188 #ifndef NDEBUG 00189 cerr << 00190 "If a saturation matrix is up-to-date, constraints and\n" 00191 "generators have to be both up-to-date." 00192 << endl; 00193 #endif 00194 return false; 00195 } 00196 00197 if (test_c_minimized() && !test_c_up_to_date()) { 00198 #ifndef NDEBUG 00199 cerr << "If constraints are minimized they must be up-to-date." 00200 << endl; 00201 #endif 00202 return false; 00203 } 00204 00205 if (test_g_minimized() && !test_g_up_to_date()) { 00206 #ifndef NDEBUG 00207 cerr << "If generators are minimized they must be up-to-date." 00208 << endl; 00209 #endif 00210 return false; 00211 } 00212 00213 if (test_c_pending() && test_g_pending()) { 00214 #ifndef NDEBUG 00215 cerr << "There cannot be both pending constraints and pending generators." 00216 << endl; 00217 #endif 00218 return false; 00219 } 00220 00221 if (test_c_pending() || test_g_pending()) { 00222 if (!test_c_minimized() || !test_g_minimized()) { 00223 #ifndef NDEBUG 00224 cerr << 00225 "If there are pending constraints or generators, constraints\n" 00226 "and generators must be minimized." 00227 << endl; 00228 #endif 00229 return false; 00230 } 00231 00232 if (!test_sat_c_up_to_date() && !test_sat_g_up_to_date()) { 00233 #ifndef NDEBUG 00234 cerr << 00235 "If there are pending constraints or generators, there must\n" 00236 "be at least a saturation matrix up-to-date." 00237 << endl; 00238 #endif 00239 return false; 00240 } 00241 } 00242 00243 // Any other case is OK. 00244 return true; 00245 }
void Parma_Polyhedra_Library::Polyhedron::Status::ascii_dump | ( | ) | const |
Writes to std::cerr
an ASCII representation of *this
.
Referenced by Parma_Polyhedra_Library::Polyhedron::ascii_dump().
void Parma_Polyhedra_Library::Polyhedron::Status::ascii_dump | ( | std::ostream & | s | ) | const |
Writes to s
an ASCII representation of *this
.
Definition at line 67 of file Ph_Status.cc.
References consys_min, consys_pending, consys_upd, empty, gensys_min, gensys_pending, gensys_upd, satc_upd, satg_upd, test_c_minimized(), test_c_pending(), test_c_up_to_date(), test_empty(), test_g_minimized(), test_g_pending(), test_g_up_to_date(), test_sat_c_up_to_date(), test_sat_g_up_to_date(), test_zero_dim_univ(), and zero_dim_univ.
00067 { 00068 s << (test_zero_dim_univ() ? '+' : '-') << zero_dim_univ << ' ' 00069 << (test_empty() ? '+' : '-') << empty << ' ' 00070 << ' ' 00071 << (test_c_minimized() ? '+' : '-') << consys_min << ' ' 00072 << (test_g_minimized() ? '+' : '-') << gensys_min << ' ' 00073 << ' ' 00074 << (test_c_up_to_date() ? '+' : '-') << consys_upd << ' ' 00075 << (test_g_up_to_date() ? '+' : '-') << gensys_upd << ' ' 00076 << ' ' 00077 << (test_c_pending() ? '+' : '-') << consys_pending << ' ' 00078 << (test_g_pending() ? '+' : '-') << gensys_pending << ' ' 00079 << ' ' 00080 << (test_sat_c_up_to_date() ? '+' : '-') << satc_upd << ' ' 00081 << (test_sat_g_up_to_date() ? '+' : '-') << satg_upd << ' '; 00082 }
void Parma_Polyhedra_Library::Polyhedron::Status::print | ( | ) | const |
Prints *this
to std::cerr
using operator<<
.
bool Parma_Polyhedra_Library::Polyhedron::Status::ascii_load | ( | std::istream & | s | ) |
Loads from s
an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this
accordingly. Returns true
if successful, false
otherwise.
Definition at line 87 of file Ph_Status.cc.
References consys_min, consys_pending, consys_upd, empty, gensys_min, gensys_pending, gensys_upd, get_field(), OK(), reset_c_minimized(), reset_c_pending(), reset_c_up_to_date(), reset_g_minimized(), reset_g_pending(), reset_g_up_to_date(), reset_sat_c_up_to_date(), reset_sat_g_up_to_date(), satc_upd, satg_upd, set_c_minimized(), set_c_pending(), set_c_up_to_date(), set_empty(), set_g_minimized(), set_g_pending(), set_g_up_to_date(), set_sat_c_up_to_date(), set_sat_g_up_to_date(), set_zero_dim_univ(), and zero_dim_univ.
Referenced by Parma_Polyhedra_Library::Polyhedron::ascii_load().
00087 { 00088 bool positive; 00089 00090 if (!get_field(s, zero_dim_univ, positive)) 00091 return false; 00092 if (positive) 00093 set_zero_dim_univ(); 00094 00095 if (!get_field(s, empty, positive)) 00096 return false; 00097 if (positive) 00098 set_empty(); 00099 00100 if (!get_field(s, consys_min, positive)) 00101 return false; 00102 if (positive) 00103 set_c_minimized(); 00104 else 00105 reset_c_minimized(); 00106 00107 if (!get_field(s, gensys_min, positive)) 00108 return false; 00109 if (positive) 00110 set_g_minimized(); 00111 else 00112 reset_g_minimized(); 00113 00114 if (!get_field(s, consys_upd, positive)) 00115 return false; 00116 if (positive) 00117 set_c_up_to_date(); 00118 else 00119 reset_c_up_to_date(); 00120 00121 if (!get_field(s, gensys_upd, positive)) 00122 return false; 00123 if (positive) 00124 set_g_up_to_date(); 00125 else 00126 reset_g_up_to_date(); 00127 00128 if (!get_field(s, consys_pending, positive)) 00129 return false; 00130 if (positive) 00131 set_c_pending(); 00132 else 00133 reset_c_pending(); 00134 00135 if (!get_field(s, gensys_pending, positive)) 00136 return false; 00137 if (positive) 00138 set_g_pending(); 00139 else 00140 reset_g_pending(); 00141 00142 if (!get_field(s, satc_upd, positive)) 00143 return false; 00144 if (positive) 00145 set_sat_c_up_to_date(); 00146 else 00147 reset_sat_c_up_to_date(); 00148 00149 if (!get_field(s, satg_upd, positive)) 00150 return false; 00151 if (positive) 00152 set_sat_g_up_to_date(); 00153 else 00154 reset_sat_g_up_to_date(); 00155 00156 // Check invariants. 00157 assert(OK()); 00158 return true; 00159 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_all | ( | flags_t | mask | ) | const [inline, private] |
Check whether all bits in mask
are set.
Definition at line 39 of file Ph_Status.inlines.hh.
References flags.
00039 { 00040 return (flags & mask) == mask; 00041 }
bool Parma_Polyhedra_Library::Polyhedron::Status::test_any | ( | flags_t | mask | ) | const [inline, private] |
Check whether at least one bit in mask
is set.
Definition at line 44 of file Ph_Status.inlines.hh.
References flags.
Referenced by test_c_minimized(), test_c_pending(), test_c_up_to_date(), test_empty(), test_g_minimized(), test_g_pending(), test_g_up_to_date(), test_sat_c_up_to_date(), and test_sat_g_up_to_date().
00044 { 00045 return flags & mask; 00046 }
void Parma_Polyhedra_Library::Polyhedron::Status::set | ( | flags_t | mask | ) | [inline, private] |
Set the bits in mask
.
Definition at line 49 of file Ph_Status.inlines.hh.
References flags.
00049 { 00050 flags |= mask; 00051 }
void Parma_Polyhedra_Library::Polyhedron::Status::reset | ( | flags_t | mask | ) | [inline, private] |
Reset the bits in mask
.
Definition at line 54 of file Ph_Status.inlines.hh.
References flags.
Referenced by reset_c_minimized(), reset_c_pending(), reset_c_up_to_date(), reset_empty(), reset_g_minimized(), reset_g_pending(), reset_g_up_to_date(), reset_sat_c_up_to_date(), and reset_sat_g_up_to_date().
00054 { 00055 flags &= ~mask; 00056 }
bool get_field | ( | std::istream & | s, | |
const char * | keyword, | |||
bool & | positive | |||
) | [related] |
Reads a keyword and its associated on/off, +/- flag from s
. Returns true
if the operation is successful, returns false
otherwise. When successful, positive
is set to true
if the flag is on; it is set to false
otherwise.
Definition at line 54 of file Ph_Status.cc.
Referenced by ascii_load().
00054 { 00055 std::string str; 00056 if (!(s >> str) 00057 || (str[0] != '+' && str[0] != '-') 00058 || str.substr(1) != keyword) 00059 return false; 00060 positive = (str[0] == '+'); 00061 return true; 00062 }
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::ZERO_DIM_UNIV = 0U [static, private] |
Definition at line 2186 of file Polyhedron.defs.hh.
Referenced by reset_zero_dim_univ(), set_zero_dim_univ(), and test_zero_dim_univ().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::EMPTY = 1U << 0 [static, private] |
Definition at line 2187 of file Polyhedron.defs.hh.
Referenced by reset_empty(), reset_zero_dim_univ(), set_empty(), and test_empty().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::C_UP_TO_DATE = 1U << 1 [static, private] |
Definition at line 2188 of file Polyhedron.defs.hh.
Referenced by reset_c_up_to_date(), set_c_up_to_date(), and test_c_up_to_date().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::G_UP_TO_DATE = 1U << 2 [static, private] |
Definition at line 2189 of file Polyhedron.defs.hh.
Referenced by reset_g_up_to_date(), set_g_up_to_date(), and test_g_up_to_date().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::C_MINIMIZED = 1U << 3 [static, private] |
Definition at line 2190 of file Polyhedron.defs.hh.
Referenced by reset_c_minimized(), set_c_minimized(), and test_c_minimized().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::G_MINIMIZED = 1U << 4 [static, private] |
Definition at line 2191 of file Polyhedron.defs.hh.
Referenced by reset_g_minimized(), set_g_minimized(), and test_g_minimized().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::SAT_C_UP_TO_DATE = 1U << 5 [static, private] |
Definition at line 2192 of file Polyhedron.defs.hh.
Referenced by reset_sat_c_up_to_date(), set_sat_c_up_to_date(), and test_sat_c_up_to_date().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::SAT_G_UP_TO_DATE = 1U << 6 [static, private] |
Definition at line 2193 of file Polyhedron.defs.hh.
Referenced by reset_sat_g_up_to_date(), set_sat_g_up_to_date(), and test_sat_g_up_to_date().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::CS_PENDING = 1U << 7 [static, private] |
Definition at line 2194 of file Polyhedron.defs.hh.
Referenced by reset_c_pending(), set_c_pending(), and test_c_pending().
const flags_t Parma_Polyhedra_Library::Polyhedron::Status::GS_PENDING = 1U << 8 [static, private] |
Definition at line 2195 of file Polyhedron.defs.hh.
Referenced by reset_g_pending(), set_g_pending(), and test_g_pending().
This holds the current bitset.
Definition at line 2199 of file Polyhedron.defs.hh.
Referenced by reset(), reset_zero_dim_univ(), set(), set_empty(), set_zero_dim_univ(), test_all(), test_any(), and test_zero_dim_univ().