PolyBoRi
Public Types | Public Member Functions | Protected Attributes | List of all members
polybori::BooleConstant Class Reference

This class wraps a bool value, which was not converted to a boolean polynomial or monomial yet. More...

#include <BooleConstant.h>

Inheritance diagram for polybori::BooleConstant:
polybori::CTypes polybori::COrderEnums polybori::CErrorEnums polybori::CCompareEnums polybori::CAuxTypes

Public Types

typedef const selfconst_iterator
 Define dummy iterator. More...
 
- Public Types inherited from polybori::CTypes
typedef COrderEnums orderenums_type
 
typedef CErrorEnums errorenums_type
 
typedef CCompareEnums compenums_type
 
typedef CAuxTypes auxtypes_type
 
- Public Types inherited from polybori::COrderEnums
enum  ordercodes {
  lp, dlex, dp_asc, block_dlex,
  block_dp_asc
}
 Codes For orderings. More...
 
- Public Types inherited from polybori::CErrorEnums
enum  errorcodes {
  alright = 0, failed, no_ring, invalid,
  out_of_bounds, io_error, monomial_zero, illegal_on_zero,
  division_by_zero, invalid_ite, not_implemented, matrix_size_exceeded,
  last_error
}
 Error codes enumeration. More...
 
- Public Types inherited from polybori::CCompareEnums
enum  comparecodes {
  less_than = -1, equality = 0, greater_than = +1, less_or_equal_max = 0,
  greater_or_equal_min = 0
}
 Comparision codes enumeration. More...
 
enum  { max_idx = CUDD_MAXINDEX }
 
- Public Types inherited from polybori::CAuxTypes
typedef bool bool_type
 Type for standard true/false statements. More...
 
typedef std::size_t size_type
 Type for lengths, dimensions, etc. More...
 
typedef int deg_type
 Type for polynomial degrees (ranges from -1 to maxint) More...
 
typedef int integer_type
 Type for integer numbers. More...
 
typedef int idx_type
 Type for indices. More...
 
typedef std::size_t hash_type
 Type for hashing. More...
 
typedef unsigned int errornum_type
 Type used to store error codes. More...
 
typedef short int comp_type
 Type for comparisons. More...
 
typedef int ordercode_type
 Type for ordering codes. More...
 
typedef const char * errortext_type
 Type used to verbose error information. More...
 
typedef std::ostream ostream_type
 Type for out-stream. More...
 
typedef const char * vartext_type
 Type for setting/getting names of variables. More...
 
typedef unsigned long large_size_type
 large size_type (necessary?) More...
 
typedef std::size_t refcount_type
 Type for counting references. More...
 

Public Member Functions

 BooleConstant ()
 Default constructor. More...
 
 BooleConstant (bool value)
 constructor for bool values More...
 
 BooleConstant (short value)
 Constructor for short integer values (nontrivial conversion) More...
 
 BooleConstant (unsigned short value)
 Constructor for unsigned shoer integer values (nontrivial conversion) More...
 
 BooleConstant (int value)
 Constructor for integer values (nontrivial conversion) More...
 
 BooleConstant (unsigned int value)
 Constructor for unsigned integer values (nontrivial conversion) More...
 
 BooleConstant (long value)
 Constructor for long integer values (nontrivial conversion) More...
 
 BooleConstant (unsigned long value)
 Constructor for unsigned long integer values (nontrivial conversion) More...
 
 operator bool () const
 Convert to bool value. More...
 
BooleConstant operator! () const
 Negation operation. More...
 
deg_type deg () const
 Get constant degree. More...
 
const_iterator orderedBegin () const
 Start polynomial-style iterations. More...
 
const_iterator orderedEnd () const
 Finish polynomial-style iterations. More...
 
const_iterator variableBegin () const
 Start empty monomial iteration. More...
 
const_iterator variableEnd () const
 Finish empty monomial iteration. More...
 
bool isOne () const
 Mimic constant monomial or polynmomial term. More...
 
bool isZero () const
 
bool isConstant () const
 
bool hasConstantPart () const
 

Protected Attributes

const bool m_value
 Boolean value is stored as simple bool. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from polybori::CTypes
static idx_type max_index ()
 Type of interface to binary decicion diagrams. More...
 

Detailed Description

This class wraps a bool value, which was not converted to a boolean polynomial or monomial yet.

This is mostly equivalent to the built-in type bool. Only conversion from integer values to BooleConstant is nontrivial, as it involves the modulo 2 operation.

The class partially implements the interfaces of BoolePolynomial and BooleMonomial.

Note
Since BooleConstant(1) may be interpreted as monomial as well as polynomial, we skip member functions, that have different meanings for polynomials and monomials (like begin() and end()).

Member Typedef Documentation

Define dummy iterator.

Constructor & Destructor Documentation

polybori::BooleConstant::BooleConstant ( )
inline

Default constructor.

polybori::BooleConstant::BooleConstant ( bool  value)
inline

constructor for bool values

polybori::BooleConstant::BooleConstant ( short  value)
inline

Constructor for short integer values (nontrivial conversion)

polybori::BooleConstant::BooleConstant ( unsigned short  value)
inline

Constructor for unsigned shoer integer values (nontrivial conversion)

polybori::BooleConstant::BooleConstant ( int  value)
inline

Constructor for integer values (nontrivial conversion)

polybori::BooleConstant::BooleConstant ( unsigned int  value)
inline

Constructor for unsigned integer values (nontrivial conversion)

polybori::BooleConstant::BooleConstant ( long  value)
inline

Constructor for long integer values (nontrivial conversion)

polybori::BooleConstant::BooleConstant ( unsigned long  value)
inline

Constructor for unsigned long integer values (nontrivial conversion)

Member Function Documentation

deg_type polybori::BooleConstant::deg ( ) const
inline

Get constant degree.

bool polybori::BooleConstant::hasConstantPart ( ) const
inline
bool polybori::BooleConstant::isConstant ( ) const
inline
bool polybori::BooleConstant::isOne ( ) const
inline

Mimic constant monomial or polynmomial term.

bool polybori::BooleConstant::isZero ( ) const
inline
polybori::BooleConstant::operator bool ( ) const
inline

Convert to bool value.

BooleConstant polybori::BooleConstant::operator! ( ) const
inline

Negation operation.

const_iterator polybori::BooleConstant::orderedBegin ( ) const
inline

Start polynomial-style iterations.

const_iterator polybori::BooleConstant::orderedEnd ( ) const
inline

Finish polynomial-style iterations.

const_iterator polybori::BooleConstant::variableBegin ( ) const
inline

Start empty monomial iteration.

const_iterator polybori::BooleConstant::variableEnd ( ) const
inline

Finish empty monomial iteration.

Member Data Documentation

const bool polybori::BooleConstant::m_value
protected

Boolean value is stored as simple bool.


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