Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21014/qlo
Modified Files:
marketmodels.cpp marketmodels.hpp
Log Message:
driftcalculator: added reduced factor calculation + comments + reordering
forwardrate(ipc)evolver: passed number of factors for driftcalculator
Index: marketmodels.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/marketmodels.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** marketmodels.hpp 20 Jul 2006 20:06:55 -0000 1.8
--- marketmodels.hpp 21 Jul 2006 13:54:44 -0000 1.9
***************
*** 77,95 ****
- //??
- inline QuantLib::Array drifts(const QuantLib::Matrix& pseudo,
- std::vector<double> vdisplacements,
- std::vector<double> vtaus,
- QuantLib::Size numeraire,
- QuantLib::Size alive,
- std::vector<double> vforwards)
- {
- QuantLib::Array drifts(vtaus.size()), displacements(vtaus.size()), taus(vtaus.size()), forwards(vtaus.size());
- // temporarily commented out - needs to catch up with QuantLib changes
- //QuantLib::DriftCalculator d(pseudo, displacements, taus, numeraire, alive);
- //d.compute(forwards, drifts);
- return drifts;
- }
-
class DriftCalculator : public ObjHandler::LibraryObject<QuantLib::DriftCalculator> {
public:
--- 77,80 ----
***************
*** 99,103 ****
QuantLib::Size numeraire,
QuantLib::Size alive);
! QuantLib::Array compute(const QuantLib::Array& forwards) const;
private:
QuantLib::Size size_;
--- 84,90 ----
QuantLib::Size numeraire,
QuantLib::Size alive);
! QuantLib::Array compute(const QuantLib::Array& forwards) const;
! QuantLib::Array computeReduced(const QuantLib::Array& forwards,
! QuantLib::Size factors) const;
private:
QuantLib::Size size_;
Index: marketmodels.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/marketmodels.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** marketmodels.cpp 20 Jul 2006 20:06:55 -0000 1.7
--- marketmodels.cpp 21 Jul 2006 13:54:44 -0000 1.8
***************
*** 96,102 ****
{
// temporarily commented out - needs to catch up with QuantLib changes
! //libraryObject_ = boost::shared_ptr<QuantLib::DriftCalculator>(
! // new QuantLib::DriftCalculator(pseudo, displacements,
! // taus, numeraire, alive));
}
--- 96,102 ----
{
// temporarily commented out - needs to catch up with QuantLib changes
! libraryObject_ = boost::shared_ptr<QuantLib::DriftCalculator>(
! new QuantLib::DriftCalculator(pseudo, displacements,
! taus, numeraire, alive));
}
***************
*** 108,111 ****
--- 108,118 ----
}
+ QuantLib::Array DriftCalculator::computeReduced(const QuantLib::Array& forwards,
+ QuantLib::Size factors) const
+ {
+ QuantLib::Array results(size_);
+ libraryObject_->computeReduced(forwards, factors, results);
+ return results;
+ }
|