19 #ifndef HPP_CONSTRAINTS_IMPLICIT_CONSTRAINT_SET_HH 20 # define HPP_CONSTRAINTS_IMPLICIT_CONSTRAINT_SET_HH 27 namespace constraints {
60 functions->add (constraint->functionPtr ());
61 constraints_.push_back(constraint);
64 for (std::size_t i = 0; i < comp.size(); ++i) {
68 inequalityIndices_.push_back (comparison_.size());
71 equalityIndices_.addRow(comparison_.size(), 1);
76 comparison_.push_back (comp[i]);
78 equalityIndices_.updateRows<
true,
true,
true>();
84 return inequalityIndices_;
89 return equalityIndices_;
100 const Implicits_t& constraints = other->constraints();
101 for (Implicits_t::const_iterator constraint = constraints.begin();
102 constraint != constraints.end(); ++constraint)
108 std::ostream&
print (std::ostream& os)
const 110 function_->print (os);
133 for (Implicits_t::const_iterator constraint = constraints.begin();
134 constraint != constraints.end(); ++constraint)
139 Implicits_t constraints_;
140 mutable std::vector <LiegroupElement> result_;
142 std::vector<std::size_t> inequalityIndices_;
149 #endif // HPP_CONSTRAINTS_IMPLICIT_CONSTRAINT_SET_HH std::vector< ImplicitPtr_t > Implicits_t
Definition: implicit-constraint-set.hh:38
Definition: implicit-constraint-set.hh:34
ImplicitConstraintSet(const std::string &name)
Definition: implicit-constraint-set.hh:117
void merge(const ImplicitConstraintSetPtr_t &other)
The output columns selection of other is not taken into account.
Definition: implicit-constraint-set.hh:98
ImplicitConstraintSet(const ImplicitConstraintSet &o)
Definition: implicit-constraint-set.hh:128
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
#define HPP_STATIC_PTR_CAST(t, x)
const Eigen::RowBlockIndices & equalityIndices() const
Get indices of constraint coordinates that are equality.
Definition: implicit-constraint-set.hh:87
#define HPP_DYNAMIC_PTR_CAST(t, x)
Definition: differentiable-function-set.hh:33
const Implicits_t & constraints() const
Get constraints.
Definition: implicit-constraint-set.hh:92
ImplicitConstraintSet()
Definition: implicit-constraint-set.hh:123
std::vector< ComparisonType > ComparisonTypes_t
Definition: fwd.hh:170
assert(d.lhs()._blocks()==d.rhs()._blocks())
boost::shared_ptr< ImplicitConstraintSet > ImplicitConstraintSetPtr_t
Definition: fwd.hh:162
static ImplicitConstraintSetPtr_t create(const std::string &name)
Definition: implicit-constraint-set.hh:43
std::ostream & print(std::ostream &os) const
Definition: implicit-constraint-set.hh:108
virtual ~ImplicitConstraintSet()
Definition: implicit-constraint-set.hh:49
void add(const ImplicitPtr_t &constraint)
Definition: implicit-constraint-set.hh:54
const std::vector< std::size_t > & inequalityIndices() const
Get indices of constraint coordinates that are inequality.
Definition: implicit-constraint-set.hh:82
Definition: implicit.hh:96
boost::shared_ptr< Implicit > ImplicitPtr_t
Definition: fwd.hh:157
boost::shared_ptr< DifferentiableFunctionSet > DifferentiableFunctionSetPtr_t
Definition: fwd.hh:97