41#include "adjointVectorAccess.hpp"
58 template<
typename T_Real,
typename T_Identifier,
typename T_Adjo
intVector>
90 primalVector[index] = primal;
95 return primalVector[index];
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
typename GradientImplementation< AdjointVector >::Gradient Gradient
Deduce the entry type from an adjoint vector type, usually identical to the gradient type of a tape.
Definition adjointVectorTraits.hpp:92
CoDiPack - Code Differentiation Package.
Definition codi.hpp:91
Implementation of VectorAccessInterface for adjoint vectors.
Definition adjointVectorAccess.hpp:61
AdjointVector adjointVector
Pointer/reference to an array-accessible collection of gradients.
Definition adjointVectorAccess.hpp:70
Implementation of VectorAccessInterface for adjoint and primal vectors.
Definition primalAdjointVectorAccess.hpp:59
AdjointVectorTraits::Gradient< T_AdjointVector > Gradient
Adjoint vector entry type.
Definition primalAdjointVectorAccess.hpp:62
T_AdjointVector AdjointVector
See PrimalAdjointVectorAccess.
Definition primalAdjointVectorAccess.hpp:63
T_Identifier Identifier
See PrimalAdjointVectorAccess.
Definition primalAdjointVectorAccess.hpp:61
T_Real Real
See PrimalAdjointVectorAccess.
Definition primalAdjointVectorAccess.hpp:60
VectorAccessInterface< Real, Identifier > * clone() const
Definition primalAdjointVectorAccess.hpp:81
Real getPrimal(Identifier const &index)
Get the primal value.
Definition primalAdjointVectorAccess.hpp:94
bool hasPrimals()
True if the tape/vector interface has primal values.
Definition primalAdjointVectorAccess.hpp:100
PrimalAdjointVectorAccess(AdjointVector adjointVector, Real *primalVector)
Constructor. See interface documentation for details about the vectors.
Definition primalAdjointVectorAccess.hpp:74
void setPrimal(Identifier const &index, Real const &primal)
Set the primal value.
Definition primalAdjointVectorAccess.hpp:89
Unified access to the adjoint vector and primal vector in a tape evaluation.
Definition vectorAccessInterface.hpp:91