From 8a5097d726764674f4df38ffc953aad51210c967 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Sun, 26 Jul 2020 08:22:40 +0200 Subject: [PATCH] Add docs on serializing expressions. --- gtsam/nonlinear/ExpressionFactor.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gtsam/nonlinear/ExpressionFactor.h b/gtsam/nonlinear/ExpressionFactor.h index c42b2bdfc..e39a65a0e 100644 --- a/gtsam/nonlinear/ExpressionFactor.h +++ b/gtsam/nonlinear/ExpressionFactor.h @@ -27,8 +27,13 @@ namespace gtsam { /** - - * Factor that supports arbitrary expressions via AD + * Factor that supports arbitrary expressions via AD. + * + * Arbitrary instances of this template can be directly inserted into a factor + * graph for optimization. However, to enable the correct (de)serialization of + * such instances, the user should declare derived classes from this template, + * implementing expresion(), serialize(), clone(), print(), and defining the + * corresponding `struct traits : public Testable {}`. */ template class ExpressionFactor: public NoiseModelFactor {