C++ (Cpp) integral_constraint Example

Introduction

The c++ (cpp) integral_constraint example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: C++ (Cpp)

Class/type: integral_constraint

Example#1
File: constraint.cppProject: 4lex4nder/dreal3

// ====================================================
// ODE constraint
// ====================================================
ode_constraint::ode_constraint(integral_constraint const & integral, vector<forallt_constraint> const & invs)
    : constraint(constraint_type::ODE, integral.get_enodes()), m_int(integral), m_invs(invs) {
    for (auto const & inv : invs) {
        copy(inv.get_enodes().begin(), inv.get_enodes().end(), back_inserter(m_enodes));
    }
}

Example#2
File: constraint.cppProject: sunqxj/dreal3

// ====================================================
// ODE constraint
// ====================================================
ode_constraint::ode_constraint(integral_constraint const & integral, vector<shared_ptr<forallt_constraint>> const & invs)
    : constraint(constraint_type::ODE, integral.get_enodes()), m_int(integral), m_invs(invs) {
}