Added null() static construction method.

This commit is contained in:
Atgeirr Flø Rasmussen
2013-05-13 08:34:22 +02:00
parent b0cf134479
commit 2f62b2e565

View File

@@ -38,6 +38,13 @@ namespace AutoDiff
typedef Eigen::SparseMatrix<Scalar> M;
/// Named constructor pattern used here.
static ForwardBlock null()
{
V val;
std::vector<M> jac;
return ForwardBlock(val, jac);
}
static ForwardBlock constant(const V& val, const std::vector<int>& blocksizes)
{
std::vector<M> jac;