6void printVector(std::string
const& name, Vec
const& v,
size_t length,
size_t offset) {
7 std::cout <<
"Vector " << name <<
": {";
8 for(
size_t i = 0; i < length; i += 1) {
12 std::cout << v[offset + i];
14 std::cout <<
"}" << std::endl;
18void printVectorDim(std::string
const& name, Vec
const& v,
size_t length,
size_t offset,
size_t dim) {
19 std::cout <<
"Vector " << name <<
": {";
20 for(
size_t i = 0; i < length; i += 1) {
24 std::cout << v[offset + i][
dim];
26 std::cout <<
"}" << std::endl;
31void printJacCol(std::string
const& text, Jac
const &jac,
size_t col) {
32 std::cout << text <<
": {";
33 for(
size_t j = 0; j < jac.getN(); j += 1) {
37 std::cout << jac(col, j);
39 std::cout <<
"}" << std::endl;
43void printHesForOutput(std::string
const& text, Hes
const &hes,
size_t output) {
44 std::cout << text <<
": {\n";
45 for(
size_t j = 0; j < hes.getN(); j += 1) {
47 for(
size_t k = 0; k < hes.getN(); k += 1) {
51 std::cout << hes(output, j, k);
55 std::cout <<
"}" << std::endl;
size_t constexpr dim()
Number of dimensions this gradient value has.
Definition gradientTraits.hpp:96