Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31056/qlo
Modified Files:
Makefile.am conversions.hpp enumclassctors.cpp
getcovariance.hpp index.cpp index.hpp quantovanillaoption.hpp
symmetricschurdecomposition.hpp typefactory.hpp
Log Message:
changes for linux/gcc4.1.0
Index: conversions.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/conversions.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** conversions.hpp 27 Jul 2006 09:37:46 -0000 1.13
--- conversions.hpp 27 Jul 2006 14:06:31 -0000 1.14
***************
*** 28,32 ****
--- 28,35 ----
#include <ql/calendar.hpp>
#include <ql/interestrate.hpp>
+ #include <ql/handle.hpp>
+ #include <oh/objecthandler.hpp>
#include <qlo/handle.hpp>
+ #include <qlo/typefactory.hpp>
#include <vector>
Index: index.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/index.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** index.cpp 21 Jul 2006 18:19:17 -0000 1.6
--- index.cpp 27 Jul 2006 14:06:31 -0000 1.7
***************
*** 62,64 ****
--- 62,65 ----
fixedLegDayCounter, index));
}
+
}
Index: symmetricschurdecomposition.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/symmetricschurdecomposition.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** symmetricschurdecomposition.hpp 23 Jun 2006 17:20:55 -0000 1.1
--- symmetricschurdecomposition.hpp 27 Jul 2006 14:06:32 -0000 1.2
***************
*** 28,32 ****
{
public:
! SymmetricSchurDecomposition::SymmetricSchurDecomposition(
const QuantLib::Matrix & s);
};
--- 28,32 ----
{
public:
! SymmetricSchurDecomposition(
const QuantLib::Matrix & s);
};
Index: typefactory.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/typefactory.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** typefactory.hpp 25 Jul 2006 14:18:11 -0000 1.20
--- typefactory.hpp 27 Jul 2006 14:06:32 -0000 1.21
***************
*** 48,69 ****
class RegistryManager {
protected:
- //template<typename ConstructorSignature>
- //ConstructorSignature getType(const std::string& id) {
- // typename RegistryClass::TypeMapPtr type_map = getTypeMap();
- // std::string idUpper = QuantLib::uppercase(id);
- // for (typename RegistryClass::TypeMap::iterator i = type_map->begin(); i != type_map->end(); i++)
- // if (QuantLib::uppercase(i->first) == idUpper)
- // return static_cast<ConstructorSignature>(i->second);
- // QL_FAIL("Unknown id for Type: " << id);
- //}
template<typename KeyClass, typename ConstructorSignature>
! ConstructorSignature getType(const KeyClass& id) {
! typename RegistryClass::TypeMapPtr type_map = getTypeMap();
! KeyClass idUpper = uppercase(id);
! for (typename RegistryClass::TypeMap::iterator i = type_map->begin(); i != type_map->end(); i++)
! if (uppercase(i->first) == idUpper)
! return static_cast<ConstructorSignature>(i->second);
! QL_FAIL("Unknown id for Type: " << id);
! }
bool checkType(const std::string& id) {
--- 48,53 ----
class RegistryManager {
protected:
template<typename KeyClass, typename ConstructorSignature>
! ConstructorSignature getType(const KeyClass& id);
bool checkType(const std::string& id) {
***************
*** 97,100 ****
--- 81,98 ----
};
+ template<typename T, typename RegistryClass>
+ template<typename KeyClass, typename ConstructorSignature>
+ ConstructorSignature
+ RegistryManager<T, RegistryClass>::getType(const KeyClass& id) {
+ typename RegistryClass::TypeMapPtr type_map = getTypeMap();
+ KeyClass idUpper = uppercase(id);
+ typename RegistryClass::TypeMap::iterator i;
+ for (i = type_map->begin(); i != type_map->end(); i++)
+ if (uppercase(i->first) == idUpper)
+ //return static_cast<ConstructorSignature>(i->second);
+ return reinterpret_cast<ConstructorSignature>(i->second);
+ QL_FAIL("Unknown id for Type: " << id);
+ }
+
/* *** Enumerated Types *** */
template<typename T>
***************
*** 102,106 ****
public:
T operator()(const std::string& id) {
! return *(getType<std::string, T*>(id));
}
using RegistryManager<T, EnumTypeRegistry>::checkType;
--- 100,105 ----
public:
T operator()(const std::string& id) {
! //return *(getType<std::string, T*>(id));
! return *(this->getType(id));
}
using RegistryManager<T, EnumTypeRegistry>::checkType;
***************
*** 148,152 ****
boost::shared_ptr<QuantLib::PricingEngine> operator()(const std::string& engineID,
const long& timeSteps) {
! QL_REQUIRE(timeSteps>0, "timeSteps must be positive"); // FIXME move this validation into QL
PricingEngineConstructor pricingEngineConstructor =
getType<std::string, PricingEngineConstructor>(engineID);
--- 147,152 ----
boost::shared_ptr<QuantLib::PricingEngine> operator()(const std::string& engineID,
const long& timeSteps) {
! // FIXME move this validation into QL
! QL_REQUIRE(timeSteps>0, "timeSteps must be positive");
PricingEngineConstructor pricingEngineConstructor =
getType<std::string, PricingEngineConstructor>(engineID);
Index: Makefile.am
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile.am 19 May 2006 16:56:16 -0000 1.1
--- Makefile.am 27 Jul 2006 14:06:31 -0000 1.2
***************
*** 2,11 ****
AM_CPPFLAGS = -I${top_srcdir}
AM_LDFLAGS = -release $(PACKAGE_VERSION)
! includedir = $(prefix)/include/qla
lib_LTLIBRARIES = libQuantLibAddin.la
EXTRA_DIST = \
! autolink.hpp
include_HEADERS = \
--- 2,11 ----
AM_CPPFLAGS = -I${top_srcdir}
AM_LDFLAGS = -release $(PACKAGE_VERSION)
! includedir = $(prefix)/include/qlo
lib_LTLIBRARIES = libQuantLibAddin.la
EXTRA_DIST = \
! auto_link.hpp
include_HEADERS = \
***************
*** 13,31 ****
barrieroption.hpp \
baseinstruments.hpp \
calendar.hpp \
capfloor.hpp \
! clientutils.hpp \
cliquetoption.hpp \
! config.hpp \
couponvectors.hpp \
dividendvanillaoption.hpp \
europeanoption.hpp \
exercise.hpp \
! fixedcouponbond.hpp \
forwardvanillaoption.hpp \
! generalutils.hpp \
! instruments.hpp \
interpolation.hpp \
options.hpp \
processes.hpp \
qladdindefines.hpp \
--- 13,39 ----
barrieroption.hpp \
baseinstruments.hpp \
+ bonds.hpp \
calendar.hpp \
capfloor.hpp \
! capletvolstructure.hpp \
cliquetoption.hpp \
! conversions.hpp \
couponvectors.hpp \
dividendvanillaoption.hpp \
+ enumclassctors.hpp \
europeanoption.hpp \
exercise.hpp \
! forwardrateagreement.hpp \
forwardvanillaoption.hpp \
! getcovariance.hpp \
! handle.hpp \
! index.hpp \
! interpolation2D.hpp \
interpolation.hpp \
+ mathf.hpp \
+ optimization.hpp \
options.hpp \
+ payoffs.hpp \
+ pricingengines.hpp \
processes.hpp \
qladdindefines.hpp \
***************
*** 34,41 ****
quantovanillaoption.hpp \
randomsequencegenerator.hpp \
schedule.hpp \
shortratemodels.hpp \
- simpleswap.hpp \
swap.hpp \
termstructures.hpp \
typefactory.hpp \
--- 42,52 ----
quantovanillaoption.hpp \
randomsequencegenerator.hpp \
+ ratehelpers.hpp \
schedule.hpp \
shortratemodels.hpp \
swap.hpp \
+ swaption.hpp \
+ swaptionvolstructure.hpp \
+ symmetricschurdecomposition.hpp \
termstructures.hpp \
typefactory.hpp \
***************
*** 43,110 ****
utilities.hpp \
vanillaoption.hpp \
vo_capfloor.hpp \
vo_couponvectors.hpp \
vo_exercise.hpp \
! vo_instruments.hpp \
vo_interpolation.hpp \
volatilities.hpp \
vo_options.hpp \
vo_processes.hpp \
vo_randomsequencegenerator.hpp \
vo_schedule.hpp \
vo_shortratemodels.hpp \
- vo_simpleswap.hpp \
vo_swap.hpp \
vo_termstructures.hpp \
! vo_volatilities.hpp \
! vo_xibor.hpp \
! xibor.hpp \
! zerocouponbond.hpp
libQuantLibAddin_la_SOURCES = \
asianoption.cpp \
barrieroption.cpp \
calendar.cpp \
capfloor.cpp \
! clientutils.cpp \
cliquetoption.cpp \
! complextyperegistry.cpp \
couponvectors.cpp \
dividendvanillaoption.cpp \
! enumregistry.cpp \
europeanoption.cpp \
exercise.cpp \
! fixedcouponbond.cpp \
forwardvanillaoption.cpp \
! generalutils.cpp \
interpolation.cpp \
processes.cpp \
quantoforwardvanillaoption.cpp \
quantovanillaoption.cpp \
randomsequencegenerator.cpp \
schedule.cpp \
shortratemodels.cpp \
- simpleswap.cpp \
swap.cpp \
termstructures.cpp \
utilities.cpp \
vanillaoption.cpp \
vo_capfloor.cpp \
vo_couponvectors.cpp \
vo_exercise.cpp \
! vo_instruments.cpp \
vo_interpolation.cpp \
volatilities.cpp \
vo_options.cpp \
vo_processes.cpp \
vo_randomsequencegenerator.cpp \
vo_schedule.cpp \
vo_shortratemodels.cpp \
- vo_simpleswap.cpp \
vo_swap.cpp \
vo_termstructures.cpp \
! vo_volatilities.cpp \
! vo_xibor.cpp \
! xibor.cpp \
! zerocouponbond.cpp
--- 54,152 ----
utilities.hpp \
vanillaoption.hpp \
+ vanillaswap.hpp \
+ vcconfig.hpp \
+ vo_bonds.hpp \
+ vo_calendar.hpp \
vo_capfloor.hpp \
+ vo_capletvolstructure.hpp \
vo_couponvectors.hpp \
vo_exercise.hpp \
! vo_forwardrateagreement.hpp \
! vo_index.hpp \
vo_interpolation.hpp \
volatilities.hpp \
+ vo_mathf.hpp \
+ vo_optimization.hpp \
vo_options.hpp \
+ vo_payoffs.hpp \
+ vo_pricingengines.hpp \
vo_processes.hpp \
vo_randomsequencegenerator.hpp \
+ vo_ratehelpers.hpp \
vo_schedule.hpp \
vo_shortratemodels.hpp \
vo_swap.hpp \
+ vo_swaption.hpp \
+ vo_swaptionvolstructure.hpp \
vo_termstructures.hpp \
! vo_vanillaswap.hpp \
! vo_volatilities.hpp
libQuantLibAddin_la_SOURCES = \
asianoption.cpp \
barrieroption.cpp \
+ bonds.cpp \
calendar.cpp \
capfloor.cpp \
! capletvolstructure.cpp \
cliquetoption.cpp \
! conversions.cpp \
couponvectors.cpp \
dividendvanillaoption.cpp \
! enumclassctors.cpp \
! enumclassregistry.cpp \
! enumtyperegistry.cpp \
europeanoption.cpp \
exercise.cpp \
! forwardrateagreement.cpp \
forwardvanillaoption.cpp \
! getcovariance.cpp \
! index.cpp \
! interpolation2D.cpp \
interpolation.cpp \
+ optimization.cpp \
+ payoffs.cpp \
+ pricingengines.cpp \
processes.cpp \
quantoforwardvanillaoption.cpp \
quantovanillaoption.cpp \
randomsequencegenerator.cpp \
+ ratehelpers.cpp \
schedule.cpp \
shortratemodels.cpp \
swap.cpp \
+ swaption.cpp \
+ swaptionvolstructure.cpp \
+ symmetricschurdecomposition.cpp \
termstructures.cpp \
utilities.cpp \
vanillaoption.cpp \
+ vanillaswap.cpp \
+ vo_bonds.cpp \
+ vo_calendar.cpp \
vo_capfloor.cpp \
+ vo_capletvolstructure.cpp \
vo_couponvectors.cpp \
vo_exercise.cpp \
! vo_forwardrateagreement.cpp \
! vo_index.cpp \
vo_interpolation.cpp \
volatilities.cpp \
+ vo_mathf.cpp \
+ vo_optimization.cpp \
vo_options.cpp \
+ vo_payoffs.cpp \
+ vo_pricingengines.cpp \
vo_processes.cpp \
vo_randomsequencegenerator.cpp \
+ vo_ratehelpers.cpp \
vo_schedule.cpp \
vo_shortratemodels.cpp \
vo_swap.cpp \
+ vo_swaption.cpp \
+ vo_swaptionvolstructure.cpp \
vo_termstructures.cpp \
! vo_vanillaswap.cpp \
! vo_volatilities.cpp
!
Index: index.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/index.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** index.hpp 21 Jul 2006 18:19:17 -0000 1.6
--- index.hpp 27 Jul 2006 14:06:32 -0000 1.7
***************
*** 27,31 ****
#include <ql/yieldtermstructure.hpp>
#include <ql/Indexes/xibor.hpp>
! #include <ql/Indexes/swaprate.hpp>
namespace QuantLibAddin {
--- 27,31 ----
#include <ql/yieldtermstructure.hpp>
#include <ql/Indexes/xibor.hpp>
! //#include <ql/Indexes/swaprate.hpp>
namespace QuantLibAddin {
***************
*** 57,60 ****
--- 57,61 ----
const boost::shared_ptr<QuantLib::Xibor>& index);
};
+
}
Index: getcovariance.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/getcovariance.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** getcovariance.hpp 12 Jul 2006 14:03:39 -0000 1.1
--- getcovariance.hpp 27 Jul 2006 14:06:31 -0000 1.2
***************
*** 35,39 ****
{
public:
! CovarianceDecomposition::CovarianceDecomposition(
const QuantLib::Matrix& cov,
double tol);
--- 35,39 ----
{
public:
! CovarianceDecomposition(
const QuantLib::Matrix& cov,
double tol);
Index: enumclassctors.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/enumclassctors.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** enumclassctors.cpp 25 Jul 2006 16:38:26 -0000 1.9
--- enumclassctors.cpp 27 Jul 2006 14:06:31 -0000 1.10
***************
*** 301,305 ****
}
! /* *** EuriborSwapFixA *** */
boost::shared_ptr<QuantLib::EuriborSwapFixA> EURIBORSWAPFIXA_1Y() {
return boost::shared_ptr<QuantLib::EuriborSwapFixA>(
--- 301,305 ----
}
! /* *** EuriborSwapFixA *** */
boost::shared_ptr<QuantLib::EuriborSwapFixA> EURIBORSWAPFIXA_1Y() {
return boost::shared_ptr<QuantLib::EuriborSwapFixA>(
Index: quantovanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantovanillaoption.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** quantovanillaoption.hpp 29 Jun 2006 16:52:12 -0000 1.6
--- quantovanillaoption.hpp 27 Jul 2006 14:06:32 -0000 1.7
***************
*** 27,37 ****
class QuantoVanillaOption : public OneAssetOption {
public:
! QuantoVanillaOption::QuantoVanillaOption(
const QuantLib::Handle<QuantLib::YieldTermStructure>& hYTS,
! const boost::shared_ptr < QuantLib::BlackVolTermStructure > &blackVolTermStructure,
const double &correlation,
! const boost::shared_ptr < QuantLib::GeneralizedBlackScholesProcess > &blackScholesProcess,
const boost::shared_ptr<QuantLib::StrikedTypePayoff> &payoff,
! const boost::shared_ptr < QuantLib::Exercise > &exercise,
const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
--- 27,37 ----
class QuantoVanillaOption : public OneAssetOption {
public:
! QuantoVanillaOption(
const QuantLib::Handle<QuantLib::YieldTermStructure>& hYTS,
! const boost::shared_ptr<QuantLib::BlackVolTermStructure> &blackVolTermStructure,
const double &correlation,
! const boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> &blackScholesProcess,
const boost::shared_ptr<QuantLib::StrikedTypePayoff> &payoff,
! const boost::shared_ptr<QuantLib::Exercise> &exercise,
const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
|