3#include "containers/ClauseExchange.hpp"
18#define _jenkins_rot(x, k) (((x) << (k)) | ((x) >> (32 - (k))))
31 s2 -= _jenkins_rot(s1, 14);
33 key -= _jenkins_rot(s2, 11);
35 s1 -= _jenkins_rot(key, 25);
37 s2 -= _jenkins_rot(s1, 16);
39 key -= _jenkins_rot(s2, 4);
41 s1 -= _jenkins_rot(key, 14);
43 s2 -= _jenkins_rot(s1, 24);
60 for (
unsigned int i = 1; i < size; i++) {
81operator==(
const simpleClause& lhs,
const simpleClause& rhs);
96 std::size_t operator()(
const simpleClause& clause)
const {
return hashClause(clause); }
121 for (
int lit : left) {
124 if (lit == right[ri]) {
130 if (std::find(right.
begin() + ri + 1, right.
end(), lit) == right.
end())
144 std::size_t operator()(
const ClauseExchangePtr& clause)
const {
return ClauseExchangeHash()(*clause); }
152 bool operator()(
const ClauseExchangePtr& left,
const ClauseExchangePtr& right)
const
Represents an exchangeable clause with flexible array member.
Definition ClauseExchange.hpp:42
int lits[0]
Flexible array member for storing clause literals (must be last)
Definition ClauseExchange.hpp:48
int * begin()
Get iterator to the beginning of the clause.
Definition ClauseExchange.hpp:111
int * end()
Get iterator to the end of the clause.
Definition ClauseExchange.hpp:117
unsigned int size
Size of the clause.
Definition ClauseExchange.hpp:46
Helping Functions for Clause Management (Hash and Equality)
Definition ClauseUtils.hpp:12
size_t lookup3_hash_clause(const int *clause, unsigned int size)
Computes a hash value for a clause using the Jenkins lookup3 algorithm.
Definition ClauseUtils.hpp:55
size_t lookup3_hash(size_t key)
Computes a hash value for a single key using the Jenkins lookup3 algorithm.
Definition ClauseUtils.hpp:26
bool operator==(const simpleClause &lhs, const simpleClause &rhs)
Equality operator for simple clauses.
std::size_t hashClause(const simpleClause &clause)
Computes a hash value for a simple clause.
int getLiteralsCount(const std::vector< ClauseExchangePtr > &clauses)
Calculates the total number of literals in a vector of clauses.
Equality functor for ClauseExchange objects.
Definition ClauseUtils.hpp:112
Hash functor for ClauseExchange objects.
Definition ClauseUtils.hpp:103
Equality functor for ClauseExchangePtr objects.
Definition ClauseUtils.hpp:151
Hash functor for ClauseExchangePtr objects.
Definition ClauseUtils.hpp:143
Hash functor for simple clauses.
Definition ClauseUtils.hpp:95