├── doc └── fig │ ├── Taylor_model.aux │ ├── Chebyshev_model.aux │ ├── McCormick_relax.aux │ ├── F.png │ ├── F0.png │ ├── FTE.png │ ├── CM-1D.png │ ├── ELL-2D.png │ ├── F_TAD.png │ ├── ISM-2D.png │ ├── MC-1D.png │ ├── MCTM-1D.png │ ├── TM-1D.png │ ├── TM-2D.png │ ├── exm_uni.png │ ├── MC-TM-2D.png │ ├── PWCSM-2D.png │ ├── PWLSM-2D.png │ ├── TM-MC-2D.png │ ├── dFdX_BAD.png │ ├── dFdX_FAD.png │ ├── MC-1D_relax.png │ ├── TM+MCTM-1D.png │ ├── Taylor_model.dvi │ ├── Taylor_model.png │ ├── dF1dX3_BAD.png │ ├── dF1dX3_FAD.png │ ├── OAcvx_strategy.png │ ├── SB-2D_function.png │ ├── SB-2D_spectral.png │ ├── Chebyshev_model.dvi │ ├── Chebyshev_model.png │ ├── MC-1D_linearize.png │ ├── McCormick_relax.dvi │ ├── McCormick_relax.png │ ├── Quadratization_algo.png │ ├── PWLSM-2D.g │ ├── PWCSM-2D.g │ ├── CM-1D.g │ ├── McCormick_relax.tex │ ├── Taylor_model.tex │ ├── Chebyshev_model.tex │ └── SB-2D.g ├── src ├── 3rdparty │ ├── cpplapack-2015.05.11-1 │ │ ├── test │ │ │ ├── dgematrix │ │ │ │ └── dgematrix-drovector │ │ │ │ │ └── N.A │ │ │ ├── dsymatrix │ │ │ │ ├── dsymatrix-drovector │ │ │ │ │ └── N.A │ │ │ │ └── dsymatrix-lapack │ │ │ │ │ └── main.cpp │ │ │ ├── zgematrix │ │ │ │ └── zgematrix-zrovector │ │ │ │ │ └── N.A │ │ │ ├── zhematrix │ │ │ │ ├── zhematrix-zrovector │ │ │ │ │ └── N.A │ │ │ │ ├── zhecomplex │ │ │ │ │ └── zhe.txt │ │ │ │ └── zhematrix-lapack │ │ │ │ │ └── main.cpp │ │ │ ├── clean │ │ │ └── quaternion │ │ │ │ └── main.cpp │ │ ├── doc │ │ │ ├── clean │ │ │ ├── fullclean │ │ │ ├── do │ │ │ └── image │ │ │ │ └── bandmatrix.png │ │ ├── include │ │ │ ├── _zgematrix- │ │ │ │ ├── _zgematrix-cast.hpp │ │ │ │ ├── _zgematrix-zrovector.hpp │ │ │ │ ├── _zgematrix-_zrovector.hpp │ │ │ │ ├── _zgematrix-unary.hpp │ │ │ │ ├── _zgematrix-misc.hpp │ │ │ │ ├── _zgematrix-complex.hpp │ │ │ │ ├── _zgematrix-double.hpp │ │ │ │ ├── _zgematrix-zcovector.hpp │ │ │ │ └── _zgematrix-_zcovector.hpp │ │ │ ├── zgematrix- │ │ │ │ ├── zgematrix-cast.hpp │ │ │ │ ├── zgematrix-_zrovector.hpp │ │ │ │ ├── zgematrix-zrovector.hpp │ │ │ │ ├── zgematrix-unary.hpp │ │ │ │ ├── zgematrix-zcovector.hpp │ │ │ │ └── zgematrix-_zcovector.hpp │ │ │ ├── _dcovector- │ │ │ │ ├── _dcovector-dgbmatrix.hpp │ │ │ │ ├── _dcovector-dgematrix.hpp │ │ │ │ ├── _dcovector-dgsmatrix.hpp │ │ │ │ ├── _dcovector-dsymatrix.hpp │ │ │ │ ├── _dcovector-_dgbmatrix.hpp │ │ │ │ ├── _dcovector-_dgematrix.hpp │ │ │ │ ├── _dcovector-_dgsmatrix.hpp │ │ │ │ ├── _dcovector-_dsymatrix.hpp │ │ │ │ ├── _dcovector-cast.hpp │ │ │ │ ├── _dcovector-drovector.hpp │ │ │ │ ├── _dcovector-misc.hpp │ │ │ │ ├── _dcovector-_drovector.hpp │ │ │ │ ├── _dcovector-unary.hpp │ │ │ │ └── _dcovector-double.hpp │ │ │ ├── _dgbmatrix- │ │ │ │ ├── _dgbmatrix-drovector.hpp │ │ │ │ ├── _dgbmatrix-_drovector.hpp │ │ │ │ ├── _dgbmatrix-unary.hpp │ │ │ │ ├── _dgbmatrix-misc.hpp │ │ │ │ ├── _dgbmatrix-double.hpp │ │ │ │ └── _dgbmatrix-dcovector.hpp │ │ │ ├── _dgematrix- │ │ │ │ ├── _dgematrix-drovector.hpp │ │ │ │ ├── _dgematrix-_drovector.hpp │ │ │ │ ├── _dgematrix-cast.hpp │ │ │ │ ├── _dgematrix-unary.hpp │ │ │ │ ├── _dgematrix-misc.hpp │ │ │ │ ├── _dgematrix-double.hpp │ │ │ │ ├── _dgematrix-dcovector.hpp │ │ │ │ └── _dgematrix-_dcovector.hpp │ │ │ ├── _dgsmatrix- │ │ │ │ ├── _dgsmatrix-drovector.hpp │ │ │ │ ├── _dgsmatrix-_drovector.hpp │ │ │ │ ├── _dgsmatrix-misc.hpp │ │ │ │ ├── _dgsmatrix-unary.hpp │ │ │ │ ├── _dgsmatrix-dcovector.hpp │ │ │ │ ├── _dgsmatrix-double.hpp │ │ │ │ └── _dgsmatrix-_dcovector.hpp │ │ │ ├── _dssmatrix- │ │ │ │ ├── _dssmatrix-drovector.hpp │ │ │ │ ├── _dssmatrix-_drovector.hpp │ │ │ │ ├── _dssmatrix-misc.hpp │ │ │ │ ├── _dssmatrix-unary.hpp │ │ │ │ └── _dssmatrix-double.hpp │ │ │ ├── _dsymatrix- │ │ │ │ ├── _dsymatrix-drovector.hpp │ │ │ │ ├── _dsymatrix-_drovector.hpp │ │ │ │ ├── _dsymatrix-unary.hpp │ │ │ │ ├── _dsymatrix-double.hpp │ │ │ │ ├── _dsymatrix-dcovector.hpp │ │ │ │ ├── _dsymatrix-_dcovector.hpp │ │ │ │ └── _dsymatrix-misc.hpp │ │ │ ├── _zcovector- │ │ │ │ ├── _zcovector-zgbmatrix.hpp │ │ │ │ ├── _zcovector-zgematrix.hpp │ │ │ │ ├── _zcovector-zgsmatrix.hpp │ │ │ │ ├── _zcovector-zhematrix.hpp │ │ │ │ ├── _zcovector-zhsmatrix.hpp │ │ │ │ ├── _zcovector-zssmatrix.hpp │ │ │ │ ├── _zcovector-_zgbmatrix.hpp │ │ │ │ ├── _zcovector-_zgematrix.hpp │ │ │ │ ├── _zcovector-_zgsmatrix.hpp │ │ │ │ ├── _zcovector-_zhematrix.hpp │ │ │ │ ├── _zcovector-_zhsmatrix.hpp │ │ │ │ ├── _zcovector-_zssmatrix.hpp │ │ │ │ ├── _zcovector-misc.hpp │ │ │ │ ├── _zcovector-zrovector.hpp │ │ │ │ ├── _zcovector-_zrovector.hpp │ │ │ │ ├── _zcovector-unary.hpp │ │ │ │ ├── _zcovector-complex.hpp │ │ │ │ └── _zcovector-double.hpp │ │ │ ├── _zgbmatrix- │ │ │ │ ├── _zgbmatrix-zrovector.hpp │ │ │ │ ├── _zgbmatrix-_zrovector.hpp │ │ │ │ ├── _zgbmatrix-cast.hpp │ │ │ │ ├── _zgbmatrix-unary.hpp │ │ │ │ ├── _zgbmatrix-misc.hpp │ │ │ │ ├── _zgbmatrix-complex.hpp │ │ │ │ └── _zgbmatrix-double.hpp │ │ │ ├── _zgsmatrix- │ │ │ │ ├── _zgsmatrix-zrovector.hpp │ │ │ │ ├── _zgsmatrix-_zrovector.hpp │ │ │ │ ├── _zgsmatrix-cast.hpp │ │ │ │ ├── _zgsmatrix-misc.hpp │ │ │ │ ├── _zgsmatrix-unary.hpp │ │ │ │ ├── _zgsmatrix-complex.hpp │ │ │ │ ├── _zgsmatrix-double.hpp │ │ │ │ └── _zgsmatrix-zcovector.hpp │ │ │ ├── _zhematrix- │ │ │ │ ├── _zhematrix-zrovector.hpp │ │ │ │ ├── _zhematrix-_zrovector.hpp │ │ │ │ ├── _zhematrix-cast.hpp │ │ │ │ ├── _zhematrix-unary.hpp │ │ │ │ ├── _zhematrix-double.hpp │ │ │ │ ├── _zhematrix-calc.hpp │ │ │ │ ├── _zhematrix-complex.hpp │ │ │ │ ├── _zhematrix-zcovector.hpp │ │ │ │ ├── _zhematrix-_zcovector.hpp │ │ │ │ └── _zhematrix-misc.hpp │ │ │ ├── _zhsmatrix- │ │ │ │ ├── _zhsmatrix-zrovector.hpp │ │ │ │ ├── _zhsmatrix-_zrovector.hpp │ │ │ │ ├── _zhsmatrix-misc.hpp │ │ │ │ ├── _zhsmatrix-complex.hpp │ │ │ │ ├── _zhsmatrix-unary.hpp │ │ │ │ └── _zhsmatrix-double.hpp │ │ │ ├── dcovector- │ │ │ │ ├── dcovector-_dgbmatrix.hpp │ │ │ │ ├── dcovector-_dgematrix.hpp │ │ │ │ ├── dcovector-_dgsmatrix.hpp │ │ │ │ ├── dcovector-_dsymatrix.hpp │ │ │ │ ├── dcovector-dgbmatrix.hpp │ │ │ │ ├── dcovector-dgematrix.hpp │ │ │ │ ├── dcovector-dgsmatrix.hpp │ │ │ │ ├── dcovector-dsymatrix.hpp │ │ │ │ ├── dcovector-cast.hpp │ │ │ │ ├── dcovector-drovector.hpp │ │ │ │ ├── dcovector-_drovector.hpp │ │ │ │ └── dcovector-unary.hpp │ │ │ ├── dgbmatrix- │ │ │ │ ├── dgbmatrix-_drovector.hpp │ │ │ │ ├── dgbmatrix-drovector.hpp │ │ │ │ ├── dgbmatrix-unary.hpp │ │ │ │ ├── dgbmatrix-dcovector.hpp │ │ │ │ └── dgbmatrix-_dcovector.hpp │ │ │ ├── dgematrix- │ │ │ │ ├── dgematrix-_drovector.hpp │ │ │ │ ├── dgematrix-drovector.hpp │ │ │ │ ├── dgematrix-cast.hpp │ │ │ │ ├── dgematrix-unary.hpp │ │ │ │ ├── dgematrix-dcovector.hpp │ │ │ │ └── dgematrix-_dcovector.hpp │ │ │ ├── dgsmatrix- │ │ │ │ ├── dgsmatrix-_drovector.hpp │ │ │ │ ├── dgsmatrix-drovector.hpp │ │ │ │ ├── dgsmatrix-unary.hpp │ │ │ │ ├── dgsmatrix-dcovector.hpp │ │ │ │ └── dgsmatrix-_dcovector.hpp │ │ │ ├── dssmatrix- │ │ │ │ ├── dssmatrix-_drovector.hpp │ │ │ │ ├── dssmatrix-drovector.hpp │ │ │ │ └── dssmatrix-unary.hpp │ │ │ ├── dsymatrix- │ │ │ │ ├── dsymatrix-_drovector.hpp │ │ │ │ ├── dsymatrix-drovector.hpp │ │ │ │ ├── dsymatrix-unary.hpp │ │ │ │ ├── dsymatrix-dcovector.hpp │ │ │ │ └── dsymatrix-_dcovector.hpp │ │ │ ├── zcovector- │ │ │ │ ├── zcovector-_zgbmatrix.hpp │ │ │ │ ├── zcovector-_zgematrix.hpp │ │ │ │ ├── zcovector-_zgsmatrix.hpp │ │ │ │ ├── zcovector-_zhematrix.hpp │ │ │ │ ├── zcovector-_zhsmatrix.hpp │ │ │ │ ├── zcovector-_zssmatrix.hpp │ │ │ │ ├── zcovector-zgbmatrix.hpp │ │ │ │ ├── zcovector-zgematrix.hpp │ │ │ │ ├── zcovector-zgsmatrix.hpp │ │ │ │ ├── zcovector-zhematrix.hpp │ │ │ │ ├── zcovector-zhsmatrix.hpp │ │ │ │ ├── zcovector-zssmatrix.hpp │ │ │ │ ├── zcovector-zrovector.hpp │ │ │ │ ├── zcovector-_zrovector.hpp │ │ │ │ └── zcovector-unary.hpp │ │ │ ├── zgbmatrix- │ │ │ │ ├── zgbmatrix-_zrovector.hpp │ │ │ │ ├── zgbmatrix-zrovector.hpp │ │ │ │ ├── zgbmatrix-cast.hpp │ │ │ │ ├── zgbmatrix-unary.hpp │ │ │ │ └── zgbmatrix-zcovector.hpp │ │ │ ├── zgsmatrix- │ │ │ │ ├── zgsmatrix-_zrovector.hpp │ │ │ │ ├── zgsmatrix-zrovector.hpp │ │ │ │ ├── zgsmatrix-cast.hpp │ │ │ │ ├── zgsmatrix-unary.hpp │ │ │ │ ├── zgsmatrix-zcovector.hpp │ │ │ │ └── zgsmatrix-_zcovector.hpp │ │ │ ├── zhematrix- │ │ │ │ ├── zhematrix-_zrovector.hpp │ │ │ │ ├── zhematrix-zrovector.hpp │ │ │ │ ├── zhematrix-cast.hpp │ │ │ │ ├── zhematrix-unary.hpp │ │ │ │ ├── zhematrix-zcovector.hpp │ │ │ │ ├── zhematrix-_zcovector.hpp │ │ │ │ └── zhematrix-complex.hpp │ │ │ ├── zhsmatrix- │ │ │ │ ├── zhsmatrix-_zrovector.hpp │ │ │ │ ├── zhsmatrix-zrovector.hpp │ │ │ │ ├── zhsmatrix-complex.hpp │ │ │ │ └── zhsmatrix-unary.hpp │ │ │ ├── complex- │ │ │ │ ├── complex-zhsmatrix.hpp │ │ │ │ ├── complex-_zhsmatrix.hpp │ │ │ │ ├── complex-_zcovector.hpp │ │ │ │ ├── complex-_zrovector.hpp │ │ │ │ ├── complex-_zgematrix.hpp │ │ │ │ ├── complex-_zgbmatrix.hpp │ │ │ │ ├── complex-zcovector.hpp │ │ │ │ ├── complex-zrovector.hpp │ │ │ │ ├── complex-zgematrix.hpp │ │ │ │ ├── complex-_zhematrix.hpp │ │ │ │ ├── complex-_zgsmatrix.hpp │ │ │ │ ├── complex-zhematrix.hpp │ │ │ │ ├── complex-zgbmatrix.hpp │ │ │ │ └── complex-zgsmatrix.hpp │ │ │ ├── double- │ │ │ │ ├── double-_dcovector.hpp │ │ │ │ ├── double-_drovector.hpp │ │ │ │ ├── double-_zcovector.hpp │ │ │ │ ├── double-_zrovector.hpp │ │ │ │ ├── double-_dgematrix.hpp │ │ │ │ ├── double-_zgematrix.hpp │ │ │ │ ├── double-_zhematrix.hpp │ │ │ │ ├── double-_dgbmatrix.hpp │ │ │ │ ├── double-_zgbmatrix.hpp │ │ │ │ ├── double-_dsymatrix.hpp │ │ │ │ ├── double-dcovector.hpp │ │ │ │ ├── double-drovector.hpp │ │ │ │ ├── double-zcovector.hpp │ │ │ │ ├── double-zrovector.hpp │ │ │ │ ├── double-dgrmatrix.hpp │ │ │ │ ├── double-zhematrix.hpp │ │ │ │ ├── double-dgematrix.hpp │ │ │ │ ├── double-zgematrix.hpp │ │ │ │ ├── double-_dgsmatrix.hpp │ │ │ │ ├── double-_dssmatrix.hpp │ │ │ │ ├── double-_zgsmatrix.hpp │ │ │ │ ├── double-_zhsmatrix.hpp │ │ │ │ ├── double-dsymatrix.hpp │ │ │ │ ├── double-dgbmatrix.hpp │ │ │ │ ├── double-zgbmatrix.hpp │ │ │ │ ├── double-dgsmatrix.hpp │ │ │ │ ├── double-dssmatrix.hpp │ │ │ │ ├── double-zgsmatrix.hpp │ │ │ │ └── double-zhsmatrix.hpp │ │ │ ├── drovector- │ │ │ │ ├── drovector-cast.hpp │ │ │ │ ├── drovector-unary.hpp │ │ │ │ ├── drovector-dcovector.hpp │ │ │ │ ├── drovector-_dcovector.hpp │ │ │ │ ├── drovector-dsymatrix.hpp │ │ │ │ ├── drovector-dgematrix.hpp │ │ │ │ ├── drovector-_dsymatrix.hpp │ │ │ │ ├── drovector-_dgematrix.hpp │ │ │ │ ├── drovector-dgsmatrix.hpp │ │ │ │ ├── drovector-dgbmatrix.hpp │ │ │ │ ├── drovector-_dgsmatrix.hpp │ │ │ │ └── drovector-_dgbmatrix.hpp │ │ │ ├── _drovector- │ │ │ │ ├── _drovector-cast.hpp │ │ │ │ ├── _drovector-misc.hpp │ │ │ │ ├── _drovector-unary.hpp │ │ │ │ ├── _drovector-double.hpp │ │ │ │ ├── _drovector-dcovector.hpp │ │ │ │ ├── _drovector-_dcovector.hpp │ │ │ │ ├── _drovector-dsymatrix.hpp │ │ │ │ ├── _drovector-dgematrix.hpp │ │ │ │ ├── _drovector-_dsymatrix.hpp │ │ │ │ ├── _drovector-_dgematrix.hpp │ │ │ │ ├── _drovector-dgsmatrix.hpp │ │ │ │ └── _drovector-dgbmatrix.hpp │ │ │ ├── _zrovector- │ │ │ │ ├── _zrovector-misc.hpp │ │ │ │ ├── _zrovector-unary.hpp │ │ │ │ ├── _zrovector-complex.hpp │ │ │ │ ├── _zrovector-double.hpp │ │ │ │ ├── _zrovector-zcovector.hpp │ │ │ │ ├── _zrovector-_zcovector.hpp │ │ │ │ ├── _zrovector-zhematrix.hpp │ │ │ │ ├── _zrovector-zgematrix.hpp │ │ │ │ ├── _zrovector-_zhematrix.hpp │ │ │ │ ├── _zrovector-_zgematrix.hpp │ │ │ │ └── _zrovector-zgsmatrix.hpp │ │ │ ├── zrovector- │ │ │ │ ├── zrovector-unary.hpp │ │ │ │ ├── zrovector-zcovector.hpp │ │ │ │ ├── zrovector-_zcovector.hpp │ │ │ │ ├── zrovector-zhematrix.hpp │ │ │ │ ├── zrovector-zgematrix.hpp │ │ │ │ ├── zrovector-_zhematrix.hpp │ │ │ │ ├── zrovector-_zgematrix.hpp │ │ │ │ ├── zrovector-zgsmatrix.hpp │ │ │ │ ├── zrovector-_zgsmatrix.hpp │ │ │ │ └── zrovector-zgbmatrix.hpp │ │ │ ├── dgrmatrix- │ │ │ │ ├── dgrmatrix-calc.hpp │ │ │ │ ├── dgrmatrix-_dcovector.hpp │ │ │ │ └── dgrmatrix-unary.hpp │ │ │ └── small │ │ │ │ └── zrovector_small-specialized.hpp │ │ ├── packaging │ │ │ ├── rpm │ │ │ │ └── mkrpm.sh │ │ │ ├── deb │ │ │ │ ├── README │ │ │ │ └── control │ │ │ └── tgz │ │ │ │ └── mktgz.sh │ │ ├── contrib │ │ │ ├── GMRES │ │ │ │ ├── b8.dco │ │ │ │ └── A8.dge │ │ │ ├── clean │ │ │ └── Subspace │ │ │ │ └── K6.dssmatrix │ │ ├── README │ │ └── benchmark │ │ │ └── clean │ ├── boost │ │ └── Makefile │ └── fadbad++ │ │ ├── test │ │ ├── BorlandCPP │ │ │ └── Test.bpf │ │ ├── TestTAD.h │ │ ├── TestUDT.h │ │ ├── Makefile │ │ ├── TestFADBAD.h │ │ ├── Makefile.sun │ │ ├── TestAll.cpp │ │ ├── IReportLogger.h │ │ └── STDReportLog.h │ │ └── examples │ │ └── ExampleBAD.cpp ├── pymc │ ├── fflin.py │ ├── pymc.cpp │ └── ffcustom.py └── mc │ └── mctime.hpp ├── LICENSE ├── .gitmodules └── test ├── INTERVAL ├── INT-2D.g ├── INT-1D.g └── makefile ├── RELAX ├── LINREL_1d.g ├── PWLREL_1d.g ├── LINREL_2d.g └── FFDAGEXT_2d.g ├── MCCORMICK ├── makefile └── MC-1D.g ├── SPECTRAL ├── makefile └── SB-2D.g ├── ML └── makefile ├── SUPRELAX └── SM-2D.gpt └── POLYMODEL └── makefile /doc/fig/Taylor_model.aux: -------------------------------------------------------------------------------- 1 | \relax 2 | -------------------------------------------------------------------------------- /doc/fig/Chebyshev_model.aux: -------------------------------------------------------------------------------- 1 | \relax 2 | -------------------------------------------------------------------------------- /doc/fig/McCormick_relax.aux: -------------------------------------------------------------------------------- 1 | \relax 2 | -------------------------------------------------------------------------------- /doc/fig/F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/F.png -------------------------------------------------------------------------------- /doc/fig/F0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/F0.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/dgematrix/dgematrix-drovector/N.A: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/dsymatrix/dsymatrix-drovector/N.A: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/zgematrix/zgematrix-zrovector/N.A: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/zhematrix/zhematrix-zrovector/N.A: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/fig/FTE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/FTE.png -------------------------------------------------------------------------------- /doc/fig/CM-1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/CM-1D.png -------------------------------------------------------------------------------- /doc/fig/ELL-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/ELL-2D.png -------------------------------------------------------------------------------- /doc/fig/F_TAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/F_TAD.png -------------------------------------------------------------------------------- /doc/fig/ISM-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/ISM-2D.png -------------------------------------------------------------------------------- /doc/fig/MC-1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/MC-1D.png -------------------------------------------------------------------------------- /doc/fig/MCTM-1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/MCTM-1D.png -------------------------------------------------------------------------------- /doc/fig/TM-1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/TM-1D.png -------------------------------------------------------------------------------- /doc/fig/TM-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/TM-2D.png -------------------------------------------------------------------------------- /doc/fig/exm_uni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/exm_uni.png -------------------------------------------------------------------------------- /doc/fig/MC-TM-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/MC-TM-2D.png -------------------------------------------------------------------------------- /doc/fig/PWCSM-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/PWCSM-2D.png -------------------------------------------------------------------------------- /doc/fig/PWLSM-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/PWLSM-2D.png -------------------------------------------------------------------------------- /doc/fig/TM-MC-2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/TM-MC-2D.png -------------------------------------------------------------------------------- /doc/fig/dFdX_BAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/dFdX_BAD.png -------------------------------------------------------------------------------- /doc/fig/dFdX_FAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/dFdX_FAD.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/doc/clean: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f std err doxygen.log 3 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-cast.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgematrix-/zgematrix-cast.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /doc/fig/MC-1D_relax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/MC-1D_relax.png -------------------------------------------------------------------------------- /doc/fig/TM+MCTM-1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/TM+MCTM-1D.png -------------------------------------------------------------------------------- /doc/fig/Taylor_model.dvi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/Taylor_model.dvi -------------------------------------------------------------------------------- /doc/fig/Taylor_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/Taylor_model.png -------------------------------------------------------------------------------- /doc/fig/dF1dX3_BAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/dF1dX3_BAD.png -------------------------------------------------------------------------------- /doc/fig/dF1dX3_FAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/dF1dX3_FAD.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgbmatrix-/_dgbmatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgematrix-/_dgematrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgsmatrix-/_dgsmatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dssmatrix-/_dssmatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dsymatrix-/_dsymatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zssmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgbmatrix-/_zgbmatrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgsmatrix-/_zgsmatrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhsmatrix-/_zhsmatrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-_dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-_dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-_dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-_dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dcovector-/dcovector-dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgbmatrix-/dgbmatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgbmatrix-/dgbmatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgematrix-/dgematrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgematrix-/dgematrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgsmatrix-/dgsmatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgsmatrix-/dgsmatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dssmatrix-/dssmatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dssmatrix-/dssmatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dsymatrix-/dsymatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dsymatrix-/dsymatrix-drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-_zgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-_zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-_zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-_zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-_zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-_zssmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-zgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zcovector-/zcovector-zssmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgbmatrix-/zgbmatrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgbmatrix-/zgbmatrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgematrix-/zgematrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgematrix-/zgematrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgsmatrix-/zgsmatrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgsmatrix-/zgsmatrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhematrix-/zhematrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhematrix-/zhematrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhsmatrix-/zhsmatrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhsmatrix-/zhsmatrix-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /doc/fig/OAcvx_strategy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/OAcvx_strategy.png -------------------------------------------------------------------------------- /doc/fig/SB-2D_function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/SB-2D_function.png -------------------------------------------------------------------------------- /doc/fig/SB-2D_spectral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/SB-2D_spectral.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-_dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-_dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-_dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-_dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgbmatrix-/_dgbmatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgematrix-/_dgematrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgsmatrix-/_dgsmatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dssmatrix-/_dssmatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dsymatrix-/_dsymatrix-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zssmatrix.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgbmatrix-/_zgbmatrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgsmatrix-/_zgsmatrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhsmatrix-/_zhsmatrix-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //// N/A //// 2 | -------------------------------------------------------------------------------- /doc/fig/Chebyshev_model.dvi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/Chebyshev_model.dvi -------------------------------------------------------------------------------- /doc/fig/Chebyshev_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/Chebyshev_model.png -------------------------------------------------------------------------------- /doc/fig/MC-1D_linearize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/MC-1D_linearize.png -------------------------------------------------------------------------------- /doc/fig/McCormick_relax.dvi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/McCormick_relax.dvi -------------------------------------------------------------------------------- /doc/fig/McCormick_relax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/McCormick_relax.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/packaging/rpm/mkrpm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rpmbuild -bb cpplapack.spec 3 | -------------------------------------------------------------------------------- /doc/fig/Quadratization_algo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/doc/fig/Quadratization_algo.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/doc/fullclean: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f std err doxygen.log 3 | rm -rf html 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | For licensing information for files in this directory, please see the 2 | comments in the header of each file. 3 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/doc/do: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f std err doxygen.log 3 | rm -rf html 4 | doxygen > std 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "extern/pybind11"] 2 | path = extern/pybind11 3 | url = https://github.com/pybind/pybind11 4 | branch = stable 5 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/packaging/deb/README: -------------------------------------------------------------------------------- 1 | Now we use "alien" converter to make deb packpage. 2 | 3 | alien -dk cpplapack-YYYY.MM.DD-X.noarch.rpm 4 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/doc/image/bandmatrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omega-icl/mcpp/HEAD/src/3rdparty/cpplapack-2015.05.11-1/doc/image/bandmatrix.png -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/zhematrix/zhecomplex/zhe.txt: -------------------------------------------------------------------------------- 1 | #zhematrix 4 2 | (0,0) 3 | (1,-0) (1,0) 4 | (2,-0) (2,-1) (2,0) 5 | (3,-0) (3,-1) (3,-2) (3,0) 6 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/contrib/GMRES/b8.dco: -------------------------------------------------------------------------------- 1 | dcovector 8 2 | 0.000000e+00 3 | 0.000000e+00 4 | 0.000000e+00 5 | 0.000000e+00 6 | 0.000000e+00 7 | 1.000000e+00 8 | -0.000000e+00 9 | -0.000000e+00 10 | -------------------------------------------------------------------------------- /src/3rdparty/boost/Makefile: -------------------------------------------------------------------------------- 1 | CC = g++ 2 | CFLAGS = -I.. 3 | 4 | .cpp.o: 5 | $(CC) $(CFLAGS) -c $< 6 | 7 | all: remez 8 | 9 | remez : remez.o 10 | $(CC) -o $@ $@.o 11 | 12 | clean: 13 | -rm *.o remez 14 | 15 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/BorlandCPP/Test.bpf: -------------------------------------------------------------------------------- 1 | This file is used by the project manager only and should be treated like the project file 2 | 3 | To add a file to this project use the Project menu 'Add to Project' 4 | 5 | main -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/TestTAD.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_TAD_H 2 | #define TEST_TAD_H 3 | 4 | #include "IReportLogger.h" 5 | 6 | class TestTAD : public IReportLogger 7 | { 8 | public: 9 | void run(IReportLog& rlog); 10 | }; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/TestUDT.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_UDT_H 2 | #define TEST_UDT_H 3 | 4 | #include "IReportLogger.h" 5 | 6 | class TestUDT : public IReportLogger 7 | { 8 | public: 9 | void run(IReportLog& rlog); 10 | }; 11 | 12 | #endif 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/contrib/clean: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pwd=$PWD 3 | for i in `find * -type d | grep -v .svn`; do 4 | echo $i 5 | cd $i 6 | rm -f A.OUT main.o A.dgematrix A.dsymatrix y.dcovector answer.dcovector solution.dcovector *~ 7 | cd $pwd 8 | done 9 | -------------------------------------------------------------------------------- /test/INTERVAL/INT-2D.g: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set ylabel 'y' 3 | set hidden3d 4 | set view 65,330 5 | 6 | splot 'INT-2D.out' u 1:2:3 tit 'function' w l lt 1, \ 7 | '' u 1:2:4 tit 'lower bound' w l lt 3, \ 8 | '' u 1:2:5 tit 'upper bound' w l lt 3 9 | 10 | pause -1 " TO CONTINUE" 11 | 12 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/Makefile: -------------------------------------------------------------------------------- 1 | CC = g++ -g 2 | CFLAGS = -I.. -D_DEBUG 3 | OBJ = TestFADBAD.o TestTAD.o TestUDT.o TestAll.o 4 | 5 | .cpp.o: 6 | $(CC) $(CFLAGS) -c $< 7 | 8 | TestAll : $(OBJ) 9 | $(CC) -o $@ $(OBJ) 10 | 11 | all: TestAll 12 | 13 | clean: 14 | -rm *.o TestAll 15 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/TestFADBAD.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_FADBAD_H 2 | #define TEST_FADBAD_H 3 | 4 | #include "IReportLogger.h" 5 | 6 | class TestFADBAD : public IReportLogger 7 | { 8 | public: 9 | void run(IReportLog& rlog); 10 | }; 11 | 12 | #endif 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/Makefile.sun: -------------------------------------------------------------------------------- 1 | CC = CC -KPIC -features=tmplife 2 | CFLAGS = -I.. 3 | OBJ = TestAll.o TestFADBAD.o TestUDT.o TestTAD.o 4 | 5 | %.o:%.cpp 6 | $(CC) $(CFLAGS) -c $< 7 | 8 | TestAll : $(OBJ) 9 | $(CC) -o $@ $(OBJ) 10 | 11 | all: TestAll 12 | 13 | clean: 14 | -rm *.o TestAll 15 | 16 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/complex-/complex-zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! complex*zhsmatrix operator */ 3 | inline _zgsmatrix operator*(const comple& d, const zhsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | zgsmatrix newmat =mat.to_zgsmatrix(); 6 | return d*newmat; 7 | } 8 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/complex-/complex-_zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! complex*_zhsmatrix operator */ 3 | inline _zgsmatrix operator*(const comple& d, const _zhsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | zgsmatrix newmat =mat.to_zgsmatrix(); 6 | return d*newmat; 7 | } 8 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_dcovector operator */ 3 | inline _dcovector operator*(const double& d, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | dscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_drovector operator */ 3 | inline _drovector operator*(const double& d, const _drovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | dscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | -------------------------------------------------------------------------------- /test/INTERVAL/INT-1D.g: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set ylabel 'f' 3 | set key below 4 | 5 | plot 'INT-1D.out' u 1:2 tit 'function' w l lt 1, \ 6 | '' u 1:3 tit 'bounds' w l lt 2, \ 7 | '' u 1:4 tit '' w l lt 2 8 | 9 | pause -1 " TO CONTINUE" 10 | 11 | set term post eps enh solid color 18 12 | set out 'INT-1D.eps' 13 | rep 14 | set term pop 15 | set out 16 | 17 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/complex-/complex-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! comple*_zcovector operator */ 3 | inline _zcovector operator*(const comple& d, const _zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/complex-/complex-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! comple*_zrovector operator */ 3 | inline _zrovector operator*(const comple& d, const _zrovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_zcovector operator */ 3 | inline _zcovector operator*(const double& d, const _zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zdscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_zrovector operator */ 3 | inline _zrovector operator*(const double& d, const _zrovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zdscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/complex-/complex-_zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! comple*_zgematrix operator */ 3 | inline _zgematrix operator*(const comple& d, const _zgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.m*mat.n; 6 | CPPL_INT inc =1; 7 | zscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_dgematrix operator */ 3 | inline _dgematrix operator*(const double& d, const _dgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.m*mat.n; 6 | CPPL_INT inc =1; 7 | dscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_zgematrix operator */ 3 | inline _zgematrix operator*(const double& d, const _zgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.m*mat.n; 6 | CPPL_INT inc =1; 7 | zdscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_zhematrix operator */ 3 | inline _zhematrix operator*(const double& d, const _zhematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.n*mat.n; 6 | CPPL_INT inc =1; 7 | zdscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/README: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | 3 | inlude/: CPPLapack header files 4 | doc/: CPPLapack documentation files (see doc/html/index.html) 5 | test/: CPPLapack test programs 6 | benchmark/: CPPLapack benchmark programs 7 | makefiles/: CPPLapack Makefile samples 8 | contrib/: CPPLapack contribution programs 9 | packaging/: files for rpm and deb packaging 10 | README: This file 11 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgematrix-/dgematrix-cast.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! cast to _zgematrix */ 3 | inline _zgematrix dgematrix::to_zgematrix() const 4 | {CPPL_VERBOSE_REPORT; 5 | zgematrix newmat(m,n); 6 | for(CPPL_INT i=0; i 5 | 6 | class IReportLog 7 | { 8 | public: 9 | virtual std::ostream& failed() =0; 10 | virtual std::ostream& succeeded() =0; 11 | ~IReportLog(){} 12 | }; 13 | 14 | class IReportLogger 15 | { 16 | public: 17 | virtual void run(IReportLog&) =0; 18 | ~IReportLogger(){} 19 | }; 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/contrib/Subspace/K6.dssmatrix: -------------------------------------------------------------------------------- 1 | dssmatrix 6 100000 2 | 0 0 8.653846e+08 3 | 1 0 4.807692e+08 4 | 1 1 8.653846e+08 5 | 2 2 6.730769e+08 6 | 3 3 1.923077e+08 7 | 4 4 1.923077e+08 8 | 5 5 6.730769e+08 9 | 2 0 -6.730769e+08 10 | 2 1 -2.884615e+08 11 | 3 0 -1.923077e+08 12 | 3 1 -1.923077e+08 13 | 4 0 -1.923077e+08 14 | 4 1 -1.923077e+08 15 | 5 0 -2.884615e+08 16 | 5 1 -6.730769e+08 17 | 4 3 1.923077e+08 18 | 5 2 2.884615e+08 19 | -------------------------------------------------------------------------------- /doc/fig/PWLSM-2D.g: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set xrange [1:2] 3 | set ylabel 'y' 4 | set yrange [0:1] 5 | set key above 6 | set hidden3d 7 | set view 65,10,1,1.4 8 | 9 | splot 'PWLSM-2D.out' u 1:2:3 tit 'f' w l lt 1 lc 8, \ 10 | '' u 1:2:4 tit 'f^u' w l lt 1 lc 4, \ 11 | '' u 1:2:5 tit 'f^o' w l lt 1 lc 7 12 | 13 | pause -1 " TO CONTINUE" 14 | 15 | set terminal pngcairo size 490,367 enhanced font 'Verdana,9' 16 | set out "PWLSM-2D.png" 17 | rep 18 | 19 | -------------------------------------------------------------------------------- /doc/fig/PWCSM-2D.g: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set xrange [1:2] 3 | set ylabel 'y' 4 | set yrange [0:1] 5 | set key above 6 | set hidden3d 7 | set view 65,10,1,1.4 8 | 9 | splot 'PWCSM-2D.out' u 1:2:3 tit 'f' w l lt 1 lc 8, \ 10 | 'PWCSM2-2D.out' u 1:2:3 tit 'f^u' w l lt 1 lc 4, \ 11 | '' u 1:2:4 tit 'f^o' w l lt 1 lc 7 12 | 13 | pause -1 " TO CONTINUE" 14 | 15 | set terminal pngcairo size 490,367 enhanced font 'Verdana,9' 16 | set out "PWCSM-2D.png" 17 | rep 18 | 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhematrix-/zhematrix-cast.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! convert to _zgematrix */ 3 | inline _zgematrix zhematrix::to_zgematrix() const 4 | {CPPL_VERBOSE_REPORT; 5 | zgematrix newmat(n,n); 6 | 7 | for(CPPL_INT i=0; i::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *= d; 8 | } 9 | 10 | return mat; 11 | } 12 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_dgsmatrix operator */ 3 | inline _dgsmatrix operator*(const double& d, const _dgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *= d; 8 | } 9 | 10 | return mat; 11 | } 12 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_dssmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_dssmatrix operator */ 3 | inline _dssmatrix operator*(const double& d, const _dssmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *=d; 8 | } 9 | 10 | return mat; 11 | } 12 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_zgsmatrix operator */ 3 | inline _zgsmatrix operator*(const double& d, const _zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *= d; 8 | } 9 | 10 | return mat; 11 | } 12 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-_zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*_zhsmatrix operator */ 3 | inline _zhsmatrix operator*(const double& d, const _zhsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *=d; 8 | } 9 | 10 | return mat; 11 | } 12 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*dsymatrix operator */ 3 | inline _dsymatrix operator*(const double& d, const dsymatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | dsymatrix newmat(mat.n); 6 | 7 | for(CPPL_INT j=0; j TO CONTINUE" 14 | 15 | set term post eps enh solid color 21 16 | set out 'LINREL_1d.eps' 17 | rep 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/RELAX/PWLREL_1d.g: -------------------------------------------------------------------------------- 1 | resfile = 'PWLREL_1d.out' 2 | 3 | set xlabel 'x' 4 | set key below 5 | 6 | plot resfile u 1:5:6 tit '' w filledcurves lc 5 lt 1, \ 7 | '' u 1:2 tit 'function' w l lt 1 lc -1 lw 3, \ 8 | '' u 1:3 tit '' w l lt 3 lc 7 lw 3, \ 9 | '' u 1:4 tit '' w l lt 3 lc 7 lw 3, \ 10 | '' u 1:5 tit 'relaxations' w l lt 1 lc 7 lw 1, \ 11 | '' u 1:6 tit '' w l lt 1 lc 7 lw 1 12 | 13 | pause -1 " TO CONTINUE" 14 | 15 | set term post eps enh solid color 21 16 | set out 'PWLREL_1d.eps' 17 | rep 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-misc.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! nullify all the vector data */ 3 | inline void _zcovector::nullify() const 4 | {CPPL_VERBOSE_REPORT; 5 | l=0; 6 | array=NULL; 7 | } 8 | 9 | //============================================================================= 10 | /*! destroy all the vector data */ 11 | inline void _zcovector::destroy() const 12 | {CPPL_VERBOSE_REPORT; 13 | delete [] array; 14 | array=NULL; 15 | } 16 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-misc.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! nullify all the vector data */ 3 | inline void _zrovector::nullify() const 4 | {CPPL_VERBOSE_REPORT; 5 | l=0; 6 | array=NULL; 7 | } 8 | 9 | //============================================================================= 10 | /*! destroy all the vector data */ 11 | inline void _zrovector::destroy() const 12 | {CPPL_VERBOSE_REPORT; 13 | delete [] array; 14 | array=NULL; 15 | } 16 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-misc.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! nullify all the vector data */ 3 | inline void _drovector::nullify() const 4 | {CPPL_VERBOSE_REPORT; 5 | l=0; 6 | cap=0; 7 | array=NULL; 8 | } 9 | 10 | //============================================================================= 11 | /*! destroy all the vector data */ 12 | inline void _drovector::destroy() const 13 | {CPPL_VERBOSE_REPORT; 14 | delete [] array; 15 | array=NULL; 16 | } 17 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-zrovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zcovector*zrovector operator */ 3 | inline _zgematrix operator*(const _zcovector& covec, const zrovector& rovec) 4 | {CPPL_VERBOSE_REPORT; 5 | zgematrix newmat(covec.l, rovec.l); 6 | for(CPPL_INT i=0; i::iterator newmat_data_end =newmat.data.end(); 8 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 9 | it->v *= d; 10 | } 11 | 12 | return _(newmat); 13 | } 14 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-dssmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*dssmatrix operator */ 3 | inline _dssmatrix operator*(const double& d, const dssmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | dssmatrix newmat =mat; 6 | 7 | const std::vector::iterator newmat_data_end =newmat.data.end(); 8 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 9 | it->v *=d; 10 | } 11 | 12 | return _(newmat); 13 | } 14 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*zgsmatrix operator */ 3 | inline _zgsmatrix operator*(const double& d, const zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | zgsmatrix newmat =mat; 6 | 7 | const std::vector::iterator newmat_data_end =newmat.data.end(); 8 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 9 | it->v *= d; 10 | } 11 | 12 | return _(newmat); 13 | } 14 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/double-/double-zhsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! double*zhsmatrix operator */ 3 | inline _zhsmatrix operator*(const double& d, const zhsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | zhsmatrix newmat =mat; 6 | 7 | const std::vector::iterator newmat_data_end =newmat.data.end(); 8 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 9 | it->v *=d; 10 | } 11 | 12 | return _(newmat); 13 | } 14 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgbmatrix-/zgbmatrix-cast.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! convert to _zgematrix */ 3 | inline _zgematrix zgbmatrix::to_zgematrix() const 4 | {CPPL_VERBOSE_REPORT; 5 | zgematrix newmat( zgematrix(m,n).zero() ); 6 | 7 | for(CPPL_INT i=0; i::iterator newmat_data_end =newmat.data.end(); 8 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 9 | it->v *= d; 10 | } 11 | 12 | return _(newmat); 13 | } 14 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/packaging/deb/control: -------------------------------------------------------------------------------- 1 | Package: cpplapack 2 | Version: 2015.05.11 3 | Section: devel 4 | Priority: optional 5 | Architecture: all 6 | Essential: no 7 | Homepage: http://cpplapack.sourceforge.net/ 8 | Maintainer: Yuki ONISHI 9 | Description: CPPLapack library header files 10 | CPPLapack is a C++ matrix library designed as a class wrapper for BLAS, LAPACK and PARDISO. 11 | Visit http://cpplapack.sourceforge.net/ to obtain the documentation, update information, and the latest version in the subversion (svn) repository. 12 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-_zrovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zcovector*_zrovector operator */ 3 | inline _zgematrix operator*(const _zcovector& covec, const _zrovector& rovec) 4 | {CPPL_VERBOSE_REPORT; 5 | zgematrix newmat(covec.l, rovec.l); 6 | for(CPPL_INT i=0; i::const_iterator data_end =data.end(); 9 | for(std::vector::const_iterator it=data.begin(); it!=data_end; it++){ 10 | newmat(it->i,it->j) = it->v; 11 | } 12 | 13 | destroy(); 14 | return _(newmat); 15 | } 16 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dcovector-/_dcovector-_drovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dcovector*_drovector operator */ 3 | inline _dgematrix operator*(const _dcovector& covec, const _drovector& rovec) 4 | {CPPL_VERBOSE_REPORT; 5 | dgematrix newmat(covec.l, rovec.l); 6 | 7 | for(CPPL_INT i=0; i TO CONTINUE" 15 | 16 | splot resfile u 1:2:($7-$3) tit 'gap' w l lt 1 lc 1 lw 1, \ 17 | '' u 1:2:($6-$3) tit 'relaxations' w l lt 7 lc 7 lw 1 18 | 19 | pause -1 " TO CONTINUE" 20 | 21 | set term post eps enh solid color 21 22 | set out 'LINREL_2d.eps' 23 | rep 24 | 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgbmatrix-/dgbmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +dgbmatrix operator */ 3 | inline const dgbmatrix& operator+(const dgbmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -dgbmatrix operator */ 10 | inline _dgbmatrix operator-(const dgbmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | dgbmatrix newmat(mat.m,mat.n,mat.kl,mat.ku); 13 | for(CPPL_INT i=0; i<(newmat.kl+newmat.ku+1)*newmat.n; i++){ 14 | newmat.array[i]=-mat.array[i]; 15 | } 16 | 17 | return _(newmat); 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgbmatrix-/zgbmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +zgbmatrix operator */ 3 | inline const zgbmatrix& operator+(const zgbmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -zgbmatrix operator */ 10 | inline _zgbmatrix operator-(const zgbmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | zgbmatrix newmat(mat.m,mat.n,mat.kl,mat.ku); 13 | for(CPPL_INT i=0; i<(newmat.kl+newmat.ku+1)*newmat.n; i++){ 14 | newmat.array[i]=-mat.array[i]; 15 | } 16 | 17 | return _(newmat); 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dsymatrix-/dsymatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +dsymatrix operator */ 3 | inline const dsymatrix& operator+(const dsymatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -dsymatrix operator */ 10 | inline _dsymatrix operator-(const dsymatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | dsymatrix newmat(mat.n); 13 | 14 | const CPPL_INT size =newmat.n*newmat.n; 15 | for(CPPL_INT i=0; i::iterator mat_data_end =mat.data.end(); 13 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 14 | it->v =-it->v; 15 | } 16 | 17 | return mat; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zcovector*comple operator */ 3 | inline _zcovector operator*(const _zcovector& vec, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | 10 | //============================================================================= 11 | /*! _zcovector/comple operator */ 12 | inline _zcovector operator/(const _zcovector& vec, const comple& d) 13 | {CPPL_VERBOSE_REPORT; 14 | comple dinv =1./d; 15 | CPPL_INT inc =1; 16 | zscal_(&vec.l, &dinv, vec.array, &inc); 17 | return vec; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zcovector-/_zcovector-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zcovector*double operator */ 3 | inline _zcovector operator*(const _zcovector& vec, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zdscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | 10 | //============================================================================= 11 | /*! _zcovector/double operator */ 12 | inline _zcovector operator/(const _zcovector& vec, const double& d) 13 | {CPPL_VERBOSE_REPORT; 14 | double dinv =1./d; 15 | CPPL_INT inc =1; 16 | zdscal_(&vec.l, &dinv, vec.array, &inc); 17 | return vec; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhsmatrix-/_zhsmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +_zhsmatrix operator */ 3 | inline const _zhsmatrix& operator+(const _zhsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -_zhsmatrix operator */ 10 | inline _zhsmatrix operator-(const _zhsmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | const std::vector::iterator mat_data_end =mat.data.end(); 13 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 14 | it->v =-it->v; 15 | } 16 | 17 | return mat; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*comple operator */ 3 | inline _zrovector operator*(const _zrovector& vec, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | 10 | //============================================================================= 11 | /*! _zrovector/comple operator */ 12 | inline _zrovector operator/(const _zrovector& vec, const comple& d) 13 | {CPPL_VERBOSE_REPORT; 14 | comple dinv =1./d; 15 | CPPL_INT inc =1; 16 | zscal_(&vec.l, &dinv, vec.array, &inc); 17 | return vec; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*double operator */ 3 | inline _zrovector operator*(const _zrovector& vec, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT inc =1; 6 | zdscal_(&vec.l, &d, vec.array, &inc); 7 | return vec; 8 | } 9 | 10 | //============================================================================= 11 | /*! _zrovector/double operator */ 12 | inline _zrovector operator/(const _zrovector& vec, const double& d) 13 | {CPPL_VERBOSE_REPORT; 14 | double dinv =1./d; 15 | CPPL_INT inc =1; 16 | zdscal_(&vec.l, &dinv, vec.array, &inc); 17 | return vec; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*dcovector operator */ 3 | inline double operator*(const drovector& rovec, const dcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | double val =ddot_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 16 | 17 | return val; 18 | } 19 | -------------------------------------------------------------------------------- /test/INTERVAL/makefile: -------------------------------------------------------------------------------- 1 | PATH_MC = $(shell cd ../../ ; pwd) 2 | 3 | # Compilation options 4 | include $(PATH_MC)/src/makeoptions.mk 5 | 6 | ##### 7 | 8 | all: INT-1D INT-2D 9 | 10 | INT-1D : INT-1D.o 11 | $(LINK) $(FLAG_LINK) -o $@ $< $(LIB_MC) 12 | 13 | INT-2D : INT-2D.o 14 | $(LINK) $(FLAG_LINK) -o $@ $< $(LIB_MC) 15 | 16 | %.o: %.cpp 17 | $(CPP) -c $(FLAG_CPP) $(FLAG_MC) $(INC_MC) $< -o $@ 18 | 19 | ##### 20 | 21 | graph : gendot gensvg 22 | 23 | gendot : 24 | dot -Tsvg -O $(shell ls *.dot) 25 | 26 | gensvg : 27 | @for FILE in $(shell ls *.svg); do \ 28 | echo $$FILE; \ 29 | (display $$FILE &); \ 30 | done 31 | 32 | ##### 33 | 34 | clean : 35 | rm -f INT-1D INT-2D *.o *.out *.eps *.dot *.svg *~ 36 | 37 | -------------------------------------------------------------------------------- /doc/fig/CM-1D.g: -------------------------------------------------------------------------------- 1 | #set size ratio 0.7 2 | #set key outside rm t Left reverse spacing 2 3 | set key below 4 | 5 | set xlabel 'x' 6 | set xrange [-0.5:1] 7 | set ylabel 'f(x)' 8 | set yrange [-0.6:0.6] 9 | 10 | ### CHEBYSHEV MODEL 11 | 12 | plot 'CM-1D.out' u 1:2 tit 'function' w l lt 1 lc rgb 'red' lw 2, \ 13 | '' u 1:4 tit 'Chebyshev model' w l lt 3 lc rgb 'blue' lw 2, \ 14 | '' u 1:5 tit '' w l lt 3 lc rgb 'blue' lw 2, \ 15 | '' u 1:8 tit 'Chebyshev bounds' w l lt 1 lc rgb 'green' lw 2, \ 16 | '' u 1:9 tit '' w l lt 1 lc rgb 'green' lw 2 17 | 18 | pause -1 " TO CONTINUE" 19 | 20 | set terminal pngcairo size 350,262 enhanced font 'Verdana,10' 21 | set out 'CM-1D.png' 22 | rep 23 | set term wxt 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgsmatrix-/_dgsmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +_dgsmatrix operator */ 3 | inline const _dgsmatrix& operator+(const _dgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -_dgsmatrix operator */ 10 | inline _dgsmatrix operator-(const _dgsmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | const std::vector::iterator mat_data_end =mat.data.end(); 13 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 14 | it->v = -it->v; 15 | } 16 | 17 | return mat; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgsmatrix-/_zgsmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +_zgsmatrix operator */ 3 | inline const _zgsmatrix& operator+(const _zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -_zgsmatrix operator */ 10 | inline _zgsmatrix operator-(const _zgsmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | const std::vector::iterator mat_data_end =mat.data.end(); 13 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 14 | it->v = -it->v; 15 | } 16 | 17 | return mat; 18 | } 19 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*zcovector operator */ 3 | inline comple operator*(const zrovector& rovec, const zcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | 16 | comple val =zdotu_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 17 | 18 | return val; 19 | } 20 | -------------------------------------------------------------------------------- /test/RELAX/FFDAGEXT_2d.g: -------------------------------------------------------------------------------- 1 | resfile = 'FFDAG_2d.out' 2 | 3 | set xlabel "x_1" 4 | set ylabel "x_2" 5 | set zlabel "f" 6 | set key below 7 | unset hidden3d 8 | 9 | splot resfile u 1:2:3 tit 'function' w l lt 1 lc -1 lw 2, \ 10 | '' u 1:2:6 tit 'underestimator' w l lt 7 lc 4 lw 1, \ 11 | '' u 1:2:7 tit 'overestimator' w l lt 1 lc 7 lw 1 12 | # '' u 1:2:4 tit '' w l lt 3 lc 7 lw 3, \ 13 | # '' u 1:2:5 tit '' w l lt 3 lc 7 lw 3, \ 14 | 15 | pause -1 " TO CONTINUE" 16 | 17 | set term post eps enh solid color 15 18 | set out 'FFDAG_2d.eps' 19 | rep 20 | set term qt 21 | 22 | splot resfile u 1:2:($7-$3) tit 'gap' w l lt 1 lc 4 lw 1, \ 23 | '' u 1:2:($6-$3) tit '' w l lt 7 lc 7 lw 1 24 | 25 | pause -1 " TO CONTINUE" 26 | 27 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgrmatrix-/dgrmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +dgrmatrix operator */ 3 | inline const dgrmatrix& operator+(const dgrmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -dgrmatrix operator */ 10 | inline dgrmatrix operator-(const dgrmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | dgrmatrix newmat =mat; 13 | 14 | const std::vector::iterator newmat_a_end =newmat.a.end(); 15 | for(std::vector::iterator it=newmat.a.begin(); it!=newmat_a_end; it++){ 16 | (*it) =-(*it); 17 | } 18 | 19 | return newmat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*dcovector operator */ 3 | inline double operator*(const _drovector& rovec, const dcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | double val =ddot_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 16 | 17 | rovec.destroy(); 18 | return val; 19 | } 20 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*_dcovector operator */ 3 | inline double operator*(const drovector& rovec, const _dcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | double val =ddot_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 16 | 17 | covec.destroy(); 18 | return val; 19 | } 20 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*zcovector operator */ 3 | inline comple operator*(const _zrovector& rovec, const zcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | 16 | comple val =zdotu_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 17 | 18 | rovec.destroy(); 19 | return val; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*_zcovector operator */ 3 | inline comple operator*(const zrovector& rovec, const _zcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | 16 | comple val =zdotu_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 17 | 18 | covec.destroy(); 19 | return val; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgsmatrix-/dgsmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +dgsmatrix operator */ 3 | inline const dgsmatrix& operator+(const dgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -dgsmatrix operator */ 10 | inline _dgsmatrix operator-(const dgsmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | dgsmatrix newmat(mat); 13 | 14 | const std::vector::iterator newmat_data_end =newmat.data.end(); 15 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 16 | it->v =-it->v; 17 | } 18 | 19 | return _(newmat); 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dssmatrix-/dssmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +dssmatrix operator */ 3 | inline const dssmatrix& operator+(const dssmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -dssmatrix operator */ 10 | inline _dssmatrix operator-(const dssmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | dssmatrix newmat(mat); 13 | 14 | const std::vector::iterator newmat_data_end =newmat.data.end(); 15 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 16 | it->v =-it->v; 17 | } 18 | 19 | return _(newmat); 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgsmatrix-/zgsmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +zgsmatrix operator */ 3 | inline const zgsmatrix& operator+(const zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -zgsmatrix operator */ 10 | inline _zgsmatrix operator-(const zgsmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | zgsmatrix newmat(mat); 13 | 14 | const std::vector::iterator newmat_data_end =newmat.data.end(); 15 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 16 | it->v =-it->v; 17 | } 18 | 19 | return _(newmat); 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhsmatrix-/zhsmatrix-unary.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! +zhsmatrix operator */ 3 | inline const zhsmatrix& operator+(const zhsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | return mat; 6 | } 7 | 8 | //============================================================================= 9 | /*! -zhsmatrix operator */ 10 | inline _zhsmatrix operator-(const zhsmatrix& mat) 11 | {CPPL_VERBOSE_REPORT; 12 | zhsmatrix newmat(mat); 13 | 14 | const std::vector::iterator newmat_data_end =newmat.data.end(); 15 | for(std::vector::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){ 16 | it->v =-it->v; 17 | } 18 | 19 | return _(newmat); 20 | } 21 | -------------------------------------------------------------------------------- /test/ML/makefile: -------------------------------------------------------------------------------- 1 | PATH_MC = $(shell cd ../../ ; pwd) 2 | 3 | # Compilation options 4 | include $(PATH_MC)/src/makeoptions.mk 5 | 6 | ##### 7 | 8 | test_MLP : test_MLP.o 9 | $(LINK) $(FLAG_LINK) -o $@ $< $(LIB_MC) 10 | 11 | test_MLPREG : test_MLPREG.o 12 | $(LINK) $(FLAG_LINK) -o $@ $< $(LIB_MC) 13 | 14 | %.o: %.cpp 15 | $(CPP) -c $(FLAG_CPP) $(FLAG_MC) $(INC_MC) $< -o $@ 16 | 17 | ##### 18 | 19 | graph : gendot gensvg 20 | 21 | gendot : 22 | dot -Tpng -O $(shell ls *.dot) 23 | 24 | gensvg : 25 | @for FILE in $(shell ls *.png); do \ 26 | echo $$FILE; \ 27 | convert -resize 70% $$FILE $$FILE; \ 28 | (display $$FILE &); \ 29 | done 30 | 31 | ##### 32 | 33 | clean : 34 | rm -f test_MLP test_MLPREG 35 | -(rm -f *.o *.out *.eps *.dot *.png *.lp *~) 36 | 37 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*_dcovector operator */ 3 | inline double operator*(const _drovector& rovec, const _dcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | double val =ddot_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 16 | 17 | rovec.destroy(); 18 | covec.destroy(); 19 | return val; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgematrix-/_dgematrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgematrix*double operator */ 3 | inline _dgematrix operator*(const _dgematrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT mn =mat.m*mat.n; 6 | CPPL_INT inc =1; 7 | dscal_(&mn, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _dgematrix/double operator */ 13 | inline _dgematrix operator/(const _dgematrix& mat, const double& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT mn =mat.m*mat.n; 16 | double dinv =1./d; 17 | CPPL_INT inc =1; 18 | dscal_(&mn, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgematrix*comple operator */ 3 | inline _zgematrix operator*(const _zgematrix& mat, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.m*mat.n; 6 | CPPL_INT inc =1; 7 | zscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _zgematrix/comple operator */ 13 | inline _zgematrix operator/(const _zgematrix& mat, const comple& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT size =mat.m*mat.n; 16 | comple dinv =1./d; 17 | CPPL_INT inc =1; 18 | zscal_(&size, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*_zcovector operator */ 3 | inline comple operator*(const _zrovector& rovec, const _zcovector& covec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(rovec.l!=covec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These two vectors can not make a product." << std::endl 9 | << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | CPPL_INT inc =1; 15 | 16 | comple val =zdotu_( &rovec.l, rovec.array, &inc, covec.array, &inc ); 17 | 18 | rovec.destroy(); 19 | covec.destroy(); 20 | return val; 21 | } 22 | -------------------------------------------------------------------------------- /src/pymc/pymc.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace py = pybind11; 4 | 5 | void mc_mcfunc ( py::module_ & ); 6 | void mc_interval ( py::module_ & ); 7 | void mc_mccormick ( py::module_ & ); 8 | void mc_supmodel ( py::module_ & ); 9 | void mc_ffunc ( py::module_ & ); 10 | void mc_fflin ( py::module_ & ); 11 | void mc_ffvect ( py::module_ & ); 12 | void mc_ffcustom ( py::module_ & ); 13 | 14 | PYBIND11_MODULE( pymc, m ) 15 | { 16 | 17 | m.doc() = "Python interface of library MC++"; 18 | 19 | mc_mcfunc ( m ); 20 | mc_interval ( m ); 21 | mc_mccormick ( m ); 22 | mc_supmodel ( m ); 23 | mc_ffunc ( m ); 24 | mc_fflin ( m ); 25 | mc_ffvect ( m ); 26 | mc_ffcustom ( m ); 27 | 28 | m.attr("__version__") = "4"; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgematrix*double operator */ 3 | inline _zgematrix operator*(const _zgematrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.m*mat.n; 6 | CPPL_INT inc =1; 7 | zdscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _zgematrix/double operator */ 13 | inline _zgematrix operator/(const _zgematrix& mat, const double& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT size =mat.m*mat.n; 16 | double dinv =1./d; 17 | CPPL_INT inc =1; 18 | zdscal_(&size, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zhematrix*double operator */ 3 | inline _zhematrix operator*(const _zhematrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =mat.n*mat.n; 6 | CPPL_INT inc =1; 7 | zdscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _zhematrix/double operator */ 13 | inline _zhematrix operator/(const _zhematrix& mat, const double& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT size =mat.n*mat.n; 16 | double dinv =1./d; 17 | CPPL_INT inc =1; 18 | zdscal_(&size, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/zhematrix/zhematrix-lapack/main.cpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | #include 3 | #include 4 | #include 5 | #include "cpplapack.h" 6 | using namespace std; 7 | 8 | #include "zhesv_check.hpp" 9 | #include "zheev_check.hpp" 10 | //#include "zhegv_check.hpp" 11 | 12 | //============================================================================= 13 | /*! main */ 14 | int main(int argc, char** argv) 15 | { 16 | zhesv_check_vector(); 17 | zhesv_check_matrix(); 18 | 19 | zheev_check_value(); 20 | zheev_check_right(); 21 | zheev_check_left(); 22 | 23 | //zhegv_check_value(); 24 | //zhegv_check_right(); 25 | //zhegv_check_left(); 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /src/pymc/ffcustom.py: -------------------------------------------------------------------------------- 1 | import pymc 2 | 3 | G = pymc.FFGraph() 4 | X = G.add_vars( 2 ) 5 | 6 | def prod( x ): 7 | return [ x[0]*x[1] ] 8 | 9 | def dprod( x ): 10 | return [ x[1], x[0] ] 11 | 12 | OpDY = pymc.FFCustom() 13 | OpDY.set_D_eval( dprod ) 14 | 15 | OpY = pymc.FFCustom() 16 | OpY.set_D_eval( prod ) 17 | OpY.set_I_eval( prod ) 18 | OpY.set_deriv( OpDY, 0 ) 19 | 20 | Y = OpY( X, 1 ) 21 | print( Y, " = ", Y.str() ) 22 | 23 | print( G ) 24 | 25 | [DY] = G.eval( [Y], X, [2,3] ) 26 | print( "DY = ", DY ) 27 | 28 | [IY] = G.eval( [Y], X, [pymc.Interval(1,3), pymc.Interval(2,4)] ) 29 | print( "IY = ", IY ) 30 | 31 | dYdX = G.fdiff( [Y], X ) 32 | [ print( dYdXi, " = ", dYdXi.str() ) for dYdXi in dYdX[2] ] 33 | 34 | dDYdX = G.eval( dYdX[2], X, [2,3] ) 35 | print( dDYdX ) 36 | 37 | print( G ) 38 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/test/STDReportLog.h: -------------------------------------------------------------------------------- 1 | #ifndef STD_REPORT_LOG_H 2 | #define STD_REPORT_LOG_H 3 | 4 | #include 5 | #include "IReportLogger.h" 6 | 7 | class STDReportLog : public IReportLog 8 | { 9 | std::ostream& m_os; 10 | long m_failed; 11 | long m_succeeded; 12 | void operator=(const STDReportLog&) {/*not allowed*/} 13 | public: 14 | STDReportLog(std::ostream& os):m_os(os),m_failed(0),m_succeeded(0){} 15 | ~STDReportLog() 16 | { 17 | m_os << "Total failed :" << m_failed << std::endl; 18 | m_os << "Total succeeded :" << m_succeeded << std::endl; 19 | m_os.flush(); 20 | } 21 | std::ostream& failed(){m_failed++;m_os<<"FAILED: ";return m_os;} 22 | std::ostream& succeeded(){m_succeeded++;m_os<<"SUCCEEDED: ";return m_os;} 23 | }; 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgbmatrix-/_dgbmatrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgbmatrix*double operator */ 3 | inline _dgbmatrix operator*(const _dgbmatrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =(mat.kl+mat.ku+1)*mat.n; 6 | CPPL_INT inc =1; 7 | dscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _dgbmatrix/double operator */ 13 | inline _dgbmatrix operator/(const _dgbmatrix& mat, const double& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT size =(mat.kl+mat.ku+1)*mat.n; 16 | double dinv =1./d; 17 | CPPL_INT inc =1; 18 | dscal_(&size, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgbmatrix-/_zgbmatrix-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgbmatrix*comple operator */ 3 | inline _zgbmatrix operator*(const _zgbmatrix& mat, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =(mat.kl+mat.ku+1)*mat.n; 6 | CPPL_INT inc =1; 7 | zscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _zgbmatrix/comple operator */ 13 | inline _zgbmatrix operator/(const _zgbmatrix& mat, const comple& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT size =(mat.kl+mat.ku+1)*mat.n; 16 | comple dinv =1./d; 17 | CPPL_INT inc =1; 18 | zscal_(&size, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgbmatrix-/_zgbmatrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgbmatrix*double operator */ 3 | inline _zgbmatrix operator*(const _zgbmatrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | CPPL_INT size =(mat.kl+mat.ku+1)*mat.n; 6 | CPPL_INT inc =1; 7 | zdscal_(&size, &d, mat.array, &inc); 8 | return mat; 9 | } 10 | 11 | //============================================================================= 12 | /*! _zgbmatrix/double operator */ 13 | inline _zgbmatrix operator/(const _zgbmatrix& mat, const double& d) 14 | {CPPL_VERBOSE_REPORT; 15 | CPPL_INT size =(mat.kl+mat.ku+1)*mat.n; 16 | double dinv =1./d; 17 | CPPL_INT inc =1; 18 | zdscal_(&size, &dinv, mat.array, &inc); 19 | return mat; 20 | } 21 | -------------------------------------------------------------------------------- /src/mc/mctime.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2009 Benoit Chachuat, Imperial College London. 2 | // All Rights Reserved. 3 | // This code is published under the Eclipse Public License. 4 | 5 | #ifndef MC__MCTIME_HPP 6 | #define MC__MCTIME_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace mc 13 | { 14 | 15 | inline double 16 | cpuclock() 17 | { 18 | // Return current time [seconds] 19 | struct rusage ruse; 20 | getrusage (RUSAGE_SELF, &ruse); 21 | return ((double)(ruse.ru_utime.tv_sec + ruse.ru_utime.tv_usec / 1e6)); 22 | } 23 | 24 | inline double 25 | userclock() 26 | { 27 | // Return current time [seconds] 28 | timeval time; 29 | gettimeofday(&time, 0) ; 30 | return time.tv_sec + time.tv_usec*1e-6; 31 | } 32 | 33 | } // namespace mc 34 | #endif 35 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-calc.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! return transposed _zhematrix */ 3 | inline _zhematrix t(const _zhematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | WARNING_REPORT; 7 | std::cerr << "This function call has no effect since the matrix is symmetric." << std::endl; 8 | #endif//CPPL_DEBUG 9 | 10 | return mat; 11 | } 12 | 13 | //============================================================================= 14 | /*! return its inverse matrix */ 15 | inline _zgematrix i(const _zhematrix& mat) 16 | {CPPL_VERBOSE_REPORT; 17 | zhematrix mat_cp(mat); 18 | zgematrix mat_inv(mat_cp.n,mat_cp.n); 19 | mat_inv.identity(); 20 | mat_cp.zhesv(mat_inv); 21 | 22 | return _(mat_inv); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dsymatrix-/_dsymatrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dsymatrix*double operator */ 3 | inline _dsymatrix operator*(const _dsymatrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | for(CPPL_INT j=0; j TO CONTINUE" 16 | 17 | splot resfile u 1:2:3 tit 'lambda min' w l lt 1 lc 1, \ 18 | '' u 1:2:4 tit 'lambda max' w l lt 1 lc 2, \ 19 | '' u 1:2:5 tit 'spectral bound' w l lt 1 lc 3, \ 20 | '' u 1:2:6 tit '' w l lt 1 lc 3, \ 21 | '' u 1:2:7 tit 'Gershgorin' w l lt 1 lc 4, \ 22 | '' u 1:2:8 tit '' w l lt 1 lc 4, \ 23 | '' u 1:2:9 tit 'Hertz & Rohn' w l lt 1 lc 5, \ 24 | '' u 1:2:10 tit '' w l lt 1 lc 5 25 | 26 | pause -1 " TO CONTINUE" 27 | 28 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/dsymatrix/dsymatrix-lapack/main.cpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | #include 3 | #include 4 | #include 5 | #include "cpplapack.h" 6 | using namespace std; 7 | 8 | #include "dsysv_check.hpp" 9 | #include "dsyev_check.hpp" 10 | #include "dsygv_check.hpp" 11 | 12 | //============================================================================= 13 | /*! main */ 14 | int main(int argc, char** argv) 15 | { 16 | //////// dsysv //////// 17 | dsysv_check_vector(); 18 | dsysv_check_matrix(); 19 | 20 | //////// dsyev //////// 21 | dsyev_check_value(); 22 | dsyev_check_right(); 23 | dsyev_check_left(); 24 | 25 | //////// dsygv //////// 26 | dsygv_check_value(); 27 | dsygv_check_both(); 28 | 29 | return 0; 30 | } 31 | -------------------------------------------------------------------------------- /doc/fig/McCormick_relax.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,12pt]{article} 2 | 3 | \usepackage{amsmath,amssymb,amsfonts,euscript,mathrsfs,wasysym,textcomp,pifont} 4 | \usepackage{psfrag} 5 | \usepackage[dvips]{graphicx} 6 | \usepackage[usenames]{color} 7 | \usepackage{fullpage} 8 | 9 | \pagestyle{empty} 10 | 11 | \begin{document} 12 | 13 | \psfrag{pL}[tc][tc][1.]{$x^{\rm L}$} 14 | \psfrag{pU}[tc][tc][1.]{$x^{\rm U}$} 15 | \psfrag{p}[Bc][Bc][1.]{$x$} 16 | \psfrag{f}[Bl][Bl][1.]{$\color{red}f$} 17 | \psfrag{fcv}[Bl][Bl][1.]{$\color{blue}f^{\rm cv}$} 18 | \psfrag{fcc}[Bl][Bl][1.]{$\color{blue}f^{\rm cc}$} 19 | \psfrag{fL}[Bl][Bl][1.]{$\color{green}f^{\rm U}$} 20 | \psfrag{fU}[Bl][Bl][1.]{$\color{green}f^{\rm L}$} 21 | \psfrag{[fcv(p),fcc(p)]}[Bl][Bl][1.]{$\color{blue}[f^{\rm cv}(x),f^{\rm cc}(x)]$} 22 | \includegraphics[width=.45\textwidth]{McCormickrelax.eps} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /doc/fig/Taylor_model.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,12pt]{article} 2 | 3 | \usepackage{amsmath,amssymb,amsfonts,euscript,mathrsfs,wasysym,textcomp,pifont} 4 | \usepackage{psfrag} 5 | \usepackage[dvips]{graphicx} 6 | \usepackage[usenames]{color} 7 | \usepackage{fullpage} 8 | 9 | \pagestyle{empty} 10 | 11 | \begin{document} 12 | 13 | \psfrag{pL}[tc][tc][1.]{$x^{\rm L}$} 14 | \psfrag{pU}[tc][tc][1.]{$x^{\rm U}$} 15 | \psfrag{p}[Bc][Bc][1.]{$x$} 16 | \psfrag{pref}[Bc][Bc][1.]{$\color{red}\hat{x}$} 17 | \psfrag{f}[Bl][Bl][1.]{$\color{red}f$} 18 | \psfrag{pf}[tc][tc][1.]{$\mathcal P$} 19 | \psfrag{pf(p)+R}[tc][tc][1.]{$\color{blue}\mathcal P(x-\hat x)\oplus\mathcal R$} 20 | \psfrag{pf+rU}[bl][bl][1.]{$\color{blue}\mathcal P+r^{\rm U}$} 21 | \psfrag{pf+rL}[bl][bl][1.]{$\color{blue}\mathcal P+r^{\rm L}$} 22 | \includegraphics[width=.45\textwidth]{Taylormodel.eps} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*dsymatrix operator */ 3 | inline _drovector operator*(const drovector& vec, const dsymatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dsymatrix-/dsymatrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dsymatrix*dcovector operator */ 3 | inline _dcovector operator*(const dsymatrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgematrix-/dgematrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dgematrix*dcovector operator */ 3 | inline _dcovector operator*(const dgematrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*dgematrix operator */ 3 | inline _drovector operator*(const drovector& vec, const dgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*dsymatrix operator */ 3 | inline _drovector operator*(const _drovector& vec, const dsymatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dsymatrix-/_dsymatrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dsymatrix*dcovector operator */ 3 | inline _dcovector operator*(const _dsymatrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-_dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*_dsymatrix operator */ 3 | inline _drovector operator*(const drovector& vec, const _dsymatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dsymatrix-/dsymatrix-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dsymatrix*_dcovector operator */ 3 | inline _dcovector operator*(const dsymatrix& mat, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhematrix-/zhematrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zhematrix*zcovector operator */ 3 | inline _zcovector operator*(const zhematrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.n); 15 | char uplo ='l'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*zhematrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const zhematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char uplo ='l'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /test/SUPRELAX/SM-2D.gpt: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set ylabel 'y' 3 | set hidden3d 4 | set view 65,330 5 | 6 | file = "SM-2D.out" 7 | 8 | splot file u 1:2:3 tit 'function' w l lt 1 lc 8, \ 9 | file u 1:2:4 tit 'lower bound' w l lt 1 lc 4, \ 10 | file u 1:2:5 tit 'upper bound' w l lt 1 lc 7 11 | 12 | pause -1 " TO CONTINUE" 13 | 14 | splot file u 1:2:3 tit 'function' w l lt 1 lc 8, \ 15 | file u 1:2:6 tit 'superposition underst.' w l lt 1 lc 4, \ 16 | file u 1:2:7 tit 'superposition overest.' w l lt 1 lc 7 17 | 18 | pause -1 " TO CONTINUE" 19 | 20 | set term post eps enh solid color 15 21 | set out "SM-2D.eps" 22 | rep 23 | set term qt 24 | 25 | splot file u 1:2:($3-$6) tit 'underestimation error' w l lt 1 lc 4 26 | 27 | pause -1 " TO CONTINUE" 28 | 29 | splot file u 1:2:($7-$3) tit 'overestimation error' w l lt 1 lc 7 30 | 31 | pause -1 " TO CONTINUE" 32 | 33 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgematrix-/_dgematrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgematrix*dcovector operator */ 3 | inline _dcovector operator*(const _dgematrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*dgematrix operator */ 3 | inline _drovector operator*(const _drovector& vec, const dgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgematrix-/dgematrix-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dgematrix*_dcovector operator */ 3 | inline _dcovector operator*(const dgematrix& mat, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-_dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*_dgematrix operator */ 3 | inline _drovector operator*(const drovector& vec, const _dgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgematrix-/zgematrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zgematrix*zcovector operator */ 3 | inline _zcovector operator*(const zgematrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | char trans ='n'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*zgematrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const zgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char trans ='T'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/fadbad++/examples/ExampleBAD.cpp: -------------------------------------------------------------------------------- 1 | #include "badiff.h" 2 | #include 3 | using namespace std; 4 | using namespace fadbad; 5 | 6 | B func(const B& x, const B& y) 7 | { 8 | B z=sqrt(x); 9 | return y*z+sin(z); 10 | } 11 | 12 | int main() 13 | { 14 | B x,y,f; // Declare variables x,y,f 15 | x=1; // Initialize variable x 16 | y=2; // Initialize variable y 17 | f=func(x,y); // Evaluate function and record DAG 18 | f.diff(0,1); // Differentiate f (index 0 of 1) 19 | double fval=f.x(); // Value of function 20 | double dfdx=x.d(0); // Value of df/dx (index 0 of 1) 21 | double dfdy=y.d(0); // Value of df/dy (index 0 of 1) 22 | 23 | cout << "f(x,y)=" << fval << endl; 24 | cout << "df/dx(x,y)=" << dfdx << endl; 25 | cout << "df/dy(x,y)=" << dfdy << endl; 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zhematrix*comple operator */ 3 | inline _zgematrix operator*(const _zhematrix& mat, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | zgematrix newmat =mat.to_zgematrix(); 6 | 7 | CPPL_INT size =mat.n*mat.n; 8 | CPPL_INT inc =1; 9 | zscal_(&size, &d, newmat.array, &inc); 10 | 11 | return _(newmat); 12 | } 13 | 14 | //============================================================================= 15 | /*! zhematrix/comple operator */ 16 | inline _zgematrix operator/(const _zhematrix& mat, const comple& d) 17 | {CPPL_VERBOSE_REPORT; 18 | zgematrix newmat =mat.to_zgematrix(); 19 | 20 | CPPL_INT size =mat.n*mat.n; 21 | comple dinv =1./d; 22 | CPPL_INT inc =1; 23 | zscal_(&size, &dinv, newmat.array, &inc); 24 | 25 | return _(newmat); 26 | } 27 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-_dsymatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*_dsymatrix operator */ 3 | inline _drovector operator*(const _drovector& vec, const _dsymatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | mat.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dsymatrix-/_dsymatrix-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dsymatrix*_dcovector operator */ 3 | inline _dcovector operator*(const _dsymatrix& mat, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.n); 15 | char uplo ='l'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dsymv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | vec.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zhematrix*zcovector operator */ 3 | inline _zcovector operator*(const _zhematrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.n); 15 | char uplo ='l'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*zhematrix operator */ 3 | inline _zrovector operator*(const _zrovector& vec, const zhematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char uplo ='l'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhematrix-/zhematrix-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zhematrix*_zcovector operator */ 3 | inline _zcovector operator*(const zhematrix& mat, const _zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.n); 15 | char uplo ='l'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-_zhematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*_zhematrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const _zhematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.n){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char uplo ='l'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/test/quaternion/main.cpp: -------------------------------------------------------------------------------- 1 | #include "cpplapack.h" 2 | 3 | //============================================================================= 4 | /*! main */ 5 | int main(int argc, char** argv) 6 | { 7 | CPPL::dquater q( vt2q(CPPL::dcovec3(1,1,1),M_PI/3.) ); 8 | std::cout << t(q) << std::endl; 9 | std::cout << t(q*inv(q)) << std::endl; 10 | 11 | std::cout << q2m(q) << std::endl; 12 | 13 | //// dcovec3 //// 14 | std::cout << t(rotate(CPPL::dcovec3(1,0,0),q)) << std::flush; 15 | std::cout << t(rotate(CPPL::dcovec3(0,1,0),q)) << std::flush; 16 | std::cout << t(rotate(CPPL::dcovec3(0,0,1),q)) << std::flush; 17 | 18 | //// dgemat3 //// 19 | CPPL::dgemat3 gm; 20 | gm.identity(); 21 | std::cout << rotate(gm,q) << std::endl; 22 | 23 | //// dsymat3 //// 24 | CPPL::dsymat3 sm; 25 | sm.identity(); 26 | std::cout << rotate(sm,q) << std::endl; 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/contrib/GMRES/A8.dge: -------------------------------------------------------------------------------- 1 | dgematrix 8 8 2 | 5.000000e-01 -1.148386e-01 -1.148386e-01 -2.703227e-01 1.915613e-01 7.688979e-02 7.688979e-02 1.616523e-01 3 | -1.148386e-01 5.000000e-01 -1.148386e-01 -2.703227e-01 7.688979e-02 1.915613e-01 7.688979e-02 1.616523e-01 4 | -1.148386e-01 -1.148386e-01 5.000000e-01 -2.703227e-01 7.688979e-02 7.688979e-02 1.915613e-01 1.616523e-01 5 | -1.666667e-01 -1.666667e-01 -1.666667e-01 5.000000e-01 8.958975e-02 8.958975e-02 8.958975e-02 2.567070e-01 6 | 1.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 7 | 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 8 | 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00 0.000000e+00 9 | 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00 10 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgsmatrix-/dgsmatrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dgsmatrix*dcovector operator */ 3 | inline _dcovector operator*(const dgsmatrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v*vec(it->j); 20 | } 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*dgsmatrix operator */ 3 | inline _drovector operator*(const drovector& vec, const dgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->j) += vec(it->i)*it->v; 20 | } 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgsmatrix-/zgsmatrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zgsmatrix*zcovector operator */ 3 | inline _zcovector operator*(const zgsmatrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v*vec(it->j); 20 | } 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-_zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*_zgematrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const _zgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char trans ='T'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*zgsmatrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->j) += vec(it->i)*it->v; 20 | } 21 | 22 | return _(newvec); 23 | } 24 | -------------------------------------------------------------------------------- /doc/fig/Chebyshev_model.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,12pt]{article} 2 | 3 | \usepackage{amsmath,amssymb,amsfonts,euscript,mathrsfs,wasysym,textcomp,pifont} 4 | \usepackage{psfrag} 5 | \usepackage[dvips]{graphicx} 6 | \usepackage[usenames]{color} 7 | \usepackage{fullpage} 8 | 9 | \pagestyle{empty} 10 | 11 | \begin{document} 12 | 13 | \psfrag{pL}[tc][tc][1.]{$x^{\rm L}$} 14 | \psfrag{pU}[tc][tc][1.]{$x^{\rm U}$} 15 | \psfrag{p}[Bc][Bc][1.]{$x$} 16 | \psfrag{prefi}[Bc][Bc][1.]{$\color{red}\hat{x}_i$} 17 | \psfrag{prefj}[Bc][Bc][1.]{$\color{red}\hat{x}_j$} 18 | \psfrag{f}[Bl][Bl][1.]{$\color{red}f$} 19 | \psfrag{pf}[tc][tc][1.]{$\mathcal P$} 20 | \psfrag{pf(p)+R}[tc][tc][1.]{$\color{blue}\mathcal P(\hat x_j)\oplus\mathcal R$} 21 | \psfrag{pf+rU}[bl][bl][1.]{$\color{blue}\mathcal P+r^{\rm U}$} 22 | \psfrag{pf+rL}[bl][bl][1.]{$\color{blue}\mathcal P+r^{\rm L}$} 23 | \includegraphics[width=.45\textwidth]{Chebyshevmodel.eps} 24 | 25 | \end{document} 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgematrix-/_dgematrix-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgematrix*_dcovector operator */ 3 | inline _dcovector operator*(const _dgematrix& mat, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | vec.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-_dgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*_dgematrix operator */ 3 | inline _drovector operator*(const _drovector& vec, const _dgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT inc =1; 18 | double beta =0.; 19 | 20 | dgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | mat.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgematrix*zcovector operator */ 3 | inline _zcovector operator*(const _zgematrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | char trans ='n'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-zgematrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*zgematrix operator */ 3 | inline _zrovector operator*(const _zrovector& vec, const zgematrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char trans ='T'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgematrix-/zgematrix-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zgematrix*_zcovector operator */ 3 | inline _zcovector operator*(const zgematrix& mat, const _zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | char trans ='n'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /doc/fig/SB-2D.g: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set xrange [-0.5:0.5] 3 | set ylabel 'y' 4 | set yrange [-0.5:0.5] 5 | set key below 6 | set hidden3d 7 | set view 65,30 8 | 9 | splot 'SB-2D.out' u 1:2:3 tit 'lambda min' w l lt 1 lc 1, \ 10 | '' u 1:2:4 tit 'lambda max' w l lt 1 lc 2, \ 11 | '' u 1:2:5 tit 'spectral bounds' w l lt 1 lc 3, \ 12 | '' u 1:2:6 tit '' w l lt 1 lc 3 13 | 14 | pause -1 " TO CONTINUE" 15 | 16 | set terminal pngcairo size 490,367 enhanced font 'Verdana,9' 17 | set out "SB-2D_spectral.png" 18 | rep 19 | set term qt 20 | 21 | set isosample 40,40 22 | #set palette cubehelix 23 | #set pm3d interpolate 2,2 24 | #unset colorbox 25 | #unset key 26 | 27 | set view 66, 241 28 | 29 | splot 1.+x-sin(2.*x+3.*y)-cos(3.*x-5.*y) tit 'function' w l lt 1 lc 7 30 | 31 | pause -1 " TO CONTINUE" 32 | 33 | set terminal pngcairo size 490,367 enhanced font 'Verdana,9' 34 | set out "SB-2D_function.png" 35 | rep 36 | set term qt 37 | 38 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgbmatrix-/dgbmatrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dgbmatrix*dcovector operator */ 3 | inline _dcovector operator*(const dgbmatrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | double beta =0.; 20 | 21 | dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*dgbmatrix operator */ 3 | inline _drovector operator*(const drovector& vec, const dgbmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | double beta =0.; 20 | 21 | dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /test/MCCORMICK/MC-1D.g: -------------------------------------------------------------------------------- 1 | set xlabel 'x' 2 | set key below 3 | 4 | plot 'MC-1D.out' u 1:2 tit 'function' w l lt 1 5 | 6 | pause -1 " TO CONTINUE" 7 | 8 | plot 'MC-1D.out' u 1:2 tit 'function' w l lt 1, \ 9 | '' u 1:3 tit 'bounds' w l lt 2, \ 10 | '' u 1:4 tit '' w l lt 2, \ 11 | '' u 1:5 tit 'relaxations' w l lt 3, \ 12 | '' u 1:6 tit '' w l lt 3 13 | 14 | set term post eps enh solid color 18 15 | set out 'MC-1D.eps' 16 | rep 17 | set term pop 18 | set out 19 | 20 | pause -1 " TO CONTINUE" 21 | 22 | plot 'MC-1D.out' u 1:2 tit 'function' w l lt 1, \ 23 | '' u 1:5 tit 'relaxations' w l lt 3, \ 24 | '' u 1:6 tit '' w l lt 3, \ 25 | '' u 1:9 tit 'linearizations' w l lt -1, \ 26 | '' u 1:10 tit '' w l lt -1 27 | 28 | pause -1 " TO CONTINUE" 29 | 30 | plot 'MC-1D.out' u 1:7 tit 'subgrad. for underest.' w l lt 1, \ 31 | '' u 1:8 tit 'subgrad. for overest.' w l lt 3 32 | 33 | pause -1 " TO CONTINUE" 34 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dsymatrix-/_dsymatrix-misc.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! nullify all the matrix data */ 3 | inline void _dsymatrix::nullify() const 4 | {CPPL_VERBOSE_REPORT; 5 | n=0; 6 | array=NULL; 7 | darray=NULL; 8 | } 9 | 10 | //============================================================================= 11 | /*! destroy all the matrix data */ 12 | inline void _dsymatrix::destroy() const 13 | {CPPL_VERBOSE_REPORT; 14 | delete [] array; 15 | delete [] darray; 16 | array=NULL; 17 | darray=NULL; 18 | } 19 | 20 | //============================================================================= 21 | /*! complete the upper-right components */ 22 | inline void _dsymatrix::complete() const 23 | {CPPL_VERBOSE_REPORT; 24 | for(CPPL_INT i=0; i::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->j) += vec(it->i)*it->v; 20 | } 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgsmatrix-/zgsmatrix-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zgsmatrix*_zcovector operator */ 3 | inline _zcovector operator*(const zgsmatrix& mat, const _zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v*vec(it->j); 20 | } 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-_zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*_zgsmatrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const _zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->j) += vec(it->i)*it->v; 20 | } 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgsmatrix-/_dgsmatrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgsmatrix*dcovector operator */ 3 | inline _dcovector operator*(const _dgsmatrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v*vec(it->j); 20 | } 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgsmatrix-/_dgsmatrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgsmatrix*double operator */ 3 | inline _dgsmatrix operator*(const _dgsmatrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *= d; 8 | } 9 | 10 | return mat; 11 | } 12 | 13 | //============================================================================= 14 | /*! _dgsmatrix/double operator */ 15 | inline _dgsmatrix operator/(const _dgsmatrix& mat, const double& d) 16 | {CPPL_VERBOSE_REPORT; 17 | const std::vector::iterator mat_data_end =mat.data.end(); 18 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | it->v /= d; 20 | } 21 | 22 | return mat; 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-dgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*dgsmatrix operator */ 3 | inline _drovector operator*(const _drovector& vec, const dgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->j) += vec(it->i)*it->v; 20 | } 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dssmatrix-/_dssmatrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dssmatrix*double operator */ 3 | inline _dssmatrix operator*(const _dssmatrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *=d; 8 | } 9 | 10 | return mat; 11 | } 12 | 13 | //============================================================================= 14 | /*! _dssmatrix/double operator */ 15 | inline _dssmatrix operator/(const _dssmatrix& mat, const double& d) 16 | {CPPL_VERBOSE_REPORT; 17 | const std::vector::iterator mat_data_end =mat.data.end(); 18 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | it->v /=d; 20 | } 21 | 22 | return mat; 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgematrix-/_zgematrix-_zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgematrix*_zcovector operator */ 3 | inline _zcovector operator*(const _zgematrix& mat, const _zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | char trans ='n'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT inc =1; 18 | comple beta =comple(0.,0.); 19 | 20 | zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc ); 21 | 22 | mat.destroy(); 23 | vec.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgsmatrix-/_zgsmatrix-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgsmatrix*comple operator */ 3 | inline _zgsmatrix operator*(const _zgsmatrix& mat, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *=d; 8 | } 9 | 10 | return mat; 11 | } 12 | 13 | //============================================================================= 14 | /*! _zgsmatrix/comple operator */ 15 | inline _zgsmatrix operator/(const _zgsmatrix& mat, const comple& d) 16 | {CPPL_VERBOSE_REPORT; 17 | const std::vector::iterator mat_data_end =mat.data.end(); 18 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | it->v /=d; 20 | } 21 | 22 | return mat; 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgsmatrix-/_zgsmatrix-double.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgsmatrix*double operator */ 3 | inline _zgsmatrix operator*(const _zgsmatrix& mat, const double& d) 4 | {CPPL_VERBOSE_REPORT; 5 | const std::vector::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *=d; 8 | } 9 | 10 | return mat; 11 | } 12 | 13 | //============================================================================= 14 | /*! _zgsmatrix/double operator */ 15 | inline _zgsmatrix operator/(const _zgsmatrix& mat, const double& d) 16 | {CPPL_VERBOSE_REPORT; 17 | const std::vector::iterator mat_data_end =mat.data.end(); 18 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | it->v /=d; 20 | } 21 | 22 | return mat; 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zgsmatrix-/_zgsmatrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zgsmatrix*zcovector operator */ 3 | inline _zcovector operator*(const _zgsmatrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v*vec(it->j); 20 | } 21 | 22 | mat.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zhematrix-/_zhematrix-misc.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! nullify all the matrix data */ 3 | inline void _zhematrix::nullify() const 4 | {CPPL_VERBOSE_REPORT; 5 | n=0; 6 | array=NULL; 7 | darray=NULL; 8 | } 9 | 10 | //============================================================================= 11 | /*! destroy all the matrix data */ 12 | inline void _zhematrix::destroy() const 13 | {CPPL_VERBOSE_REPORT; 14 | delete [] array; 15 | delete [] darray; 16 | array=NULL; 17 | darray=NULL; 18 | } 19 | 20 | //============================================================================= 21 | /*! complete the upper-right components */ 22 | inline void _zhematrix::complete() const 23 | {CPPL_VERBOSE_REPORT; 24 | for(CPPL_INT i=0; i::iterator mat_data_end =mat.data.end(); 6 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 7 | it->v *=d; 8 | } 9 | 10 | return mat; 11 | } 12 | 13 | //============================================================================= 14 | /*! _zhsmatrix/double operator */ 15 | inline _zhsmatrix operator/(const _zhsmatrix& mat, const double& d) 16 | {CPPL_VERBOSE_REPORT; 17 | const std::vector::iterator mat_data_end =mat.data.end(); 18 | for(std::vector::iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | it->v /=d; 20 | } 21 | 22 | return mat; 23 | } 24 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_zrovector-/_zrovector-zgsmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _zrovector*zgsmatrix operator */ 3 | inline _zrovector operator*(const _zrovector& vec, const zgsmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->j) += vec(it->i)*it->v; 20 | } 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgsmatrix-/dgsmatrix-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dgsmatrix*_dcovector operator */ 3 | inline _dcovector operator*(const dgsmatrix& mat, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | newvec.zero(); 16 | 17 | const std::vector::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v * vec(it->j); 20 | } 21 | 22 | vec.destroy(); 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zgbmatrix-/zgbmatrix-zcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zgbmatrix*zcovector operator */ 3 | inline _zcovector operator*(const zgbmatrix& mat, const zcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zcovector newvec(mat.m); 15 | char trans ='n'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | comple beta =comple(0.,0.); 20 | 21 | zgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zrovector-/zrovector-zgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zrovector*zgbmatrix operator */ 3 | inline _zrovector operator*(const zrovector& vec, const zgbmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | zrovector newvec(mat.n); 15 | char trans ='T'; 16 | comple alpha =comple(1.,0.); 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | comple beta =comple(0.,0.); 20 | 21 | zgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | return _(newvec); 24 | } 25 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_dgbmatrix-/_dgbmatrix-dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _dgbmatrix*dcovector operator */ 3 | inline _dcovector operator*(const _dgbmatrix& mat, const dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | double beta =0.; 20 | 21 | dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | mat.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/_drovector-/_drovector-dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! _drovector*dgbmatrix operator */ 3 | inline _drovector operator*(const _drovector& vec, const dgbmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | double beta =0.; 20 | 21 | dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | vec.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/dgbmatrix-/dgbmatrix-_dcovector.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! dgbmatrix*_dcovector operator */ 3 | inline _dcovector operator*(const dgbmatrix& mat, const _dcovector& vec) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(mat.n!=vec.l){ 7 | ERROR_REPORT; 8 | std::cerr << "These matrix and vector can not make a product." << std::endl 9 | << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | dcovector newvec(mat.m); 15 | char trans ='n'; 16 | double alpha =1.; 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | double beta =0.; 20 | 21 | dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | vec.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/drovector-/drovector-_dgbmatrix.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! drovector*_dgbmatrix operator */ 3 | inline _drovector operator*(const drovector& vec, const _dgbmatrix& mat) 4 | {CPPL_VERBOSE_REPORT; 5 | #ifdef CPPL_DEBUG 6 | if(vec.l!=mat.m){ 7 | ERROR_REPORT; 8 | std::cerr << "These vector and matrix can not make a product." << std::endl 9 | << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl; 10 | exit(1); 11 | } 12 | #endif//CPPL_DEBUG 13 | 14 | drovector newvec(mat.n); 15 | char trans ='T'; 16 | double alpha =1.; 17 | CPPL_INT lda =mat.kl+mat.ku+1; 18 | CPPL_INT inc =1; 19 | double beta =0.; 20 | 21 | dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc ); 22 | 23 | mat.destroy(); 24 | return _(newvec); 25 | } 26 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/small/zrovector_small-specialized.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! calculate vector product for 2D vector */ 3 | inline comple operator/(const zrovec2& A, const zrovec2& B) 4 | {CPPL_VERBOSE_REPORT; 5 | return A(0)*B(1)-A(1)*B(0); 6 | } 7 | 8 | /////////////////////////////////////////////////////////////////////////////// 9 | /////////////////////////////////////////////////////////////////////////////// 10 | /////////////////////////////////////////////////////////////////////////////// 11 | 12 | //============================================================================= 13 | /*! calculate vector product only for 3D vector */ 14 | inline zrovec3 operator/(const zrovec3& A, const zrovec3& B) 15 | {CPPL_VERBOSE_REPORT; 16 | zrovec3 C; 17 | C(0) =A(1)*B(2) -A(2)*B(1); 18 | C(1) =A(2)*B(0) -A(0)*B(2); 19 | C(2) =A(0)*B(1) -A(1)*B(0); 20 | return C; 21 | } 22 | -------------------------------------------------------------------------------- /src/3rdparty/cpplapack-2015.05.11-1/include/zhematrix-/zhematrix-complex.hpp: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | /*! zhematrix*comple operator */ 3 | inline _zgematrix operator*(const zhematrix& mat, const comple& d) 4 | {CPPL_VERBOSE_REPORT; 5 | mat.complete(); 6 | zgematrix newmat(mat.n, mat.n); 7 | 8 | const CPPL_INT size =mat.n*mat.n; 9 | for(CPPL_INT i=0; i::const_iterator mat_data_end =mat.data.end(); 18 | for(std::vector::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){ 19 | newvec(it->i) += it->v * vec(it->j); 20 | } 21 | 22 | mat.destroy(); 23 | vec.destroy(); 24 | return _(newvec); 25 | } 26 | --------------------------------------------------------------------------------