8 using namespace details;
57 std::cout << var.
getName() <<
": ";
58 for (
int i=0; i< result.size(); ++i)
60 if (fabs(result[i]) < eps)
63 std::cout << std::setw(space) <<
"+eps" <<
",";
64 else if (result[i] < -zero)
65 std::cout << std::setw(space) <<
"-eps" <<
",";
67 std::cout << std::setw(space) <<
"0" <<
",";
70 std::cout << std::setw(space) << std::setprecision(precision) << result[i] <<
",";
73 std::cout << std::endl;
89 MatrixXd A = MatrixXd::Zero(12,10);
90 MatrixXd Q = MatrixXd::Zero(10,10);
91 std::vector<int> mapping;
93 m = MatrixXd::Random(4,5);
95 std::cout << m << std::endl << std::endl;
96 std::cout << A << std::endl << std::endl;
98 m = MatrixXd::Random(5,5);
100 std::cout << m << std::endl << std::endl;
101 std::cout << Q << std::endl << std::endl;
103 int ret = system(
"pause");
virtual const std::string & getName() const
const details::eConvertCase conversion_cases[7][7]
void addCompressed2d(const MatrixBase< Derived1 > &in, MatrixBase< Derived2 > const &_out, const std::vector< int > &mapping, double scale, bool reverseMapping)
size_t getNumberOfChildren() const
Returns 0 in BaseVariable and the number of childhoods otherwise.
void uncompressByCol(const MatrixBase< Derived1 > &in, MatrixBase< Derived2 > const &_out, const std::vector< int > &mapping, double scale, bool reverseMapping)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
This class represents a variable in a mathematical sense.
CompositeVariable & add(Variable &child)
Attach/detach the child to/from this node.
A concatenation of base variables and other composite variables.
Implements a basic variable.
void printSolution(const VectorXd &result, const Variable &var, int space=9, int precision=3)