mirror of
https://github.com/Z3Prover/z3
synced 2025-05-11 09:44:43 +00:00
Replace the use of optional<rational> by inf_eps_rational<rational>
Also handle composite objectives correctly.
This commit is contained in:
parent
a44044fb15
commit
53f78f7d19
9 changed files with 50 additions and 43 deletions
|
@ -19,6 +19,7 @@ Revision History:
|
|||
#ifndef _THEORY_ARITH_AUX_H_
|
||||
#define _THEORY_ARITH_AUX_H_
|
||||
|
||||
#include"inf_eps_rational.h"
|
||||
#include"theory_arith.h"
|
||||
|
||||
namespace smt {
|
||||
|
@ -960,12 +961,10 @@ namespace smt {
|
|||
}
|
||||
|
||||
template<typename Ext>
|
||||
optional<rational> theory_arith<Ext>::get_objective_value(theory_var v) {
|
||||
optional<rational> rat;
|
||||
if (m_objective.is_rational()) {
|
||||
rat = m_objective.get_rational();
|
||||
};
|
||||
return rat;
|
||||
inf_eps_rational<rational> theory_arith<Ext>::get_objective_value(theory_var v) {
|
||||
inf_eps_rational<rational> val;
|
||||
val = m_objective.get_rational();
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue