6 std::vector<int>
const& size,
7 unsigned int const insize) :
SplitVector(Eigen::Map<const Eigen::VectorXi>(&ind[0],ind.size()),
8 Eigen::Map<const Eigen::VectorXi>(&size[0],size.size()),
12 Eigen::VectorXi
const& size,
13 unsigned int const insize) :
ModPiece(Eigen::VectorXi::Constant(1, insize), size),
16 assert(
ind.size()==
size.size());
17 assert(
size.sum()<=insize);
18 assert(
ind.maxCoeff()<insize);
22 const Eigen::VectorXd& in = inputs[0];
25 for(
unsigned int i=0; i<
ind.size(); ++i ) {
38 assert(sens.size()==
size(outwrt));
Provides an abstract interface for defining vector-valued model components.
const Eigen::VectorXi inputSizes
std::vector< Eigen::VectorXd > outputs
Eigen::VectorXd hessAction
Eigen::VectorXd jacobianAction
Provides a mechanism for splitting a vector into multiple pieces.
SplitVector(std::vector< int > const &ind, std::vector< int > const &size, unsigned int const insize)
virtual void JacobianImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector< Eigen::VectorXd > const &inputs) override
const Eigen::VectorXi size
const Eigen::VectorXi ind
virtual void EvaluateImpl(ref_vector< Eigen::VectorXd > const &inputs) override
virtual void GradientImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector< Eigen::VectorXd > const &inputs, Eigen::VectorXd const &sens) override
virtual void ApplyJacobianImpl(unsigned int const outwrt, unsigned int const inwrt, ref_vector< Eigen::VectorXd > const &inputs, Eigen::VectorXd const &targ) override
virtual void ApplyHessianImpl(unsigned int const outwrt, unsigned int const inwrt1, unsigned int const inwrt2, ref_vector< Eigen::VectorXd > const &inputs, Eigen::VectorXd const &sens, Eigen::VectorXd const &targ) override
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...