divisible.h
Go to the documentation of this file.
/********************* */
#include "cvc4_public.h"
#ifndef __CVC4__DIVISIBLE_H
#define __CVC4__DIVISIBLE_H
#include <iostream>
#include "util/integer.h"
#include "util/exception.h"
namespace CVC4 {
struct CVC4_PUBLIC Divisible {
const Integer k;
Divisible(const Integer& n);
bool operator==(const Divisible& d) const {
return k == d.k;
}
bool operator!=(const Divisible& d) const {
return !(*this == d);
}
};/* struct Divisible */
struct CVC4_PUBLIC DivisibleHashFunction {
size_t operator()(const Divisible& d) const {
return d.k.hash();
}
};/* struct DivisibleHashFunction */
inline std::ostream& operator <<(std::ostream& os, const Divisible& d) CVC4_PUBLIC;
inline std::ostream& operator <<(std::ostream& os, const Divisible& d) {
return os << "divisible-by-" << d.k;
}
}/* CVC4 namespace */
#endif /* __CVC4__DIVISIBLE_H */
CVC4::Integer
Definition integer_gmp_imp.h:34
CVC4::Integer::hash
size_t hash() const
Computes the hash of the node from the first word of the numerator, the denominator.
Definition integer_cln_imp.h:450
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4_PUBLIC
#define CVC4_PUBLIC
Definition cvc4_public.h:30
exception.h
CVC4's exception base class and some associated utilities.
CVC4
Definition expr.h:106
CVC4::operator<<
std::ostream & operator<<(std::ostream &out, const TypeCheckingException &e)
CVC4::DivisibleHashFunction
Hash function for the Divisible objects.
Definition divisible.h:49
CVC4::DivisibleHashFunction::operator()
size_t operator()(const Divisible &d) const
Definition divisible.h:50
CVC4::Divisible
The structure representing the divisibility-by-k predicate.
Definition divisible.h:32
CVC4::Divisible::Divisible
Divisible(const Integer &n)
CVC4::Divisible::k
const Integer k
Definition divisible.h:33
CVC4::Divisible::operator!=
bool operator!=(const Divisible &d) const
Definition divisible.h:41
CVC4::Divisible::operator==
bool operator==(const Divisible &d) const
Definition divisible.h:37