Skip to content

Commit

Permalink
Update ad templated
Browse files Browse the repository at this point in the history
updated yield curve bootstrapping
  • Loading branch information
omartinsky committed Feb 27, 2017
1 parent a40d310 commit 70c6b3e
Show file tree
Hide file tree
Showing 3 changed files with 540 additions and 85 deletions.
4 changes: 2 additions & 2 deletions autodiff_templated/ad_engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace logging
template <typename TL, typename TR>
void logBinaryOperation(string op, const ADDouble& result, const TL& l, const TR& r)
{
cout << "Performing operation "
cout << "Operation "
<< getVariableName(result) << " := "
<< getVariableName(l) << " " << op << " "
<< getVariableName(r) << " = "
Expand All @@ -82,7 +82,7 @@ namespace logging

inline void logUnaryOperation(string op, const ADDouble& result, const ADDouble& x)
{
cout << "Performing operation "
cout << "Operation "
<< getVariableName(result) << " := " << op + "(" << getVariableName(x) << ") = "
<< op << "(" << getValue(x) << ")" << endl;
}
Expand Down
4 changes: 2 additions & 2 deletions autodiff_templated/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ void example1()
ADDouble x1(e, 3);
ADDouble x2(e, 4);

// Perform the calculation
// Do the calculation
ADDouble y = f(x1, x2);
cout << "y = " << y.get_value() << endl;
cout << "y = " << y.get_value() << endl;

// Apply chain rule to derivatives in calculation tree
cout << endl;
Expand Down
Loading

0 comments on commit 70c6b3e

Please sign in to comment.