Commit 7dd484da authored by David Bommes's avatar David Bommes

added clear function

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@188 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 6d0e0ebb
......@@ -14,7 +14,7 @@
#include <CoMISo/Config/CoMISoDefines.hh>
#include "NConstraintInterface.hh"
#include <gmm/gmm.h>
#include <CoMISo/NSolver/LinearConstraint.hh>
#include "LinearConstraint.hh"
//== FORWARDDECLARATIONS ======================================================
......@@ -49,6 +49,13 @@ void LinearConstraint::resize(const unsigned int _n)
coeffs_.m_size = _n;
}
void LinearConstraint::clear()
{
coeffs_.setZero();
b_ = 0.0;
}
const LinearConstraint::SVectorNC& LinearConstraint::coeffs() const
{
return coeffs_;
......
......@@ -53,8 +53,12 @@ public:
virtual int n_unknowns();
// resize coefficient vector = #unknowns
void resize(const unsigned int _n);
// clear to zero constraint 0 =_type 0
void clear();
const SVectorNC& coeffs() const;
SVectorNC& coeffs();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment