abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Minisat::lbool Class Reference

#include <SolverTypes.h>

Public Member Functions

 lbool (uint8_t v)
 
 lbool ()
 
 lbool (bool x)
 
bool operator== (lbool b) const
 
bool operator!= (lbool b) const
 
lbool operator^ (bool b) const
 
lbool operator&& (lbool b) const
 
lbool operator|| (lbool b) const
 

Private Attributes

uint8_t value
 

Friends

int toInt (lbool l)
 
lbool toLbool (int v)
 

Detailed Description

Definition at line 88 of file SolverTypes.h.

Constructor & Destructor Documentation

Minisat::lbool::lbool ( uint8_t  v)
inlineexplicit

Definition at line 92 of file SolverTypes.h.

92 : value(v) { }
uint8_t value
Definition: SolverTypes.h:89
Minisat::lbool::lbool ( )
inline

Definition at line 94 of file SolverTypes.h.

94 : value(0) { }
uint8_t value
Definition: SolverTypes.h:89
Minisat::lbool::lbool ( bool  x)
inlineexplicit

Definition at line 95 of file SolverTypes.h.

95 : value(!x) { }
uint8_t value
Definition: SolverTypes.h:89

Member Function Documentation

bool Minisat::lbool::operator!= ( lbool  b) const
inline

Definition at line 98 of file SolverTypes.h.

98 { return !(*this == b); }
lbool Minisat::lbool::operator&& ( lbool  b) const
inline

Definition at line 101 of file SolverTypes.h.

101  {
102  uint8_t sel = (this->value << 1) | (b.value << 3);
103  uint8_t v = (0xF7F755F4 >> sel) & 3;
104  return lbool(v); }
uint8_t value
Definition: SolverTypes.h:89
bool Minisat::lbool::operator== ( lbool  b) const
inline

Definition at line 97 of file SolverTypes.h.

97 { return ((b.value&2) & (value&2)) | (!(b.value&2)&(value == b.value)); }
uint8_t value
Definition: SolverTypes.h:89
lbool Minisat::lbool::operator^ ( bool  b) const
inline

Definition at line 99 of file SolverTypes.h.

99 { return lbool((uint8_t)(value^(uint8_t)b)); }
uint8_t value
Definition: SolverTypes.h:89
lbool Minisat::lbool::operator|| ( lbool  b) const
inline

Definition at line 106 of file SolverTypes.h.

106  {
107  uint8_t sel = (this->value << 1) | (b.value << 3);
108  uint8_t v = (0xFCFCF400 >> sel) & 3;
109  return lbool(v); }
uint8_t value
Definition: SolverTypes.h:89

Friends And Related Function Documentation

int toInt ( lbool  l)
friend

Definition at line 114 of file SolverTypes.h.

114 { return l.value; }
lbool toLbool ( int  v)
friend

Definition at line 115 of file SolverTypes.h.

115 { return lbool((uint8_t)v); }

Field Documentation

uint8_t Minisat::lbool::value
private

Definition at line 89 of file SolverTypes.h.


The documentation for this class was generated from the following file: