1#ifndef CPPAD_CG_CG_INCLUDED
2#define CPPAD_CG_CG_INCLUDED
40 std::unique_ptr<Base> value_;
80 inline CG(
const Base&
val);
129 inline const Base&
getValue()
const;
139 inline bool isIdenticalZero()
const;
140 inline bool isIdenticalOne()
const;
176 inline void makeParameter(
const Base&
b);
181 std::unique_ptr<Base>& value);
192 friend class Loop<Base>;
226 bool (*compare)(
const Base&,
const Base&));
249#if CPPAD_USE_CPLUSPLUS_2011
270 static thread_local std::function<std::ostream& (std::ostream&,
const CG<Base>&)> FUNC;
289 if (v.isParameter()) {
292 os << *v.getOperationNode();
293 if (v.isValueDefined()) {
294 os <<
" (" << v.getValue() <<
")";
301inline std::ostringstream& operator<<(
302 std::ostringstream& os,
305 if (v.isParameter()) {
308 os << *v.getOperationNode();
309 if (v.isValueDefined()) {
310 os <<
" (" << v.getValue() <<
")";
317inline std::istream& operator>>(
331 if (x.isValueDefined()) {
332 return Integer(x.getValue());
334 CppAD::ErrorHandler::Call(
false, __LINE__, __FILE__,
"Integer()",
"No value defined");
void setValue(const Base &val)
CG & operator=(const CG< Base > &rhs)
const Base & getValue() const
bool isValueDefined() const
CodeHandler< Base > * getCodeHandler() const