ethz-asl / curves

A library of curves for estimation.
BSD 3-Clause "New" or "Revised" License
74 stars 28 forks source link

Define how curves should print themselves #15

Closed furgalep closed 9 years ago

furgalep commented 10 years ago

Following the lead of GTSAM we will implement a print statement to help with debugging. We should standardize how curves should print themselves. @gawela @rdube , can you make a proposal and post it here?

gawela commented 10 years ago

We have a proposition on the output, it has some general info in the head and the coefficients ordered in time on the bottom. What do you think?

this->print("custom string");

=========================================
=======LINEAR INTERPOLATION CURVE========
custom string
size : 12
dimension: 2
curve defined between times: -4 and 50

=========================================
coefficient 12:  2 2 | time: -4
coefficient 1:  0 0 | time: 5
coefficient 2:  1 1 | time: 8
coefficient 3:  2 2 | time: 11
coefficient 4:  2 2 | time: 14
coefficient 5:  2 2 | time: 17
coefficient 6:  2 2 | time: 20
coefficient 7:  6 6 | time: 23
coefficient 8:  7 7 | time: 26
coefficient 9:  8 8 | time: 29
coefficient 10:  2 2 | time: 32
coefficient 11:  2 2 | time: 50

=========================================
furgalep commented 10 years ago

Good start.

I would format the coefficient numbers and times so that they line up. I'm not sure all of the ======= are necessary.

Anyone else?