41#include "adjointVectorAccess.hpp"
57 template<
typename T_Real,
typename T_Identifier,
typename T_Gradient>
88 primalVector[index] = primal;
93 return primalVector[index];
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
Implementation of VectorAccessInterface for adjoint vectors.
Definition adjointVectorAccess.hpp:59
Gradient * adjointVector
Pointer to the gradient vector.
Definition adjointVectorAccess.hpp:66
Implementation of VectorAccessInterface for adjoint and primal vectors.
Definition primalAdjointVectorAccess.hpp:58
T_Identifier Identifier
See PrimalAdjointVectorAccess.
Definition primalAdjointVectorAccess.hpp:60
VectorAccessInterface< Real, Identifier > * clone() const
Definition primalAdjointVectorAccess.hpp:79
void setPrimal(Identifier const &index, Real const &primal)
Set the primal value.
Definition primalAdjointVectorAccess.hpp:87
bool hasPrimals()
True if the tape/vector interface has primal values.
Definition primalAdjointVectorAccess.hpp:98
T_Gradient Gradient
See PrimalAdjointVectorAccess.
Definition primalAdjointVectorAccess.hpp:61
T_Real Real
See PrimalAdjointVectorAccess.
Definition primalAdjointVectorAccess.hpp:59
Real getPrimal(Identifier const &index)
Get the primal value.
Definition primalAdjointVectorAccess.hpp:92
PrimalAdjointVectorAccess(Gradient *adjointVector, Real *primalVector)
Constructor. See interface documentation for details about the vectors.
Definition primalAdjointVectorAccess.hpp:72
Unified access to the adjoint vector and primal vector in a tape evaluation.
Definition vectorAccessInterface.hpp:91