Skip to content

Namespace test_utils

Classes

Type Name
class Solver
class VectorContainer

Public Types

Type Name
typedef std::unordered_map< std::int64_t, bool > Assignment

Public Functions

Type Name
check_consistency (Solver & s, const Paramita::PbConstraint & pb)
check_consistency (Paramita::PbToCnfEncoder & encoder, const Paramita::PbConstraint & pb)
check_max_var (Paramita::PbToCnfEncoder & encoder, const Paramita::PbConstraint & pb, int start_max_var)
bool evaluate_pb (const Paramita::PbConstraint & pb, const Assignment & assignment)
std::vector< Assignment > generate_assignments (const std::vector< Paramita::Literal > & literals)
bool has_add_soft_lit ()
bool has_assume ()
bool has_clone ()
bool has_core ()
bool has_failed ()
bool has_freeze_melt_is_frozen ()
bool has_is_fixed ()
bool has_lower_bound ()
bool has_num_clauses ()
bool has_num_conflicts ()
bool has_phase_unphase_getphase ()
bool has_propagate ()
bool has_val_lit ()
bool only_supports_1 ()
bool supports_OP (Paramita::PbConstraint::OP op)
bool supports_incrementality ()
bool supports_propagators ()
bool supports_weighted ()
std::string vec_to_string (const std::vector< T > & vec)

Public Types Documentation

typedef Assignment

using test_utils::Assignment = typedef std::unordered_map<std::int64_t, bool>;

Public Functions Documentation

function check_consistency

test_utils::check_consistency (
    Solver & s,
    const Paramita::PbConstraint & pb
) 

function check_consistency

test_utils::check_consistency (
    Paramita::PbToCnfEncoder & encoder,
    const Paramita::PbConstraint & pb
) 

function check_max_var

test_utils::check_max_var (
    Paramita::PbToCnfEncoder & encoder,
    const Paramita::PbConstraint & pb,
    int start_max_var
) 

function evaluate_pb

bool test_utils::evaluate_pb (
    const Paramita::PbConstraint & pb,
    const Assignment & assignment
) 

function generate_assignments

std::vector< Assignment > test_utils::generate_assignments (
    const std::vector< Paramita::Literal > & literals
) 

function has_add_soft_lit

template<class T>
bool test_utils::has_add_soft_lit () 

function has_assume

template<class T>
bool test_utils::has_assume () 

function has_clone

template<class T>
bool test_utils::has_clone () 

function has_core

template<class T>
bool test_utils::has_core () 

function has_failed

template<class T>
bool test_utils::has_failed () 

function has_freeze_melt_is_frozen

template<class T>
bool test_utils::has_freeze_melt_is_frozen () 

function has_is_fixed

template<class T>
bool test_utils::has_is_fixed () 

function has_lower_bound

template<class T>
bool test_utils::has_lower_bound () 

function has_num_clauses

template<class T>
bool test_utils::has_num_clauses () 

function has_num_conflicts

template<class T>
bool test_utils::has_num_conflicts () 

function has_phase_unphase_getphase

template<class T>
bool test_utils::has_phase_unphase_getphase () 

function has_propagate

template<class T>
bool test_utils::has_propagate () 

function has_val_lit

template<class T>
bool test_utils::has_val_lit () 

function only_supports_1

template<class T>
bool test_utils::only_supports_1 () 

function supports_OP

template<class T>
bool test_utils::supports_OP (
    Paramita::PbConstraint::OP op
) 

function supports_incrementality

template<class T>
bool test_utils::supports_incrementality () 

function supports_propagators

template<class T>
bool test_utils::supports_propagators () 

function supports_weighted

template<class T>
bool test_utils::supports_weighted () 

function vec_to_string

template<typename T>
std::string test_utils::vec_to_string (
    const std::vector< T > & vec
)