Logo Search packages:      
Sourcecode: packup version File versions  Download package

Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes

Encoder Class Reference

Collaboration diagram for Encoder:
Collaboration graph

List of all members.

Public Member Functions

void add_install (CONSTANT PackageVersionsList &list)
void add_remove (CONSTANT PackageVersionsList &list)
void add_unit (InstallableUnit *unit)
void add_upgrade (CONSTANT PackageVersionsList &list)
void check_solution ()
void disable_solving ()
void enable_valuation ()
void encode ()
 Encoder (SolverWrapper< ClausePointer > &solver, IDManager &id_manager)
CONSTANT vector< Objective > & get_lexicographic () const
bool get_opt_edges (bool v=true) const
bool get_opt_not_removed (bool v=true) const
SolverWrapper< ClausePointer > & get_solver_wrapper ()
void print_solution ()
void set_criterion (Criterion optimization_criterion)
void set_iv (UINT piv)
void set_lexicographic (CONSTANT vector< Objective > &lexicographic_ordering)
void set_opt_edges (int v=1)
void set_opt_not_removed (bool v=true)
void set_solution_file (ostream *file)
bool solution ()

Public Attributes

bool cs
UINT cut_off
PackageVersionSet * stc
UINT unit_count

Private Types

enum  CT { CT_MIN, CT_MAX, CT_NO }

Private Member Functions

void add_providers (CONSTANT PackageVersions &features, VariableSet &providers)
void add_providers (CONSTANT PackageVersion &feature, VariableSet &providers)
void assert_not_removed ()
void atmost_1 (CONSTANT string &package_name, Version from)
void atmost_1_feature (CONSTANT string &package_name, Version from)
int changed_score (IntVector &model)
void conflict_all (CONSTANT Variable &pv, CONSTANT VariableSet &set)
bool disable_down_to_term (CONSTANT string &name, Version from, const UnitVector *unit_vector, const VersionVector *version_vector, LiteralVector &literals)
void disable_to_term (CONSTANT PackageVersions &pvs, LiteralVector &term)
bool disable_up_to_term (CONSTANT string &name, Version from, const UnitVector *unit_vector, const VersionVector *version_vector, LiteralVector &literals)
void encode (CONSTANT InstallableUnit *unit)
void encode_changed (XLINT &total_weight, bool maximize)
void encode_conflicts (CONSTANT InstallableUnit *unit)
void encode_depends (CONSTANT InstallableUnit *unit)
void encode_edges ()
void encode_keep ()
void encode_lexicographic ()
void encode_new (XLINT &total_weight, bool maximize)
void encode_not_self_conflict (CONSTANT InstallableUnit *unit, CONSTANT PackageVersions &pvs)
void encode_not_up_to_date (XLINT &total_weight, bool maximize)
void encode_package_self_conflict (CONSTANT InstallableUnit *unit, CONSTANT PackageVersions &pvs)
void encode_provides ()
void encode_recommends (CONSTANT InstallableUnit *unit)
void encode_removed (XLINT &total_weight, bool maximize)
void encode_request_remove ()
void encode_unmet_recommends (XLINT &total_weight, bool maximize)
void encode_upgrade ()
bool find_latest_installed_version_in_original_problem (CONSTANT string &name, Version &version)
Variable get_package_version_variable (CONSTANT PackageVersion &pv)
XLINT get_top (CONSTANT vector< Objective > &lexicographic) const
XLINT get_top (CONSTANT Objective &objective) const
CT gt (OBJECTIVE_FUNCTION o, vector< Objective > &lex)
void handle_keep (InstallableUnit *unit)
void handle_provides (InstallableUnit *unit)
bool is_any_installed (PackageVersions &package, IntVector &model)
bool is_any_installed_feature (CONSTANT string &feature_name, Operator version_operator, Version operand, IntVector &model)
bool is_any_installed_package (const UnitVector &unit_vector)
bool is_feature (CONSTANT string &name)
bool is_installed (const InstallableUnit *unit, IntVector &model)
bool is_installed_feature (const PackageVersion &feature, IntVector &model)
bool is_installed_feature (CONSTANT PackageVersion &feature)
bool latest_installed_feature_version (CONSTANT string &name, Version &version)
bool latest_installed_package_version (CONSTANT string &name, Version &version)
void need (PackageVersionsCNF cnf)
void need (InstallableUnit *unit)
void need (CONSTANT PackageVersions &versions)
void need_feature (CONSTANT PackageVersion &feature)
void need_features (CONSTANT string &feature_name, Operator version_operator, Version operand)
void need_latest (CONSTANT string &package_name)
void need_packages (CONSTANT string &package_name, Operator version_operator, Version operand)
int new_score (IntVector &model)
Variable new_variable ()
int notuptodate_score (IntVector &model)
void paranoid_score (IntVector &model)
void print_valuation (ostream &output, IntVector &model)
void process_disable_down (const string &package, const VersionVector &intervals, const VersionVector &package_versions, bool is_feature=false)
void process_disable_up (const string &package, const VersionVector &intervals, const VersionVector &package_versions, bool is_feature=false)
void process_interval_variables ()
bool process_not_uptodate ()
void process_require_down (const string &package, const VersionVector &intervals, const VersionVector &package_versions, bool is_feature=false)
void process_require_up (const string &package, const VersionVector &intervals, const VersionVector &package_versions, bool is_feature=false)
int recommends_score (IntVector &model)
void refine_upgrade_request ()
int removed_score (IntVector &model)
void request_to_clause (CONSTANT PackageVersions &pvs, LiteralVector &literals)
void requests_to_clause (CONSTANT VersionsList::const_iterator begin, CONSTANT VersionsList::const_iterator end, LiteralVector &literals)
bool require_down_to_clause (CONSTANT string &name, Version from, const UnitVector *unit_vector, const VersionVector *version_vector, LiteralVector &literals)
bool require_up_to_clause (CONSTANT string &name, Version from, const UnitVector *unit_vector, const VersionVector *version_vector, LiteralVector &literals)
void slice ()
void slice_changed ()
void trendy_score (IntVector &model)

Private Attributes

bool _process_not_uptodate
FeatureToUnits feature_units
FeatureToVersions feature_versions
PackageVersionsSet install
IntervalVariables interval_vars
vector< Objective > lexicographic
PackageToVersions needed_feature_versions
PackageUnits needed_units
NotRemoved not_removed
int opt_edges
bool opt_not_removed
bool printing_started_or_finished
bool process_recommends
ostream * psolution_file
PackageUnits read_units
vector< ClausePointer > recommends_clauses_pointers
PackageVersionsList remove
PackageVersionSet required_features
bool should_solve
SolverWrapper< ClausePointer > & solver
PackageVersionsList upgrade
bool valuation
PackageVersionVariables variables

Detailed Description

Definition at line 40 of file Encoder.hh.

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

Generated by  Doxygen 1.6.0   Back to index