Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9277/qlo
Modified Files:
interpolation.cpp interpolation.hpp volatilities.cpp
volatilities.hpp
Removed Files:
generalutils.cpp generalutils.hpp
Log Message:
automatic conversion of XLOPER to QuantLib::Matrix
Index: interpolation.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/interpolation.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** interpolation.hpp 20 Jun 2006 08:29:54 -0000 1.11
--- interpolation.hpp 20 Jun 2006 09:18:11 -0000 1.12
***************
*** 74,82 ****
std::vector<double> x_, y_;
};
-
- class Matrix : public ObjHandler::LibraryObject<QuantLib::Matrix> {
- public:
- Matrix(const std::vector<std::vector<double> >&);
- };
}
--- 74,77 ----
Index: volatilities.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/volatilities.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** volatilities.cpp 9 Jun 2006 18:58:47 -0000 1.2
--- volatilities.cpp 20 Jun 2006 09:18:11 -0000 1.3
***************
*** 42,51 ****
const std::vector < QuantLib::Date > &dates,
const std::vector < double > &strikes,
! const std::vector < std::vector < double > > &vols,
const QuantLib::DayCounter &dayCounter) {
- QuantLib::Matrix volsQL =
- vectorVectorToMatrix(vols);
-
libraryObject_ = boost::shared_ptr<QuantLib::BlackVolTermStructure> (
new QuantLib::BlackVarianceSurface(
--- 42,48 ----
const std::vector < QuantLib::Date > &dates,
const std::vector < double > &strikes,
! const boost::shared_ptr<QuantLib::Matrix> &vols,
const QuantLib::DayCounter &dayCounter) {
libraryObject_ = boost::shared_ptr<QuantLib::BlackVolTermStructure> (
new QuantLib::BlackVarianceSurface(
***************
*** 53,57 ****
dates,
strikes,
! volsQL,
dayCounter));
}
--- 50,54 ----
dates,
strikes,
! *vols,
dayCounter));
}
Index: interpolation.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/interpolation.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** interpolation.cpp 20 Jun 2006 08:29:53 -0000 1.8
--- interpolation.cpp 20 Jun 2006 09:18:11 -0000 1.9
***************
*** 98,115 ****
t, forward, beta, nu, alpha, rho));
}
-
- Matrix::Matrix(const std::vector < std::vector < double > > &input) {
- int numRows = input.size();
- int numCols = numRows ? input[0].size() : 0;
- libraryObject_ = boost::shared_ptr<QuantLib::Matrix>(
- new QuantLib::Matrix(numRows, numCols));
- QuantLib::Matrix::iterator matrixIter = libraryObject_->begin();
- for (std::vector<std::vector<double> >::const_iterator i = input.begin();
- i != input.end(); i++) {
- std::vector<double> row = *i;
- for (std::vector<double>::const_iterator j = row.begin(); j != row.end(); j++)
- *matrixIter++ = *j;
- }
- }
}
--- 98,101 ----
--- generalutils.hpp DELETED ---
--- generalutils.cpp DELETED ---
Index: volatilities.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/volatilities.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** volatilities.hpp 9 Jun 2006 18:58:47 -0000 1.2
--- volatilities.hpp 20 Jun 2006 09:18:11 -0000 1.3
***************
*** 42,46 ****
const std::vector < QuantLib::Date > &dates,
const std::vector < double > &strikes,
! const std::vector < std::vector < double > > &vols,
const QuantLib::DayCounter &dayCounter);
};
--- 42,46 ----
const std::vector < QuantLib::Date > &dates,
const std::vector < double > &strikes,
! const boost::shared_ptr<QuantLib::Matrix> &vols,
const QuantLib::DayCounter &dayCounter);
};
|