13 throw std::runtime_error(
"[WeightedSquareDistanceFunction::changePi] Given Pi is not a diagonal matrix.");
25 throw std::runtime_error(
"[WeightedSquareDistanceFunction::changeqi] changeqi is not available directly. Please use changeWeight and changeReference instead.");
31 throw std::runtime_error(
"[WeightedSquareDistanceFunction::changeqi] changeri is not available directly. Please use changeWeight and changeReference instead.");
49 propagate<EVT_CHANGE_VALUE>();
73 int s =
static_cast<int>(
_weight.size());
97 void WeightedSquareDistanceFunction::computeP()
103 void WeightedSquareDistanceFunction::computeq()
108 void WeightedSquareDistanceFunction::computer()
139 std::cout << f.
getValue() << std::endl;
140 std::cout << std::endl;
147 std::cout << f.
getValue() << std::endl;
148 std::cout << std::endl;
155 std::cout << f.
getValue() << std::endl;
156 std::cout << std::endl;
159 for (
int i=0; i<X.
getSize(); ++i)
163 std::cout << f.
getValue() << std::endl;
164 std::cout << std::endl;
void doUpdateInputSizeEnd()
Computation ability of a ocra function.
const VectorXd & getValue() const
void setValue(const VectorXd &value)
void doChangeqi(const VectorXd &qi, int index=0)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
void testWeightedSquareDistanceFunction()
virtual void doUpdateInputSizeEnd()
const VectorXd & getqi(int index=0) const
std::vector< VectorXd * > _q
Declaration file of the WeightedSquareDistanceFunction class.
const VectorXd & getValue() const
void doUpdateInputSizeBegin()
void changeWeight(double weight)
void updateJacobian() const
void changeConvexityProperty(eFunctionConvexity newProperty)
CompositeVariable & add(Variable &child)
Attach/detach the child to/from this node.
A concatenation of base variables and other composite variables.
void doChangeri(double ri, int index=0)
#define ocra_assert(ocra_expression)
Declaration file of the Variable class.
CompositeVariable & remove(Variable &child)
WeightedSquareDistanceFunction class.
Implements a basic variable.
void doChangePi(const MatrixXd &Pi, int index=0)