diff --git a/.gitignore b/.gitignore index 9aff1f9b..fb1b54b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +build/ # Compiled Object files *.slo *.lo diff --git a/CMakeLists-adolc.txt.in b/CMakeLists-adolc.txt.in new file mode 100644 index 00000000..8ff38735 --- /dev/null +++ b/CMakeLists-adolc.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(adolc-download NONE) + +include(ExternalProject) +ExternalProject_Add(adolc + GIT_REPOSITORY https://github.com/coin-or/ADOL-C.git + GIT_TAG master + BUILD_IN_SOURCE ON + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/adolc-src" + CONFIGURE_COMMAND autoreconf -fi && ./configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/adolc-build --enable-sparse + BUILD_COMMAND make -j3 + INSTALL_COMMAND make install + TEST_COMMAND "" +) \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..1adec6d3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required (VERSION 3.10) +project(PSOPT VERSION 4.0.1 LANGUAGES CXX) + +option(BUILD_EXAMPLES "Build examples from the example subdirectory." OFF) + +find_package(Eigen3 REQUIRED NO_MODULE) +find_package(PkgConfig REQUIRED) +pkg_check_modules(adolc adolc) +pkg_check_modules(ipopt REQUIRED ipopt) + +if(NOT TARGET ${adolc}) + message(STATUS "ADOL-C will be downloaded and added to the project...") + # Download and unpack adolc at configure time + configure_file(CMakeLists-adolc.txt.in adolc-download/CMakeLists.txt) + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/adolc-download ) + if(result) + message(FATAL_ERROR "CMake step for adolc failed: ${result}") + endif() + execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/adolc-download ) + if(result) + message(FATAL_ERROR "Build step for adolc failed: ${result}") + endif() + + add_library(adolc SHARED IMPORTED) + target_include_directories(adolc INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/adolc-build/include/) + set_target_properties(adolc PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/adolc-build/lib64) + + set(CMAKE_CXX_FLAGS "-std=c++11") +endif() + +file(GLOB SRC src/*.cxx) +file(GLOB HEADER "src/*.h") + +add_library(${PROJECT_NAME} ${SRC} ${HEADER}) +target_include_directories(${PROJECT_NAME} PUBLIC src/ PRIVATE ${ipopt_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} PUBLIC adolc ${ipopt_LIBRARIES} PRIVATE Eigen3::Eigen) + +if(${BUILD_EXAMPLES}) + add_subdirectory(examples/) +endif() diff --git a/Makefile b/Makefile deleted file mode 100644 index 219fedd8..00000000 --- a/Makefile +++ /dev/null @@ -1,199 +0,0 @@ -SHELL = /bin/sh -USERHOME = ~ -F2CINC = $(F2CINCLUDE) -F2CLIB = $(F2CLIBRARY) -DMATRIXDIR=./dmatrix -CXSPARSE=./SuiteSparse/CXSparse -LUSOL=./lusol/csrc - -prefix = $(USERHOME)/Ipopt-3.12.12 -# Directory with header files -IPOPTINCDIR = ${prefix}/include/coin -# Directory with libipopt.a -IPOPTLIBDIR = ${exec_prefix}/lib -exec_prefix = ${prefix} - -PSOPTDIR = ./PSOPT - -PSOPTSRCDIR = $(PSOPTDIR)/src -EXAMPLESDIR = $(PSOPTDIR)/examples -CXSPARSE_LIBS = $(CXSPARSE)/Lib/libcxsparse.a -LUSOL_LIBS = $(LUSOL)/liblusol.a -SPARSE_LIBS = $(CXSPARSE_LIBS) $(LUSOL_LIBS) -ldl -ADOLC_LIBS = -ladolc -PSOPT_LIBS = $(PSOPTDIR)/lib/libpsopt.a -DMATRIX_LIBS = $(DMATRIXDIR)/lib/libdmatrix.a - - -$(CXSPARSE_LIBS): -# (cp UFconfig.h $(CXSPARSE)/Include;cd $(CXSPARSE)/Lib; $(MAKE)) - (cd $(CXSPARSE);cd ..;$(MAKE)) - -$(LUSOL_LIBS): - (cp Makefile.lusol $(LUSOL)/Makefile; cd $(LUSOL); $(MAKE)) - -$(DMATRIX_LIBS): $(DMATRIXDIR)/src/dmatrixv.cxx $(DMATRIXDIR)/include/dmatrixv.h - (cd $(DMATRIXDIR)/lib; $(MAKE)) - - -dmatrix_examples: - (cd $(DMATRIXDIR)/examples; $(MAKE) all) - -$(PSOPT_LIBS): - (cd $(PSOPTDIR)/lib; $(MAKE)) - -bioreactor: - (cd $(EXAMPLESDIR)/$@; make $@) - -brac1: - (cd $(EXAMPLESDIR)/$@; make $@) - - -shutt: - (cd $(EXAMPLESDIR)/$@; make $@) - - -manutec: - (cd $(EXAMPLESDIR)/$@; make $@) - -missile: - (cd $(EXAMPLESDIR)/$@; make $@) - -moon: - (cd $(EXAMPLESDIR)/$@; make $@) - -stc1: - (cd $(EXAMPLESDIR)/$@; make $@) - - -brymr: - (cd $(EXAMPLESDIR)/$@; make $@) - -twoburn: - (cd $(EXAMPLESDIR)/$@; make $@) - -twolink: - (cd $(EXAMPLESDIR)/$@; make $@) - -twophsc: - (cd $(EXAMPLESDIR)/$@; make $@) - -twophro: - (cd $(EXAMPLESDIR)/$@; make $@) - -hyper: - (cd $(EXAMPLESDIR)/$@; make $@) - - -launch: - (cd $(EXAMPLESDIR)/$@; make $@) - -lambert: - (cd $(EXAMPLESDIR)/$@; make $@) - -bryden: - (cd $(EXAMPLESDIR)/$@; make $@) - -delay1: - (cd $(EXAMPLESDIR)/$@; make $@) - -goddard: - (cd $(EXAMPLESDIR)/$@; make $@) - -steps: - (cd $(EXAMPLESDIR)/$@; make $@) - -sing5: - (cd $(EXAMPLESDIR)/$@; make $@) - -climb: - (cd $(EXAMPLESDIR)/$@; make $@) - -cracking: - (cd $(EXAMPLESDIR)/$@; make $@) - -isop: - (cd $(EXAMPLESDIR)/$@; make $@) - -catmix: - (cd $(EXAMPLESDIR)/$@; make $@) - -chain: - (cd $(EXAMPLESDIR)/$@; make $@) - -obstacle: - (cd $(EXAMPLESDIR)/$@; make $@) - -crane: - (cd $(EXAMPLESDIR)/$@; make $@) - -ipc: - (cd $(EXAMPLESDIR)/$@; make $@) - -alpine: - (cd $(EXAMPLESDIR)/$@; make $@) - -lts: - (cd $(EXAMPLESDIR)/$@; make $@) - -user: - (cd $(EXAMPLESDIR)/$@; make $@) - -coulomb: - (cd $(EXAMPLESDIR)/$@; make $@) - -lowthr: - (cd $(EXAMPLESDIR)/$@; make $@) - -heat: - (cd $(EXAMPLESDIR)/$@; make $@) - -zpm: - (cd $(EXAMPLESDIR)/$@; make $@) - -glider: - (cd $(EXAMPLESDIR)/$@; make $@) - -notorious: - (cd $(EXAMPLESDIR)/$@; make $@) - -reorientation: - (cd $(EXAMPLESDIR)/$@; make $@) - -mpec: - (cd $(EXAMPLESDIR)/$@; make $@) - -dae_i3: - (cd $(EXAMPLESDIR)/$@; make $@) - -breakwell: - (cd $(EXAMPLESDIR)/$@; make $@) - -rayleigh: - (cd $(EXAMPLESDIR)/$@; make $@) - -test: launch - (cd $(EXAMPLESDIR)/launch; ./launch) - - -all: $(CXSPARSE_LIBS) $(DMATRIX_LIBS) $(LUSOL_LIBS) $(PSOPT_LIBS) dmatrix_examples bioreactor brac1 shutt manutec missile moon stc1 sing5 steps brymr twoburn twolink twophsc twophro hyper launch lambert bryden delay1 goddard sing5 climb cracking isop catmix chain obstacle crane ipc alpine lts user coulomb lowthr heat zpm glider notorious reorientation mpec dae_i3 breakwell rayleigh test - - -clean: - - (cd $(DMATRIXDIR)/lib; $(MAKE) clean) - (cd $(CXSPARSE)/Lib; $(MAKE) clean) - (cd $(LUSOL); $(MAKE) clean) - (cd $(DMATRIXDIR)/examples; $(MAKE) clean) - (cd $(PSOPTDIR)/lib; $(MAKE) clean) - - -distclean: - - (cd $(DMATRIXDIR)/lib; $(MAKE) distclean) - (cd $(CXSPARSE)/Lib; $(MAKE) distclean) - (cd $(LUSOL); $(MAKE) clean) - (cd $(DMATRIXDIR)/examples; $(MAKE) distclean) - (cd $(PSOPTDIR)/lib; $(MAKE) distclean) - - diff --git a/Makefile.cxsparse.vc b/Makefile.cxsparse.vc deleted file mode 100644 index 99d9b1d0..00000000 --- a/Makefile.cxsparse.vc +++ /dev/null @@ -1,92 +0,0 @@ -# Modify the "-O" optimization option for best performance (-O3 on Linux): -CC = cl -# CFLAGS = /O2 /DCS_LONG /c /DNCOMPLEX -CFLAGS = /O2 /c /DNCOMPLEX -I = /I..\Include - -AR = lib - - -all: libcxsparse.lib - -CS_SOURCE = cs_add.c cs_amd.c cs_chol.c cs_cholsol.c cs_counts.c cs_cumsum.c \ - cs_droptol.c cs_dropzeros.c cs_dupl.c cs_entry.c \ - cs_etree.c cs_fkeep.c cs_gaxpy.c cs_happly.c cs_house.c cs_ipvec.c \ - cs_lsolve.c cs_ltsolve.c cs_lu.c cs_lusol.c cs_util.c cs_multiply.c \ - cs_permute.c cs_pinv.c cs_post.c cs_pvec.c cs_qr.c cs_qrsol.c \ - cs_scatter.c cs_schol.c cs_sqr.c cs_symperm.c cs_tdfs.c cs_malloc.c \ - cs_transpose.c cs_compress.c cs_usolve.c cs_utsolve.c cs_scc.c \ - cs_maxtrans.c cs_dmperm.c cs_updown.c cs_print.c cs_norm.c cs_load.c \ - cs_dfs.c cs_reach.c cs_spsolve.c cs_leaf.c cs_ereach.c cs_randperm.c - - - -CS_DI_OBJ = cs_add.obj cs_amd.obj cs_chol.obj cs_cholsol.obj cs_counts.obj \ - cs_cumsum.obj cs_droptol.obj cs_dropzeros.obj cs_dupl.obj \ - cs_entry.obj cs_etree.obj cs_fkeep.obj cs_gaxpy.obj cs_happly.obj \ - cs_house.obj cs_ipvec.obj cs_lsolve.obj cs_ltsolve.obj cs_lu.obj \ - cs_lusol.obj cs_util.obj cs_multiply.obj cs_permute.obj cs_pinv.obj \ - cs_post.obj cs_pvec.obj cs_qr.obj cs_qrsol.obj cs_scatter.obj \ - cs_schol.obj cs_sqr.obj cs_symperm.obj cs_tdfs.obj cs_malloc.obj \ - cs_transpose.obj cs_compress.obj cs_usolve.obj cs_utsolve.obj \ - cs_scc.obj cs_maxtrans.obj cs_dmperm.obj cs_updown.obj cs_print.obj \ - cs_norm.obj cs_load.obj cs_dfs.obj cs_reach.obj cs_spsolve.obj \ - cs_leaf.obj cs_ereach.obj cs_randperm.obj - -CS_DL_OBJ = cs_add_dl.obj cs_amd_dl.obj cs_chol_dl.obj cs_cholsol_dl.obj cs_counts_dl.obj \ - cs_cumsum_dl.obj cs_droptol_dl.obj cs_dropzeros_dl.obj cs_dupl_dl.obj \ - cs_entry_dl.obj cs_etree_dl.obj cs_fkeep_dl.obj cs_gaxpy_dl.obj cs_happly_dl.obj \ - cs_house_dl.obj cs_ipvec_dl.obj cs_lsolve_dl.obj cs_ltsolve_dl.obj cs_lu_dl.obj \ - cs_lusol_dl.obj cs_util_dl.obj cs_multiply_dl.obj cs_permute_dl.obj cs_pinv_dl.obj \ - cs_post_dl.obj cs_pvec_dl.obj cs_qr_dl.obj cs_qrsol_dl.obj cs_scatter_dl.obj \ - cs_schol_dl.obj cs_sqr_dl.obj cs_symperm_dl.obj cs_tdfs_dl.obj cs_malloc_dl.obj \ - cs_transpose_dl.obj cs_compress_dl.obj cs_usolve_dl.obj cs_utsolve_dl.obj \ - cs_scc_dl.obj cs_maxtrans_dl.obj cs_dmperm_dl.obj cs_updown_dl.obj cs_print_dl.obj \ - cs_norm_dl.obj cs_load_dl.obj cs_dfs_dl.obj cs_reach_dl.obj cs_spsolve_dl.obj \ - cs_leaf_dl.obj cs_ereach_dl.obj cs_randperm_dl.obj - -CS_CI_OBJ = cs_add_ci.obj cs_amd_ci.obj cs_chol_ci.obj cs_cholsol_ci.obj cs_counts_ci.obj \ - cs_cumsum_ci.obj cs_droptol_ci.obj cs_dropzeros_ci.obj cs_dupl_ci.obj \ - cs_entry_ci.obj cs_etree_ci.obj cs_fkeep_ci.obj cs_gaxpy_ci.obj cs_happly_ci.obj \ - cs_house_ci.obj cs_ipvec_ci.obj cs_lsolve_ci.obj cs_ltsolve_ci.obj cs_lu_ci.obj \ - cs_lusol_ci.obj cs_util_ci.obj cs_multiply_ci.obj cs_permute_ci.obj cs_pinv_ci.obj \ - cs_post_ci.obj cs_pvec_ci.obj cs_qr_ci.obj cs_qrsol_ci.obj cs_scatter_ci.obj \ - cs_schol_ci.obj cs_sqr_ci.obj cs_symperm_ci.obj cs_tdfs_ci.obj cs_malloc_ci.obj \ - cs_transpose_ci.obj cs_compress_ci.obj cs_usolve_ci.obj cs_utsolve_ci.obj \ - cs_scc_ci.obj cs_maxtrans_ci.obj cs_dmperm_ci.obj cs_updown_ci.obj cs_print_ci.obj \ - cs_norm_ci.obj cs_load_ci.obj cs_dfs_ci.obj cs_reach_ci.obj cs_spsolve_ci.obj \ - cs_leaf_ci.obj cs_ereach_ci.obj cs_randperm_ci.obj - -CS_CL_OBJ = cs_add_cl.obj cs_amd_cl.obj cs_chol_cl.obj cs_cholsol_cl.obj cs_counts_cl.obj \ - cs_cumsum_cl.obj cs_droptol_cl.obj cs_dropzeros_cl.obj cs_dupl_cl.obj \ - cs_entry_cl.obj cs_etree_cl.obj cs_fkeep_cl.obj cs_gaxpy_cl.obj cs_happly_cl.obj \ - cs_house_cl.obj cs_ipvec_cl.obj cs_lsolve_cl.obj cs_ltsolve_cl.obj cs_lu_cl.obj \ - cs_lusol_cl.obj cs_util_cl.obj cs_multiply_cl.obj cs_permute_cl.obj cs_pinv_cl.obj \ - cs_post_cl.obj cs_pvec_cl.obj cs_qr_cl.obj cs_qrsol_cl.obj cs_scatter_cl.obj \ - cs_schol_cl.obj cs_sqr_cl.obj cs_symperm_cl.obj cs_tdfs_cl.obj cs_malloc_cl.obj \ - cs_transpose_cl.obj cs_compress_cl.obj cs_usolve_cl.obj cs_utsolve_cl.obj \ - cs_scc_cl.obj cs_maxtrans_cl.obj cs_dmperm_cl.obj cs_updown_cl.obj cs_print_cl.obj \ - cs_norm_cl.obj cs_load_cl.obj cs_dfs_cl.obj cs_reach_cl.obj cs_spsolve_cl.obj \ - cs_leaf_cl.obj cs_ereach_cl.obj cs_randperm_cl.obj - -CS = $(CS_DI_OBJ) - -# $(CS): Makefile.vc *.c - - -.c.obj: - $(CC) -c $(CFLAGS) $(I) %s /Fo$*.obj - - -libcxsparse.lib: $(CS) - $(AR) -out:libcxsparse.lib $(CS_DI_OBJ) - copy libcxsparse.lib ..\lib - - -clean: - del *.obj - -purge: distclean - -distclean: clean - del *.lib diff --git a/Makefile.ipopt b/Makefile.ipopt deleted file mode 100644 index 2eadc8bc..00000000 --- a/Makefile.ipopt +++ /dev/null @@ -1,199 +0,0 @@ -SHELL = /bin/sh -USERHOME = ~ -F2CINC = $(F2CINCLUDE) -F2CLIB = $(F2CLIBRARY) -DMATRIXDIR=./dmatrix -CXSPARSE=./SuiteSparse/CXSparse -LUSOL=./lusol/csrc - -prefix = $(USERHOME)/Ipopt-3.12.3 -# Directory with header files -IPOPTINCDIR = ${prefix}/include/coin -# Directory with libipopt.a -IPOPTLIBDIR = ${exec_prefix}/lib -exec_prefix = ${prefix} - -PSOPTDIR = ./PSOPT - -PSOPTSRCDIR = $(PSOPTDIR)/src -EXAMPLESDIR = $(PSOPTDIR)/examples -CXSPARSE_LIBS = $(CXSPARSE)/Lib/libcxsparse.a -LUSOL_LIBS = $(LUSOL)/liblusol.a -SPARSE_LIBS = $(CXSPARSE_LIBS) $(LUSOL_LIBS) -ldl -ADOLC_LIBS = -ladolc -PSOPT_LIBS = $(PSOPTDIR)/lib/libpsopt.a -DMATRIX_LIBS = $(DMATRIXDIR)/lib/libdmatrix.a - - -$(CXSPARSE_LIBS): -# (cp UFconfig.h $(CXSPARSE)/Include;cd $(CXSPARSE)/Lib; $(MAKE)) - (cd $(CXSPARSE);cd ..;$(MAKE)) - -$(LUSOL_LIBS): - (cp Makefile.lusol $(LUSOL)/Makefile; cd $(LUSOL); $(MAKE)) - -$(DMATRIX_LIBS): $(DMATRIXDIR)/src/dmatrixv.cxx $(DMATRIXDIR)/include/dmatrixv.h - (cd $(DMATRIXDIR)/lib; $(MAKE)) - - -dmatrix_examples: - (cd $(DMATRIXDIR)/examples; $(MAKE) all) - -$(PSOPT_LIBS): - (cd $(PSOPTDIR)/lib; $(MAKE)) - -bioreactor: - (cd $(EXAMPLESDIR)/$@; make $@) - -brac1: - (cd $(EXAMPLESDIR)/$@; make $@) - - -shutt: - (cd $(EXAMPLESDIR)/$@; make $@) - - -manutec: - (cd $(EXAMPLESDIR)/$@; make $@) - -missile: - (cd $(EXAMPLESDIR)/$@; make $@) - -moon: - (cd $(EXAMPLESDIR)/$@; make $@) - -stc1: - (cd $(EXAMPLESDIR)/$@; make $@) - - -brymr: - (cd $(EXAMPLESDIR)/$@; make $@) - -twoburn: - (cd $(EXAMPLESDIR)/$@; make $@) - -twolink: - (cd $(EXAMPLESDIR)/$@; make $@) - -twophsc: - (cd $(EXAMPLESDIR)/$@; make $@) - -twophro: - (cd $(EXAMPLESDIR)/$@; make $@) - -hyper: - (cd $(EXAMPLESDIR)/$@; make $@) - - -launch: - (cd $(EXAMPLESDIR)/$@; make $@) - -lambert: - (cd $(EXAMPLESDIR)/$@; make $@) - -bryden: - (cd $(EXAMPLESDIR)/$@; make $@) - -delay1: - (cd $(EXAMPLESDIR)/$@; make $@) - -goddard: - (cd $(EXAMPLESDIR)/$@; make $@) - -steps: - (cd $(EXAMPLESDIR)/$@; make $@) - -sing5: - (cd $(EXAMPLESDIR)/$@; make $@) - -climb: - (cd $(EXAMPLESDIR)/$@; make $@) - -cracking: - (cd $(EXAMPLESDIR)/$@; make $@) - -isop: - (cd $(EXAMPLESDIR)/$@; make $@) - -catmix: - (cd $(EXAMPLESDIR)/$@; make $@) - -chain: - (cd $(EXAMPLESDIR)/$@; make $@) - -obstacle: - (cd $(EXAMPLESDIR)/$@; make $@) - -crane: - (cd $(EXAMPLESDIR)/$@; make $@) - -ipc: - (cd $(EXAMPLESDIR)/$@; make $@) - -alpine: - (cd $(EXAMPLESDIR)/$@; make $@) - -lts: - (cd $(EXAMPLESDIR)/$@; make $@) - -user: - (cd $(EXAMPLESDIR)/$@; make $@) - -coulomb: - (cd $(EXAMPLESDIR)/$@; make $@) - -lowthr: - (cd $(EXAMPLESDIR)/$@; make $@) - -heat: - (cd $(EXAMPLESDIR)/$@; make $@) - -zpm: - (cd $(EXAMPLESDIR)/$@; make $@) - -glider: - (cd $(EXAMPLESDIR)/$@; make $@) - -notorious: - (cd $(EXAMPLESDIR)/$@; make $@) - -reorientation: - (cd $(EXAMPLESDIR)/$@; make $@) - -mpec: - (cd $(EXAMPLESDIR)/$@; make $@) - -dae_i3: - (cd $(EXAMPLESDIR)/$@; make $@) - -breakwell: - (cd $(EXAMPLESDIR)/$@; make $@) - -rayleigh: - (cd $(EXAMPLESDIR)/$@; make $@) - -test: launch - (cd $(EXAMPLESDIR)/launch; ./launch) - - -all: $(CXSPARSE_LIBS) $(DMATRIX_LIBS) $(LUSOL_LIBS) $(PSOPT_LIBS) dmatrix_examples bioreactor brac1 shutt manutec missile moon stc1 sing5 steps brymr twoburn twolink twophsc twophro hyper launch lambert bryden delay1 goddard sing5 climb cracking isop catmix chain obstacle crane ipc alpine lts user coulomb lowthr heat zpm glider notorious reorientation mpec dae_i3 breakwell rayleigh test - - -clean: - - (cd $(DMATRIXDIR)/lib; $(MAKE) clean) - (cd $(CXSPARSE)/Lib; $(MAKE) clean) - (cd $(LUSOL); $(MAKE) clean) - (cd $(DMATRIXDIR)/examples; $(MAKE) clean) - (cd $(PSOPTDIR)/lib; $(MAKE) clean) - - -distclean: - - (cd $(DMATRIXDIR)/lib; $(MAKE) distclean) - (cd $(CXSPARSE)/Lib; $(MAKE) distclean) - (cd $(LUSOL); $(MAKE) clean) - (cd $(DMATRIXDIR)/examples; $(MAKE) distclean) - (cd $(PSOPTDIR)/lib; $(MAKE) distclean) - - diff --git a/Makefile.lusol b/Makefile.lusol deleted file mode 100644 index 2d01d736..00000000 --- a/Makefile.lusol +++ /dev/null @@ -1,33 +0,0 @@ -# Modify the "-O" optimization option for best performance (-O3 on Linux): -CC = gcc -CFLAGS = -DYZHANG -DNDEBUG -Wall -fexceptions -pthread -ansi -fPIC -O3 -I = -I. - -AR = ar cr -RANLIB = ranlib - -all: liblusol.a - -LUSOL_SOURCE = lusol.c mmio.c commonlib.c lusolio.c hbio.c myblas.c -LUSOL_OBJ = lusol.o mmio.o commonlib.o lusolio.o hbio.o myblas.o -LUSOL_LIB_OBJ = lusol.o mmio.o commonlib.o lusolio.o hbio.o myblas.o - -LUSOL_LIB = liblusol.a - - -.c.o: %.c - $(CC) $(CFLAGS) $(I) -c $< -o $@ - -$(LUSOL_LIB): $(LUSOL_LIB_OBJ) - $(AR) $(LUSOL_LIB) $(LUSOL_LIB_OBJ) - $(RANLIB) $(LUSOL_LIB) - cp liblusol.a .. - - -clean: - rm -f *.o - -purge: distclean - -distclean: - rm -f *.a diff --git a/Makefile.lusol.vc b/Makefile.lusol.vc deleted file mode 100644 index 022beebc..00000000 --- a/Makefile.lusol.vc +++ /dev/null @@ -1,31 +0,0 @@ -# Modify the "-O" optimization option for best performance (-O3 on Linux): -CC = CL -CFLAGS = -DYZHANG -DNDEBUG -fPIC -O2 -DWIN32 -I = -I. - -AR = lib - - -all: liblusol.lib - -LUSOL_SOURCE = lusol.c mmio.c commonlib.c lusolio.c hbio.c myblas.c -LUSOL_OBJ = lusol.obj mmio.obj commonlib.obj lusolio.obj hbio.obj myblas.obj -LUSOL_LIB_OBJ = lusol.obj mmio.obj commonlib.obj lusolio.obj hbio.obj myblas.obj - -LUSOL_LIB = liblusol.lib - - -.c.o: - $(CC) $(CFLAGS) $(I) -c $< -o $@ - -$(LUSOL_LIB): $(LUSOL_LIB_OBJ) - $(AR) -out:$(LUSOL_LIB) $(LUSOL_LIB_OBJ) - copy liblusol.lib .. - - -clean: - del *.obj - -distclean: - del *.lib - del ..\*.lib diff --git a/Makefile.vc b/Makefile.vc deleted file mode 100755 index 4af02350..00000000 --- a/Makefile.vc +++ /dev/null @@ -1,533 +0,0 @@ -# PSOPT Makefile - -all: libcxsparse.lib liblusol.lib libdmatrix.lib libpsopt.lib dmatrix_examples launch shutt \ -moon stc1 brymr twolink twophsc twophro hyper bryden delay1 goddard sing5 climb cracking \ -isop catmix chain obstacle crane ipc alpine lts user coulomb heat lambert bioreactor lowthr \ -manutec missile steps twoburn notorious glider reorientation mpec zpm - -libcxsparse.lib: - copy UFconfig.h CXSparse\Include - copy Makefile.cxsparse.vc CXSparse\Source\Makefile.vc - cd CXSparse\Source - $(MAKE) -f Makefile.vc - cd ..\.. - -liblusol.lib: -# cscript update_myblas_h.vbs - copy Makefile.lusol.vc lusol\csrc\Makefile.vc - cd lusol\csrc - $(MAKE) -f Makefile.vc - cd ..\.. - -libdmatrix.lib: - cd dmatrix\lib - $(MAKE) -f Makefile.vc - cd ..\.. - -libpsopt.lib: - cd PSOPT\lib - $(MAKE) -f Makefile.vc - cd ..\.. - -dmatrix_examples: - cd dmatrix\examples - $(MAKE) -f Makefile.vc all - cd ..\.. - -launch: - cd PSOPT\examples\launch - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -brac1: - cd PSOPT\examples\brac1 - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -shutt: - cd PSOPT\examples\shutt - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -moon: - cd PSOPT\examples\moon - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -stc1: - cd PSOPT\examples\stc1 - $(MAKE) -f Makefile.vc all - cd ..\..\.. - - -brymr: - cd PSOPT\examples\brymr - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -twolink: - cd PSOPT\examples\twolink - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -twophsc: - cd PSOPT\examples\twophsc - $(MAKE) -f Makefile.vc all - cd ..\..\.. - - -twophro: - cd PSOPT\examples\twophro - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -hyper: - cd PSOPT\examples\hyper - $(MAKE) -f Makefile.vc all - cd ..\..\.. - - -bryden: - cd PSOPT\examples\bryden - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -delay1: - cd PSOPT\examples\delay1 - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -goddard: - cd PSOPT\examples\goddard - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -sing5: - cd PSOPT\examples\sing5 - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -climb: - cd PSOPT\examples\climb - $(MAKE) -f Makefile.vc - cd ..\..\.. - -cracking: - cd PSOPT\examples\cracking - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -isop: - cd PSOPT\examples\isop - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -crane: - cd PSOPT\examples\crane - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -ipc: - cd PSOPT\examples\ipc - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -catmix: - cd PSOPT\examples\catmix - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -chain: - cd PSOPT\examples\chain - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -obstacle: - cd PSOPT\examples\obstacle - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -alpine: - cd PSOPT\examples\alpine - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -lts: - cd PSOPT\examples\lts - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -user: - cd PSOPT\examples\user - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -coulomb: - cd PSOPT\examples\coulomb - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -heat: - cd PSOPT\examples\heat - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -lambert: - cd PSOPT\examples\lambert - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -bioreactor: - cd PSOPT\examples\bioreactor - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -lowthr: - cd PSOPT\examples\lowthr - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -manutec: - cd PSOPT\examples\manutec - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -missile: - cd PSOPT\examples\missile - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -steps: - cd PSOPT\examples\steps - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -twoburn: - cd PSOPT\examples\twoburn - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -zpm: - cd PSOPT\examples\zpm - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -glider: - cd PSOPT\examples\glider - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -notorious: - cd PSOPT\examples\notorious - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -reorientation: - cd PSOPT\examples\reorientation - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -mpec: - cd PSOPT\examples\mpec - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -dae_i3: - cd PSOPT\examples\dae_i3 - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -breakwell: - cd PSOPT\examples\breakwell - $(MAKE) -f Makefile.vc all - cd ..\..\.. - -rayleigh: - cd PSOPT\examples\rayleigh - $(MAKE) -f Makefile.vc all - cd ..\..\.. - - -clean: - cd CXSparse\Source - $(MAKE) -f Makefile.vc clean - cd ..\.. - cd lusol\csrc - $(MAKE) -f Makefile.vc clean - cd .. - cd dmatrix\lib - $(MAKE) -f Makefile.vc clean - cd ..\.. - cd PSOPT\src - del *.obj - cd ..\.. - cd dmatrix\examples - $(MAKE) -f Makefile.vc clean - cd ..\.. - cd PSOPT\examples\launch - del *.obj - cd ..\..\.. - cd PSOPT\examples\brac1 - del *.obj - cd ..\..\.. - cd PSOPT\examples\shutt - del *.obj - cd ..\..\.. - cd PSOPT\examples\moon - del *.obj - cd ..\..\.. - cd PSOPT\examples\stc1 - del *.obj - cd ..\..\.. - cd PSOPT\examples\brymr - del *.obj - cd ..\..\.. - cd PSOPT\examples\twolink - del *.obj - cd ..\..\.. - cd PSOPT\examples\twophsc - del *.obj - cd ..\..\.. - cd PSOPT\examples\twophro - del *.obj - cd ..\..\.. - cd PSOPT\examples\hyper - del *.obj - cd ..\..\.. - cd PSOPT\examples\mphdr - del *.obj - cd ..\..\.. - cd PSOPT\examples\param - del *.obj - cd ..\..\.. - cd PSOPT\examples\bryden - del *.obj - cd ..\..\.. - cd PSOPT\examples\delay1 - del *.obj - cd ..\..\.. - cd PSOPT\examples\goddard - del *.obj - cd ..\..\.. - cd PSOPT\examples\sing5 - del *.obj - cd ..\..\.. - cd PSOPT\examples\climb - del *.obj - cd ..\..\.. - cd PSOPT\examples\cracking - del *.obj - cd ..\..\.. - cd PSOPT\examples\isop - del *.obj - cd ..\..\.. - cd PSOPT\examples\crane - del *.obj - cd ..\..\.. - cd PSOPT\examples\ipc - del *.obj - cd ..\..\.. - cd PSOPT\examples\catmix - del *.obj - cd ..\..\.. - cd PSOPT\examples\chain - del *.obj - cd ..\..\.. - cd PSOPT\examples\obstacle - del *.obj - cd ..\..\.. - cd PSOPT\examples\alpine - del *.obj - cd ..\..\.. - cd PSOPT\examples\lts - del *.obj - cd ..\..\.. - cd PSOPT\examples\user - del *.obj - cd ..\..\.. - cd PSOPT\examples\coulomb - del *.obj - cd ..\..\.. - cd PSOPT\examples\heat - del *.obj - cd ..\..\.. - cd PSOPT\examples\lambert - del *.obj - cd ..\..\.. - cd PSOPT\examples\bioreactor - del *.obj - cd ..\..\.. - cd PSOPT\examples\lowthr - del *.obj - cd ..\..\.. - cd PSOPT\examples\manutec - del *.obj - cd ..\..\.. - cd PSOPT\examples\missile - del *.obj - cd ..\..\.. - cd PSOPT\examples\steps - del *.obj - cd ..\..\.. - cd PSOPT\examples\twoburn - del *.obj - cd ..\..\.. - cd PSOPT\examples\zpm - del *.obj - cd ..\..\.. - cd PSOPT\examples\glider - del *.obj - cd ..\..\.. - cd PSOPT\examples\notorious - del *.obj - cd ..\..\.. - cd PSOPT\examples\reorientation - del *.obj - cd ..\..\.. - cd PSOPT\examples\mpec - del *.obj - cd ..\..\.. - cd PSOPT\examples\dae_i3 - del *.obj - cd ..\..\.. - - -distclean: - cd CXSparse\Source - $(MAKE) -f Makefile.vc distclean - cd ..\.. - cd lusol\csrc - $(MAKE) -f Makefile.vc distclean - cd .. - cd dmatrix\lib - $(MAKE) -f Makefile.vc distclean - cd ..\.. - cd PSOPT\lib - del *.lib - cd ..\.. - cd dmatrix\examples - $(MAKE) -f Makefile.vc distclean - cd ..\.. - cd PSOPT\examples\launch - del *.exe - cd ..\..\.. - cd PSOPT\examples\brac1 - del *.exe - cd ..\..\.. - cd PSOPT\examples\shutt - del *.exe - cd ..\..\.. - cd PSOPT\examples\moon - del *.exe - cd ..\..\.. - cd PSOPT\examples\stc1 - del *.exe - cd ..\..\.. - cd PSOPT\examples\brymr - del *.exe - cd ..\..\.. - cd PSOPT\examples\twolink - del *.exe - cd ..\..\.. - cd PSOPT\examples\twophsc - del *.exe - cd ..\..\.. - cd PSOPT\examples\twophro - del *.exe - cd ..\..\.. - cd PSOPT\examples\hyper - del *.exe - cd ..\..\.. - cd PSOPT\examples\bryden - del *.exe - cd ..\..\.. - cd PSOPT\examples\delay1 - del *.exe - cd ..\..\.. - cd PSOPT\examples\goddard - del *.exe - cd ..\..\.. - cd PSOPT\examples\sing5 - del *.exe - cd ..\..\.. - cd PSOPT\examples\climb - del *.exe - cd ..\..\.. - cd PSOPT\examples\cracking - del *.exe - cd ..\..\.. - cd PSOPT\examples\isop - del *.exe - cd ..\..\.. - cd PSOPT\examples\crane - del *.exe - cd ..\..\.. - cd PSOPT\examples\ipc - del *.exe - cd ..\..\.. - cd PSOPT\examples\catmix - del *.exe - cd ..\..\.. - cd PSOPT\examples\chain - del *.exe - cd ..\..\.. - cd PSOPT\examples\obstacle - del *.exe - cd ..\..\.. - cd PSOPT\examples\alpine - del *.exe - cd ..\..\.. - cd PSOPT\examples\lts - del *.exe - cd ..\..\.. - cd PSOPT\examples\user - del *.exe - cd ..\..\.. - cd PSOPT\examples\coulomb - del *.exe - cd ..\..\.. - cd PSOPT\examples\heat - del *.exe - cd ..\..\.. - cd PSOPT\examples\lambert - del *.exe - cd ..\..\.. - cd PSOPT\examples\bioreactor - del *.exe - cd ..\..\.. - cd PSOPT\examples\lowthr - del *.exe - cd ..\..\.. - cd PSOPT\examples\manutec - del *.exe - cd ..\..\.. - cd PSOPT\examples\missile - del *.exe - cd ..\..\.. - cd PSOPT\examples\steps - del *.exe - cd ..\..\.. - cd PSOPT\examples\twoburn - del *.exe - cd ..\..\.. - cd PSOPT\examples\zpm - del *.exe - cd ..\..\.. - cd PSOPT\examples\glider - del *.exe - cd ..\..\.. - cd PSOPT\examples\notorious - del *.exe - cd ..\..\.. - cd PSOPT\examples\reorientation - del *.exe - cd ..\..\.. - cd PSOPT\examples\mpec - del *.exe - cd ..\..\.. - cd PSOPT\examples\dae_i3 - del *.exe - cd ..\..\.. - - - diff --git a/PSOPT/examples/Makefile.inc b/PSOPT/examples/Makefile.inc deleted file mode 100755 index a2784148..00000000 --- a/PSOPT/examples/Makefile.inc +++ /dev/null @@ -1,55 +0,0 @@ -CXX = cl - -CC = cl - -LD = link - -CFLAGS = -DWIN32 -DLAPACK -DSPARSE_MATRIX -DUSE_IPOPT -D_CRT_ERRNO_DEFINED - -BASE = ..\..\.. - -DMATRIX = $(BASE)\dmatrix - -LUSOL = $(BASE)\lusol\csrc - -CXSPARSE = $(BASE)\CXSparse - - -ADOLC = C:\ADOL-C-2.1.12\ADOL-C\ - -ADOLCLIB = C:\ADOL-C-2.1.12\windows\sparse\adolc.lib - -IPOPT = C:\Ipopt-3.9.3 - -include ..\..\..\MicrosoftVisualStudio.inc - -PSOPT = $(BASE)\PSOPT - -INCLUDE = -I$(PSOPT)\src -I$(DMATRIX)\include -I$(BASE)\CXSparse\Include -I$(LUSOL) -I$(IPOPT)\include\coin -I$(IPOPT)\Ipopt\src\Interfaces -I$(IPOPT)\Ipopt\src\Common -I$(IPOPT)\BuildTools\headers -I$(IPOPT)\Ipopt\src\LinAlg -I$(ADOLC) -I$(ADOLC)\adolc -I$(ADOLC)\adolc\drivers -I$(ADOLC)\adolc\sparse -I$(VCINCLUDE) -I$(VCSDK) - - - -LIBS = $(DMATRIX)\lib\libdmatrix.lib $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\clapack.lib $(DMATRIX)\lib\blas.lib $(DMATRIX)\lib\libf2c.lib $(IPOPT)\Ipopt\MSVisualStudio\v8\libIpopt\Release\libIpopt.lib $(IPOPT)\Ipopt\MSVisualStudio\v8\libf2c\vcf2c.lib $(IPOPT)\Ipopt\MSVisualStudio\v8\LibCoinLapack\Release\libCoinLapack.lib $(IPOPT)\Ipopt\MSVisualStudio\v8\libCoinBlas\Release\libCoinBlas.lib $(IPOPT)\Ipopt\MSVisualStudio\v8\libCoinHSL\Release\libCoinHSL.lib $(LUSOL)\liblusol.lib $(CXSPARSE)\Lib\libcxsparse.lib $(ADOLCLIB) - - -SNFW_SRC = - -SNFW_OBJ = - - - -.cxx.obj: - $(CXX) -c $(CFLAGS) $(INCLUDE) %s /Fo$*.obj - -.c.obj: - $(CC) -c $(CFLAGS) $(INCLUDE) %s /Fo$*.obj - - -clean: - del *.obj - - - - - - diff --git a/PSOPT/examples/Makefile_linux.inc b/PSOPT/examples/Makefile_linux.inc deleted file mode 100644 index 23f39008..00000000 --- a/PSOPT/examples/Makefile_linux.inc +++ /dev/null @@ -1,68 +0,0 @@ -#Usage: make - -SHELL = /bin/sh -USERHOME = /home/$(shell whoami) - -F2CINC = $(F2CINCLUDE) -F2CLIB = $(F2CLIBRARY) - -DMATRIXDIR=../../../dmatrix - -CXSPARSE=../../../SuiteSparse/CXSparse -LUSOL=../../../lusol/csrc - -prefix = $(USERHOME)/Ipopt-3.12.12 -IPOPTINCDIR = -I${prefix}/Ipopt/src/Interfaces -I${prefix}/Ipopt/src/Common -I${prefix}/Ipopt/src/LinAlg -# Directory with libipopt.a -IPOPTLIBDIR = ${exec_prefix}/lib -exec_prefix = ${prefix} - -PSOPTDIR = ../.. - -PSOPTSRCDIR = ../../src -EXAMPLESDIR = . -LIBDIR = $(SNOPTDIR)/lib -# SNOPT_LIBS = $(SNOPTDIR)/lib/libsnopt_cpp.a $(SNOPTDIR)/lib/libsnopt_c.a $(SNOPTDIR)/lib/libsnprint_c.a $(SNOPTDIR)/lib/libblas.a $(SNOPTDIR)/lib/libf2c.a -SNOPT_LIBS = -SPARSE_LIBS = $(LUSOL)/liblusol.a $(CXSPARSE)/Lib/libcxsparse.a -ldl -# IPOPT_LIBS = $(IPOPTLIBDIR)/libipopt.a $(IPOPTLIBDIR)/libcoinhsl.a $(IPOPTLIBDIR)/ThirdParty/libcoinmumps.a $(IPOPTLIBDIR)/ThirdParty/libcoinmetis.a -lpthread -lgfortran -lblas -llapack -latlas -lf77blas -IPOPT_LIBS = `PKG_CONFIG_PATH=$(prefix)/lib64/pkgconfig:$(prefix)/lib/pkgconfig:$(prefix)/share/pkgconfig: /usr/bin/pkg-config --libs ipopt` -# ADOLC_LIBS = /usr/lib/libadolc.a /usr/lib/libColPack.a -# ADOLC_LIBS = /usr/lib/libadolc.a -lColPack -Wl,-rpath=/usr/lib/x86_64-linux-gnu/ -# ADOLC_LIBS = -ladolc -lColPack -Wl,-rpath=/usr/lib/x86_64-linux-gnu/ -ADOLC_LIBS = -ladolc /usr/lib/libColPack.a -Wl,-rpath=/usr/lib/x86_64-linux-gnu/ -PSOPT_LIBS = $(PSOPTDIR)/lib/libpsopt.a -DMATRIX_LIBS = $(DMATRIXDIR)/lib/libdmatrix.a - -# LDFLAGS = -Wl,--rpath -Wl,$(USERHOME)/Ipopt-3.9.3/lib/coin -L$(IPOPTLIBDIR) -lm -ldl -lgcc_s -LDFLAGS = -Wl,--rpath -Wl,${prefix}/lib - -CXX = /usr/bin/g++ -CC = /usr/bin/gcc -CXXFLAGS = -O0 -g -I$(USERHOME)/adolc_base/include -I$(SNOPTDIR)/cppsrc -I$(DMATRIXDIR)/include -I$(SNOPTDIR)/cppexamples -I$(PSOPTSRCDIR) -DLAPACK -DUNIX -DSPARSE_MATRIX -DUSE_IPOPT -I$(CXSPARSE)/Include -I$(CXSPARSE)/../SuiteSparse_config -I$(LUSOL) $(IPOPTINCDIR) -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -fPIC -DHAVE_MALLOC -std=c++11 - -CFLAGS = -O0 -fPIC - -# The C++ interface calls some fortran object files, so it is necessary to -# add the Fortran libraries -# -# WARNING: The g95 libraries used here are machine dependent -# -# libg2c and libm are added to satisfy f2c references - -# FLIBS = /usr/lib/libf2c.a -lblas -llapack -lm -FLIBS = -lm -lf2c -llapack -lf77blas -lcblas -#FLIBS = ../dmatrix/lib/lapack_LINUX.a ../dmatrix/lib/blas_LINUX.a ../dmatrix/lib/F2CLIBS/libf2c_LINUX.a -lm - -ALL_LIBRARIES = $(ADOLC_LIBS) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(FLIBS) $(SPARSE_LIBS) $(IPOPT_LIBS) - - - -clean: - rm -f *.o - -$(EXAMPLESDIR)/%.o : $(EXAMPLESDIR)/%.cxx - $(CXX) -c $(CXXFLAGS) $< -o $@ - - - diff --git a/PSOPT/examples/alpine/Makefile b/PSOPT/examples/alpine/Makefile deleted file mode 100644 index 834ade88..00000000 --- a/PSOPT/examples/alpine/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -ALPINE = alpine $(SNOPT_WRAPPER) - -ALPINE_O = $(ALPINE:%=$(EXAMPLESDIR)/%.o) - - -alpine: $(ALPINE_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/alpine/Makefile.vc b/PSOPT/examples/alpine/Makefile.vc deleted file mode 100644 index 3ec987ce..00000000 --- a/PSOPT/examples/alpine/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: alpine.exe - - -SRC = alpine.cxx \ - $(SNFW_SRC) - -OBJ = alpine.obj \ - $(SNFW_OBJ) - - - -alpine.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:alpine.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/bioreactor/Makefile b/PSOPT/examples/bioreactor/Makefile deleted file mode 100644 index 21bc336e..00000000 --- a/PSOPT/examples/bioreactor/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -BIOREACTOR = bioreactor $(SNOPT_WRAPPER) - -BIOREACTOR_O = $(BIOREACTOR:%=$(EXAMPLESDIR)/%.o) - - -bioreactor: $(BIOREACTOR_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/bioreactor/Makefile.vc b/PSOPT/examples/bioreactor/Makefile.vc deleted file mode 100644 index c9896138..00000000 --- a/PSOPT/examples/bioreactor/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: bioreactor.exe - - -SRC = bioreactor.cxx \ - $(SNFW_SRC) - -OBJ = bioreactor.obj \ - $(SNFW_OBJ) - - - -bioreactor.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:bioreactor.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/brac1/Makefile b/PSOPT/examples/brac1/Makefile deleted file mode 100644 index 034a722d..00000000 --- a/PSOPT/examples/brac1/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -BRAC1 = brac1 $(SNOPT_WRAPPER) - -BRAC1_O = $(BRAC1:%=$(EXAMPLESDIR)/%.o) - - -brac1: $(BRAC1_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/brac1/Makefile.vc b/PSOPT/examples/brac1/Makefile.vc deleted file mode 100644 index 0596de2f..00000000 --- a/PSOPT/examples/brac1/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: brac1.exe - - -SRC = brac1.cxx \ - $(SNFW_SRC) - -OBJ = brac1.obj \ - $(SNFW_OBJ) - - -brac1.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:brac1.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - - diff --git a/PSOPT/examples/breakwell/Makefile b/PSOPT/examples/breakwell/Makefile deleted file mode 100644 index 5859d24a..00000000 --- a/PSOPT/examples/breakwell/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -BREAKWELL = breakwell $(SNOPT_WRAPPER) - -BREAKWELL_O = $(BREAKWELL:%=$(EXAMPLESDIR)/%.o) - - -breakwell: $(BREAKWELL_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/breakwell/Makefile.vc b/PSOPT/examples/breakwell/Makefile.vc deleted file mode 100644 index 4429ac3e..00000000 --- a/PSOPT/examples/breakwell/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: brymr.exe - - -SRC = bryson_max_range.cxx \ - $(SNFW_SRC) - -OBJ = bryson_max_range.obj \ - $(SNFW_OBJ) - - - -brymr.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:brymr.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/bryden/Makefile b/PSOPT/examples/bryden/Makefile deleted file mode 100644 index 8352141e..00000000 --- a/PSOPT/examples/bryden/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -BRYDEN = bryson_denham $(SNOPT_WRAPPER) - -BRYDEN_O = $(BRYDEN:%=$(EXAMPLESDIR)/%.o) - - -bryden: $(BRYDEN_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/bryden/Makefile.vc b/PSOPT/examples/bryden/Makefile.vc deleted file mode 100644 index e43d36c6..00000000 --- a/PSOPT/examples/bryden/Makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ -include ..\Makefile.inc - -all: bryden.exe - - -SRC = bryson_denham.cxx \ - $(SNFW_SRC) - -OBJ = bryson_denham.obj \ - $(SNFW_OBJ) - - - - - -bryden.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:bryden.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/brymr/Makefile b/PSOPT/examples/brymr/Makefile deleted file mode 100644 index 473363c2..00000000 --- a/PSOPT/examples/brymr/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -BRYMR = bryson_max_range $(SNOPT_WRAPPER) - -BRYMR_O = $(BRYMR:%=$(EXAMPLESDIR)/%.o) - - -brymr: $(BRYMR_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/brymr/Makefile.vc b/PSOPT/examples/brymr/Makefile.vc deleted file mode 100644 index 4429ac3e..00000000 --- a/PSOPT/examples/brymr/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: brymr.exe - - -SRC = bryson_max_range.cxx \ - $(SNFW_SRC) - -OBJ = bryson_max_range.obj \ - $(SNFW_OBJ) - - - -brymr.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:brymr.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/catmix/Makefile b/PSOPT/examples/catmix/Makefile deleted file mode 100644 index da87db64..00000000 --- a/PSOPT/examples/catmix/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -CATMIX = catmix $(SNOPT_WRAPPER) - -CATMIX_O = $(CATMIX:%=$(EXAMPLESDIR)/%.o) - - -catmix: $(CATMIX_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/catmix/Makefile.vc b/PSOPT/examples/catmix/Makefile.vc deleted file mode 100644 index 43ddcbec..00000000 --- a/PSOPT/examples/catmix/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: catmix.exe - - -SRC = catmix.cxx \ - $(SNFW_SRC) - -OBJ = catmix.obj \ - $(SNFW_OBJ) - - - -catmix.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:catmix.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/chain/Makefile b/PSOPT/examples/chain/Makefile deleted file mode 100644 index a5b942bb..00000000 --- a/PSOPT/examples/chain/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -include ../Makefile_linux.inc - -CHAIN = chain $(SNOPT_WRAPPER) - -CHAIN_O = $(CHAIN:%=$(EXAMPLESDIR)/%.o) - - -chain: $(CHAIN_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o diff --git a/PSOPT/examples/chain/Makefile.vc b/PSOPT/examples/chain/Makefile.vc deleted file mode 100644 index bc262795..00000000 --- a/PSOPT/examples/chain/Makefile.vc +++ /dev/null @@ -1,16 +0,0 @@ -include ..\Makefile.inc - -all: chain.exe - - -SRC = chain.cxx \ - $(SNFW_SRC) - -OBJ = chain.obj \ - $(SNFW_OBJ) - - - -chain.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:chain.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - diff --git a/PSOPT/examples/climb/Makefile b/PSOPT/examples/climb/Makefile deleted file mode 100644 index aca9f7b8..00000000 --- a/PSOPT/examples/climb/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -CLIMB = climb $(SNOPT_WRAPPER) - -CLIMB_O = $(CLIMB:%=$(EXAMPLESDIR)/%.o) - - -climb: $(CLIMB_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/climb/Makefile.vc b/PSOPT/examples/climb/Makefile.vc deleted file mode 100644 index 964b6221..00000000 --- a/PSOPT/examples/climb/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: climb.exe - - -SRC = climb.cxx \ - $(SNFW_SRC) - -OBJ = climb.obj \ - $(SNFW_OBJ) - - - -climb.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:climb.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/coulomb/Makefile b/PSOPT/examples/coulomb/Makefile deleted file mode 100644 index 0b00d19c..00000000 --- a/PSOPT/examples/coulomb/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -COULOMB = coulomb $(SNOPT_WRAPPER) - -COULOMB_O = $(COULOMB:%=$(EXAMPLESDIR)/%.o) - - -coulomb: $(COULOMB_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/coulomb/Makefile.vc b/PSOPT/examples/coulomb/Makefile.vc deleted file mode 100644 index ba019d1d..00000000 --- a/PSOPT/examples/coulomb/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: coulomb.exe - - -SRC = coulomb.cxx \ - $(SNFW_SRC) - -OBJ = coulomb.obj \ - $(SNFW_OBJ) - - - - -coulomb.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:coulomb.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - diff --git a/PSOPT/examples/cracking/Makefile b/PSOPT/examples/cracking/Makefile deleted file mode 100644 index e296e769..00000000 --- a/PSOPT/examples/cracking/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -CRACKING = cracking $(SNOPT_WRAPPER) - -CRACKING_O = $(CRACKING:%=$(EXAMPLESDIR)/%.o) - - -cracking: $(CRACKING_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/cracking/Makefile.vc b/PSOPT/examples/cracking/Makefile.vc deleted file mode 100644 index 06e72161..00000000 --- a/PSOPT/examples/cracking/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: cracking.exe - - -SRC = cracking.cxx \ - $(SNFW_SRC) - -OBJ = cracking.obj \ - $(SNFW_OBJ) - - - - - - -cracking.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:cracking.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/crane/Makefile b/PSOPT/examples/crane/Makefile deleted file mode 100644 index c189aa39..00000000 --- a/PSOPT/examples/crane/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -CRANE = crane $(SNOPT_WRAPPER) - -CRANE_O = $(CRANE:%=$(EXAMPLESDIR)/%.o) - - -crane: $(CRANE_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/crane/Makefile.vc b/PSOPT/examples/crane/Makefile.vc deleted file mode 100644 index f1e0893b..00000000 --- a/PSOPT/examples/crane/Makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ -include ..\Makefile.inc - -all: crane.exe - - -SRC = crane.cxx \ - $(SNFW_SRC) - -OBJ = crane.obj \ - $(SNFW_OBJ) - - - - -crane.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:crane.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/dae_i3/Makefile b/PSOPT/examples/dae_i3/Makefile deleted file mode 100644 index e125bf4b..00000000 --- a/PSOPT/examples/dae_i3/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -DAE_I3 = dae_i3 $(SNOPT_WRAPPER) - -DAE_I3_O = $(DAE_I3:%=$(EXAMPLESDIR)/%.o) - - -dae_i3: $(DAE_I3_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/dae_i3/Makefile.vc b/PSOPT/examples/dae_i3/Makefile.vc deleted file mode 100644 index a33c2ce2..00000000 --- a/PSOPT/examples/dae_i3/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: dae_i3.exe - - -SRC = dae_i3.cxx \ - $(SNFW_SRC) - -OBJ = dae_i3.obj \ - $(SNFW_OBJ) - - - - - - -dae_i3.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:dae_i3.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/delay1/Makefile b/PSOPT/examples/delay1/Makefile deleted file mode 100644 index c661968a..00000000 --- a/PSOPT/examples/delay1/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -DELAY1 = delay1 $(SNOPT_WRAPPER) - -DELAY1_O = $(DELAY1:%=$(EXAMPLESDIR)/%.o) - - -delay1: $(DELAY1_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/delay1/Makefile.vc b/PSOPT/examples/delay1/Makefile.vc deleted file mode 100644 index 09512517..00000000 --- a/PSOPT/examples/delay1/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: delay1.exe - - -SRC = delay1.cxx \ - $(SNFW_SRC) - -OBJ = delay1.obj \ - $(SNFW_OBJ) - - - -delay1.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:delay1.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/glider/Makefile b/PSOPT/examples/glider/Makefile deleted file mode 100644 index 97e34d90..00000000 --- a/PSOPT/examples/glider/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -GLIDER = glider $(SNOPT_WRAPPER) - -GLIDER_O = $(GLIDER:%=$(EXAMPLESDIR)/%.o) - - -glider: $(GLIDER_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/glider/Makefile.vc b/PSOPT/examples/glider/Makefile.vc deleted file mode 100644 index 1b641740..00000000 --- a/PSOPT/examples/glider/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: glider.exe - - -SRC = glider.cxx \ - $(SNFW_SRC) - -OBJ = glider.obj \ - $(SNFW_OBJ) - - - -glider.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:glider.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/goddard/Makefile b/PSOPT/examples/goddard/Makefile deleted file mode 100644 index f94c4b10..00000000 --- a/PSOPT/examples/goddard/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -GODDARD = goddard $(SNOPT_WRAPPER) - -GODDARD_O = $(GODDARD:%=$(EXAMPLESDIR)/%.o) - - -goddard: $(GODDARD_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/goddard/Makefile.vc b/PSOPT/examples/goddard/Makefile.vc deleted file mode 100644 index fc17a3b4..00000000 --- a/PSOPT/examples/goddard/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: goddard.exe - - -SRC = goddard.cxx \ - $(SNFW_SRC) - -OBJ = goddard.obj \ - $(SNFW_OBJ) - - - - - - -goddard.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:goddard.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/heat/Makefile b/PSOPT/examples/heat/Makefile deleted file mode 100644 index 1d05dfc5..00000000 --- a/PSOPT/examples/heat/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -HEAT = heat $(SNOPT_WRAPPER) - -HEAT_O = $(HEAT:%=$(EXAMPLESDIR)/%.o) - - -heat: $(HEAT_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/heat/Makefile.vc b/PSOPT/examples/heat/Makefile.vc deleted file mode 100644 index c6da8cd0..00000000 --- a/PSOPT/examples/heat/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: heat.exe - - -SRC = heat.cxx \ - $(SNFW_SRC) - -OBJ = heat.obj \ - $(SNFW_OBJ) - - - -heat.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:heat.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/hyper/Makefile b/PSOPT/examples/hyper/Makefile deleted file mode 100644 index 4fc23ddf..00000000 --- a/PSOPT/examples/hyper/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -HYPER = hypersensitive $(SNOPT_WRAPPER) - -HYPER_O = $(HYPER:%=$(EXAMPLESDIR)/%.o) - - -hyper: $(HYPER_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/hyper/Makefile.vc b/PSOPT/examples/hyper/Makefile.vc deleted file mode 100644 index d702a584..00000000 --- a/PSOPT/examples/hyper/Makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ -include ..\Makefile.inc - -all: hyper.exe - - -SRC = hypersensitive.cxx \ - $(SNFW_SRC) - -OBJ = hypersensitive.obj \ - $(SNFW_OBJ) - - - -hyper.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:hyper.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - - diff --git a/PSOPT/examples/ipc/Makefile b/PSOPT/examples/ipc/Makefile deleted file mode 100644 index b8ee5cf4..00000000 --- a/PSOPT/examples/ipc/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -IPC = interior_point $(SNOPT_WRAPPER) - -IPC_O = $(IPC:%=$(EXAMPLESDIR)/%.o) - - -ipc: $(IPC_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/ipc/Makefile.vc b/PSOPT/examples/ipc/Makefile.vc deleted file mode 100644 index 54d93f1e..00000000 --- a/PSOPT/examples/ipc/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: ipc.exe - - -SRC = interior_point.cxx \ - $(SNFW_SRC) - -OBJ = interior_point.obj \ - $(SNFW_OBJ) - - -ipc.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:ipc.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - - diff --git a/PSOPT/examples/isop/Makefile b/PSOPT/examples/isop/Makefile deleted file mode 100644 index 7b0372fc..00000000 --- a/PSOPT/examples/isop/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -ISOP = isoperimetric $(SNOPT_WRAPPER) - -ISOP_O = $(ISOP:%=$(EXAMPLESDIR)/%.o) - - -isop: $(ISOP_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/isop/Makefile.vc b/PSOPT/examples/isop/Makefile.vc deleted file mode 100644 index f7024530..00000000 --- a/PSOPT/examples/isop/Makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ -include ..\Makefile.inc - -all: isop.exe - - -SRC = isoperimetric.cxx \ - $(SNFW_SRC) - -OBJ = isoperimetric.obj \ - $(SNFW_OBJ) - - - - - -isop.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:isop.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/lambert/Makefile b/PSOPT/examples/lambert/Makefile deleted file mode 100644 index 3382a070..00000000 --- a/PSOPT/examples/lambert/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -LAMBERT = lambert $(SNOPT_WRAPPER) - -LAMBERT_O = $(LAMBERT:%=$(EXAMPLESDIR)/%.o) - - -lambert: $(LAMBERT_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/lambert/Makefile.vc b/PSOPT/examples/lambert/Makefile.vc deleted file mode 100644 index bf5650a9..00000000 --- a/PSOPT/examples/lambert/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: lambert.exe - - -SRC = lambert.cxx \ - $(SNFW_SRC) - -OBJ = lambert.obj \ - $(SNFW_OBJ) - - - -lambert.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:lambert.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/launch/Makefile b/PSOPT/examples/launch/Makefile deleted file mode 100644 index bd3df5e2..00000000 --- a/PSOPT/examples/launch/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -LAUNCH = launch $(SNOPT_WRAPPER) - -LAUNCH_O = $(LAUNCH:%=$(EXAMPLESDIR)/%.o) - - -launch: $(LAUNCH_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/launch/Makefile.vc b/PSOPT/examples/launch/Makefile.vc deleted file mode 100644 index 13b2d392..00000000 --- a/PSOPT/examples/launch/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ - -include ..\Makefile.inc - -SRC = launch.cxx \ - $(SNFW_SRC) - -OBJ = launch.obj \ - $(SNFW_OBJ) - -all: launch.exe - -launch.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:launch.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - - diff --git a/PSOPT/examples/lowthr/Makefile b/PSOPT/examples/lowthr/Makefile deleted file mode 100644 index 5463314f..00000000 --- a/PSOPT/examples/lowthr/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -LOWTHR = low_thrust $(SNOPT_WRAPPER) - -LOWTHR_O = $(LOWTHR:%=$(EXAMPLESDIR)/%.o) - - -lowthr: $(LOWTHR_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/lowthr/Makefile.vc b/PSOPT/examples/lowthr/Makefile.vc deleted file mode 100644 index ce3181b6..00000000 --- a/PSOPT/examples/lowthr/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: lowthr.exe - - -SRC = low_thrust.cxx \ - $(SNFW_SRC) - -OBJ = low_thrust.obj \ - $(SNFW_OBJ) - - - -lowthr.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:lowthr.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/lts/Makefile b/PSOPT/examples/lts/Makefile deleted file mode 100644 index ef5eb15c..00000000 --- a/PSOPT/examples/lts/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -LTS = lts $(SNOPT_WRAPPER) - -LTS_O = $(LTS:%=$(EXAMPLESDIR)/%.o) - - -lts: $(LTS_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/lts/Makefile.vc b/PSOPT/examples/lts/Makefile.vc deleted file mode 100644 index 97bb2577..00000000 --- a/PSOPT/examples/lts/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: lts.exe - - -SRC = lts.cxx \ - $(SNFW_SRC) - -OBJ = lts.obj \ - $(SNFW_OBJ) - - - - - - -lts.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:lts.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/manutec/Makefile b/PSOPT/examples/manutec/Makefile deleted file mode 100644 index 3a0bdd9b..00000000 --- a/PSOPT/examples/manutec/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -MANUTEC = manutec $(SNOPT_WRAPPER) - -MANUTEC_O = $(MANUTEC:%=$(EXAMPLESDIR)/%.o) - - -manutec: $(MANUTEC_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/manutec/Makefile.vc b/PSOPT/examples/manutec/Makefile.vc deleted file mode 100644 index 8cc99282..00000000 --- a/PSOPT/examples/manutec/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: manutec.exe - - -SRC = manutec.cxx \ - $(SNFW_SRC) - -OBJ = manutec.obj \ - $(SNFW_OBJ) - - - -manutec.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:manutec.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/missile/Makefile b/PSOPT/examples/missile/Makefile deleted file mode 100644 index 4600a6bd..00000000 --- a/PSOPT/examples/missile/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -MISSILE = missile $(SNOPT_WRAPPER) - -MISSILE_O = $(MISSILE:%=$(EXAMPLESDIR)/%.o) - - -missile: $(MISSILE_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/missile/Makefile.vc b/PSOPT/examples/missile/Makefile.vc deleted file mode 100644 index 97fccc13..00000000 --- a/PSOPT/examples/missile/Makefile.vc +++ /dev/null @@ -1,17 +0,0 @@ -include ..\Makefile.inc - -all: missile.exe - - -SRC = missile.cxx \ - $(SNFW_SRC) - -OBJ = missile.obj \ - $(SNFW_OBJ) - - - -missile.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:missile.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - diff --git a/PSOPT/examples/moon/Makefile b/PSOPT/examples/moon/Makefile deleted file mode 100644 index fa470433..00000000 --- a/PSOPT/examples/moon/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -MOON = moon $(SNOPT_WRAPPER) - -MOON_O = $(MOON:%=$(EXAMPLESDIR)/%.o) - - -moon: $(MOON_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/moon/Makefile.vc b/PSOPT/examples/moon/Makefile.vc deleted file mode 100644 index 98e95230..00000000 --- a/PSOPT/examples/moon/Makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ -include ..\Makefile.inc - -all: moon.exe - - -SRC = moon.cxx \ - $(SNFW_SRC) - -OBJ = moon.obj \ - $(SNFW_OBJ) - - - - - -moon.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:moon.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/mpec/Makefile b/PSOPT/examples/mpec/Makefile deleted file mode 100644 index 4d1ff85d..00000000 --- a/PSOPT/examples/mpec/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -MPEC = mpec $(SNOPT_WRAPPER) - -MPEC_O = $(MPEC:%=$(EXAMPLESDIR)/%.o) - - -mpec: $(MPEC_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/mpec/Makefile.vc b/PSOPT/examples/mpec/Makefile.vc deleted file mode 100644 index d9cae9af..00000000 --- a/PSOPT/examples/mpec/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: mpec.exe - - -SRC = mpec.cxx \ - $(SNFW_SRC) - -OBJ = mpec.obj \ - $(SNFW_OBJ) - - - -mpec.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:mpec.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/notorious/Makefile b/PSOPT/examples/notorious/Makefile deleted file mode 100644 index a3dd1698..00000000 --- a/PSOPT/examples/notorious/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -NOTORIOUS = notorious $(SNOPT_WRAPPER) - -NOTORIOUS_O = $(NOTORIOUS:%=$(EXAMPLESDIR)/%.o) - - -notorious: $(NOTORIOUS_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/notorious/Makefile.vc b/PSOPT/examples/notorious/Makefile.vc deleted file mode 100644 index 1980460f..00000000 --- a/PSOPT/examples/notorious/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: notorious.exe - - -SRC = notorious.cxx \ - $(SNFW_SRC) - -OBJ = notorious.obj \ - $(SNFW_OBJ) - - - - - - -notorious.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:notorious.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/obstacle/Makefile b/PSOPT/examples/obstacle/Makefile deleted file mode 100644 index 237dec4a..00000000 --- a/PSOPT/examples/obstacle/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -OBSTACLE = obstacle $(SNOPT_WRAPPER) - -OBSTACLE_O = $(OBSTACLE:%=$(EXAMPLESDIR)/%.o) - - -obstacle: $(OBSTACLE_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/obstacle/Makefile.vc b/PSOPT/examples/obstacle/Makefile.vc deleted file mode 100644 index 2cfe2101..00000000 --- a/PSOPT/examples/obstacle/Makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ -include ..\Makefile.inc - -all: obstacle.exe - - -SRC = obstacle.cxx \ - $(SNFW_SRC) - -OBJ = obstacle.obj \ - $(SNFW_OBJ) - - - - -obstacle.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:obstacle.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/rayleigh/Makefile b/PSOPT/examples/rayleigh/Makefile deleted file mode 100644 index 87cc369c..00000000 --- a/PSOPT/examples/rayleigh/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -RAYLEIGH = rayleigh $(SNOPT_WRAPPER) - -RAYLEIGH_O = $(RAYLEIGH:%=$(EXAMPLESDIR)/%.o) - - -rayleigh: $(RAYLEIGH_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/rayleigh/Makefile.vc b/PSOPT/examples/rayleigh/Makefile.vc deleted file mode 100644 index f944ae8a..00000000 --- a/PSOPT/examples/rayleigh/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: rayleigh.exe - - -SRC = rayleigh.cxx \ - $(SNFW_SRC) - -OBJ = rayleigh.obj \ - $(SNFW_OBJ) - - - - - - -rayleigh.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:rayleigh.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/reorientation/Makefile b/PSOPT/examples/reorientation/Makefile deleted file mode 100755 index 293ac5d9..00000000 --- a/PSOPT/examples/reorientation/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -REORIENTATION = reorientation $(SNOPT_WRAPPER) - -REORIENTATION_O = $(REORIENTATION:%=$(EXAMPLESDIR)/%.o) - - -reorientation: $(REORIENTATION_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/reorientation/Makefile.vc b/PSOPT/examples/reorientation/Makefile.vc deleted file mode 100644 index 4ba73a36..00000000 --- a/PSOPT/examples/reorientation/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: reorientation.exe - - -SRC = reorientation.cxx \ - $(SNFW_SRC) - -OBJ = reorientation.obj \ - $(SNFW_OBJ) - - - - - - -reorientation.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:reorientation.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/shutt/Makefile b/PSOPT/examples/shutt/Makefile deleted file mode 100644 index dd1e18c0..00000000 --- a/PSOPT/examples/shutt/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -SHUTT = shuttle_reentry1 $(SNOPT_WRAPPER) - -SHUTT_O = $(SHUTT:%=$(EXAMPLESDIR)/%.o) - - -shutt: $(SHUTT_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/shutt/Makefile.vc b/PSOPT/examples/shutt/Makefile.vc deleted file mode 100644 index a66bb4e4..00000000 --- a/PSOPT/examples/shutt/Makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ -include ..\Makefile.inc - -all: shutt.exe - - -SRC = shuttle_reentry1.cxx \ - $(SNFW_SRC) - -OBJ = shuttle_reentry1.obj \ - $(SNFW_OBJ) - - - - - -shutt.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:shutt.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/sing5/Makefile b/PSOPT/examples/sing5/Makefile deleted file mode 100644 index 80b684ba..00000000 --- a/PSOPT/examples/sing5/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -SING5 = singular5 $(SNOPT_WRAPPER) - -SING5_O = $(SING5:%=$(EXAMPLESDIR)/%.o) - - -sing5: $(SING5_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/sing5/Makefile.vc b/PSOPT/examples/sing5/Makefile.vc deleted file mode 100644 index 93bcca9f..00000000 --- a/PSOPT/examples/sing5/Makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ -include ..\Makefile.inc - -all: sing5.exe - - -SRC = singular5.cxx \ - $(SNFW_SRC) - -OBJ = singular5.obj \ - $(SNFW_OBJ) - - - - - - -sing5.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:sing5.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/stc1/Makefile b/PSOPT/examples/stc1/Makefile deleted file mode 100644 index be1806dc..00000000 --- a/PSOPT/examples/stc1/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -STC1 = stc1 $(SNOPT_WRAPPER) - -STC1_O = $(STC1:%=$(EXAMPLESDIR)/%.o) - - -stc1: $(STC1_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/stc1/Makefile.vc b/PSOPT/examples/stc1/Makefile.vc deleted file mode 100644 index 12cd0938..00000000 --- a/PSOPT/examples/stc1/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: stc1.exe - - -SRC = stc1.cxx \ - $(SNFW_SRC) - -OBJ = stc1.obj \ - $(SNFW_OBJ) - - - - - -stc1.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:stc1.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - - diff --git a/PSOPT/examples/steps/Makefile b/PSOPT/examples/steps/Makefile deleted file mode 100644 index 06fe3baf..00000000 --- a/PSOPT/examples/steps/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -STEPS = steps $(SNOPT_WRAPPER) - -STEPS_O = $(STEPS:%=$(EXAMPLESDIR)/%.o) - - -steps: $(STEPS_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/steps/Makefile.vc b/PSOPT/examples/steps/Makefile.vc deleted file mode 100644 index 4b5a3627..00000000 --- a/PSOPT/examples/steps/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: steps.exe - - -SRC = steps.cxx \ - $(SNFW_SRC) - -OBJ = steps.obj \ - $(SNFW_OBJ) - - - -steps.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:steps.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/twoburn/Makefile b/PSOPT/examples/twoburn/Makefile deleted file mode 100644 index e03f5b08..00000000 --- a/PSOPT/examples/twoburn/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -TWOBURN = twoburn $(SNOPT_WRAPPER) - -TWOBURN_O = $(TWOBURN:%=$(EXAMPLESDIR)/%.o) - - -twoburn: $(TWOBURN_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/twoburn/Makefile.vc b/PSOPT/examples/twoburn/Makefile.vc deleted file mode 100644 index 7e9f4a13..00000000 --- a/PSOPT/examples/twoburn/Makefile.vc +++ /dev/null @@ -1,20 +0,0 @@ -include ..\Makefile.inc - -all: twoburn.exe - - -SRC = twoburn.cxx \ - $(SNFW_SRC) - -OBJ = twoburn.obj \ - $(SNFW_OBJ) - - - -twoburn.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:twoburn.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/twolink/Makefile b/PSOPT/examples/twolink/Makefile deleted file mode 100644 index 26e137fd..00000000 --- a/PSOPT/examples/twolink/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -TWOLINK = twolinkarm $(SNOPT_WRAPPER) - -TWOLINK_O = $(TWOLINK:%=$(EXAMPLESDIR)/%.o) - - -twolink: $(TWOLINK_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/twolink/Makefile.vc b/PSOPT/examples/twolink/Makefile.vc deleted file mode 100644 index b504ffaa..00000000 --- a/PSOPT/examples/twolink/Makefile.vc +++ /dev/null @@ -1,22 +0,0 @@ -include ..\Makefile.inc - -all: twolink.exe - - -SRC = twolinkarm.cxx \ - $(SNFW_SRC) - -OBJ = twolinkarm.obj \ - $(SNFW_OBJ) - - - - - -twolink.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:twolink.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - diff --git a/PSOPT/examples/twophro/Makefile b/PSOPT/examples/twophro/Makefile deleted file mode 100644 index 1c6ba8d6..00000000 --- a/PSOPT/examples/twophro/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -TWOPHRO = twophase_robot $(SNOPT_WRAPPER) - -TWOPHRO_O = $(TWOPHRO:%=$(EXAMPLESDIR)/%.o) - - -twophro: $(TWOPHRO_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/twophro/Makefile.vc b/PSOPT/examples/twophro/Makefile.vc deleted file mode 100644 index 8a482b5f..00000000 --- a/PSOPT/examples/twophro/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: twophro.exe - - -SRC = twophase_robot.cxx \ - $(SNFW_SRC) - -OBJ = twophase_robot.obj \ - $(SNFW_OBJ) - - - - - -twophro.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:twophro.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - diff --git a/PSOPT/examples/twophsc/Makefile b/PSOPT/examples/twophsc/Makefile deleted file mode 100644 index 1d8a4f02..00000000 --- a/PSOPT/examples/twophsc/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -TWOPHSC = twophase_schwartz $(SNOPT_WRAPPER) - -TWOPHSC_O = $(TWOPHSC:%=$(EXAMPLESDIR)/%.o) - - -twophsc: $(TWOPHSC_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/twophsc/Makefile.vc b/PSOPT/examples/twophsc/Makefile.vc deleted file mode 100644 index 3782c21d..00000000 --- a/PSOPT/examples/twophsc/Makefile.vc +++ /dev/null @@ -1,23 +0,0 @@ -include ..\Makefile.inc - -all: twophsc.exe - - -SRC = twophase_schwartz.cxx \ - $(SNFW_SRC) - -OBJ = twophase_schwartz.obj \ - $(SNFW_OBJ) - - - - - -twophsc.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:twophsc.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/user/Makefile b/PSOPT/examples/user/Makefile deleted file mode 100755 index c2b2f531..00000000 --- a/PSOPT/examples/user/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -USER = user $(SNOPT_WRAPPER) - -USER_O = $(USER:%=$(EXAMPLESDIR)/%.o) - - -user: $(USER_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/user/Makefile.vc b/PSOPT/examples/user/Makefile.vc deleted file mode 100644 index df06a0db..00000000 --- a/PSOPT/examples/user/Makefile.vc +++ /dev/null @@ -1,24 +0,0 @@ -include ..\Makefile.inc - -all: user.exe - - -SRC = user.cxx \ - $(SNFW_SRC) - -OBJ = user.obj \ - $(SNFW_OBJ) - - - - - - -user.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:user.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/examples/zpm/Makefile b/PSOPT/examples/zpm/Makefile deleted file mode 100755 index 351c387a..00000000 --- a/PSOPT/examples/zpm/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../Makefile_linux.inc - -ZPM = zpm $(SNOPT_WRAPPER) - -ZPM_O = $(ZPM:%=$(EXAMPLESDIR)/%.o) - - -zpm: $(ZPM_O) $(PSOPT_LIBS) $(DMATRIX_LIBS) $(SPARSE_LIBS) - $(CXX) $(CXXFLAGS) $^ -o $@ -L$(LIBDIR) $(ALL_LIBRARIES) $(LDFLAGS) - rm -f *.o - diff --git a/PSOPT/examples/zpm/Makefile.vc b/PSOPT/examples/zpm/Makefile.vc deleted file mode 100644 index cb56a568..00000000 --- a/PSOPT/examples/zpm/Makefile.vc +++ /dev/null @@ -1,21 +0,0 @@ -include ..\Makefile.inc - -all: zpm.exe - - -SRC = zpm.cxx \ - $(SNFW_SRC) - -OBJ = zpm.obj \ - $(SNFW_OBJ) - - - -zpm.exe: $(OBJ) $(PSOPT)\lib\libpsopt.lib $(DMATRIX)\lib\libdmatrix.lib - $(LD) -out:zpm.exe $(OBJ) $(LIBS) /NODEFAULTLIB:"LIBC.lib" /DEFAULTLIB:"LIBCMT.lib" - - - - - - diff --git a/PSOPT/lib/Makefile b/PSOPT/lib/Makefile deleted file mode 100644 index 635fb527..00000000 --- a/PSOPT/lib/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -#Usage: make -#add ../lib to LD_LIBRARY_PATH - -SHELL = /bin/sh - -USERHOME = /home/$(shell whoami) - -F2CINC = $(F2CINCLUDE) -F2CLIB = $(F2CLIBRARY) - -DMATRIXDIR=../../dmatrix -CPPEXAMPLESDIR = $(SNOPTDIR)/cppexamples -CXSPARSE=../../SuiteSparse/CXSparse -LUSOL=../../lusol/csrc - -prefix = $(USERHOME)/Ipopt-3.12.12 -# Directory with header files -IPOPTINCDIR = -I${prefix}/Ipopt/src/Interfaces -I${prefix}/Ipopt/src/Common -I${prefix}/Ipopt/src/LinAlg -# Directory with libipopt.a -IPOPTLIBDIR = ${exec_prefix}/lib -exec_prefix = ${prefix} - - -PSOPTSRCDIR = ../src - - -CXX = /usr/bin/g++ -CC = /usr/bin/gcc -CXXFLAGS = -O0 -g -I$(USERHOME)/adolc_base/include -I$(DMATRIXDIR)/include -I$(SNOPTDIR)/cppexamples -I$(PSOPTSRCDIR) -DLAPACK -DUNIX -DSPARSE_MATRIX -DUSE_IPOPT -I$(CXSPARSE)/Include -I$(CXSPARSE)/../SuiteSparse_config -I$(LUSOL) $(IPOPTINCDIR) -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -fPIC -DHAVE_MALLOC -std=c++11 - -CFLAGS = -O0 -fPIC - - -PSOPTLIB = libpsopt.a - -$(PSOPTLIB): $(PSOPTLIB)($(PSOPTSRCDIR)/psopt.o $(PSOPTSRCDIR)/plot.o $(PSOPTSRCDIR)/util.o $(PSOPTSRCDIR)/pseudospectral.o $(PSOPTSRCDIR)/propagate.o $(PSOPTSRCDIR)/print.o $(PSOPTSRCDIR)/validate.o $(PSOPTSRCDIR)/scaling.o $(PSOPTSRCDIR)/interpolation.o $(PSOPTSRCDIR)/NLP_objective.o $(PSOPTSRCDIR)/NLP_constraints.o $(PSOPTSRCDIR)/mesh.o $(PSOPTSRCDIR)/evaluate.o $(PSOPTSRCDIR)/workspace.o $(PSOPTSRCDIR)/get_numbers.o $(PSOPTSRCDIR)/get_variables.o $(PSOPTSRCDIR)/setup.o $(PSOPTSRCDIR)/solution.o $(PSOPTSRCDIR)/NLP_guess.o $(PSOPTSRCDIR)/NLP_bounds.o $(PSOPTSRCDIR)/NLP_interface.o $(PSOPTSRCDIR)/IPOPT_interface.o $(PSOPTSRCDIR)/derivatives.o $(PSOPTSRCDIR)/trajectories.o $(PSOPTSRCDIR)/SNOPT_interface.o $(PSOPTSRCDIR)/user_functions.o $(PSOPTSRCDIR)/integrate.o $(PSOPTSRCDIR)/phases.o $(PSOPTSRCDIR)/parameter_estimation.o) - - -clean: - rm -f *.o - -distclean: - rm -f *.a - - -$(PSOPTSRCDIR)/%.o : $(PSOPTSRCDIR)/%.cxx - $(CXX) -c $(CXXFLAGS) $< -o $@ - -$(DMATRIXDIR)/src/%.o : $(DMATRIXDIR)/src/%.cxx - $(CXX) -c $(CXXFLAGS) $< -o $@ - diff --git a/PSOPT/lib/Makefile.vc b/PSOPT/lib/Makefile.vc deleted file mode 100755 index f2cfcdb2..00000000 --- a/PSOPT/lib/Makefile.vc +++ /dev/null @@ -1,60 +0,0 @@ -CXX = cl - -CC = cl - -AR = lib - -CFLAGS = -DWIN32 -DLAPACK -DSPARSE_MATRIX -DUSE_IPOPT -D_CRT_ERRNO_DEFINED - -BASE = ..\.. - -DMATRIX = $(BASE)\dmatrix - -LUSOL = $(BASE)\lusol\csrc - -CXSPARSE = $(BASE)\CXSparse - -ADOLC = C:\ADOL-C-2.1.12\ADOL-C\ - -IPOPT = C:\Ipopt-3.9.3 - -include ..\..\MicrosoftVisualStudio.inc - -PSOPT = $(BASE)\PSOPT - -INCLUDE = -I$(PSOPT)\src -I$(DMATRIX)\include -I$(BASE)\CXSparse\Include -I$(LUSOL) -I$(IPOPT)\include\coin -I$(IPOPT)\Ipopt\src\Interfaces -I$(IPOPT)\Ipopt\src\Common -I$(IPOPT)\BuildTools\headers -I$(IPOPT)\Ipopt\src\LinAlg -I$(ADOLC) -I$(ADOLC)\adolc -I$(ADOLC)\adolc\drivers -I$(ADOLC)\adolc\sparse -I$(VCINCLUDE) -I$(VCSDK) - - -all: libpsopt.lib - -SRC = $(PSOPT)\src\psopt.cxx \ - - -OBJ = $(PSOPT)\src\psopt.obj \ - - -.cxx.obj: - $(CXX) -c $(CFLAGS) $(INCLUDE) %s /Fo$*.obj - -.c.obj: - $(CC) -c $(CFLAGS) $(INCLUDE) %s /Fo$*.obj - -$(PSOPT)\src\psopt.obj: $(PSOPT)\src\psopt.cxx - $(CXX) -c $(CFLAGS) $(INCLUDE) %s /Fo$*.obj - -$(DMATRIX)\src\dmatrixv.obj: $(DMATRIX)\src\dmatrixv.cxx - $(CXX) -c $(CFLAGS) $(INCLUDE) %s /Fo$*.obj - -libpsopt.lib: $(OBJ) - $(AR) -out:libpsopt.lib $(OBJ) - - -clean: - del ..\src\*.obj - -distclean: - del *.lib - - - - diff --git a/dmatrix/LICENSE.txt b/dmatrix/LICENSE.txt deleted file mode 100644 index 469441c4..00000000 --- a/dmatrix/LICENSE.txt +++ /dev/null @@ -1,460 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - diff --git a/dmatrix/README b/dmatrix/README deleted file mode 100644 index 72ece995..00000000 --- a/dmatrix/README +++ /dev/null @@ -1,31 +0,0 @@ - -This is the DMatrix library, a software tool for computational linear algebra. - -Full documentation can be found in ./doc/html/index.html - -Copyright (C) 2009 Victor M. Becerra - - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA, -or visit http://www.gnu.org/licenses/ - -Author: Dr. Victor M. Becerra - University of Reading - School of Systems Engineering - P.O. Box 225, Reading RG6 6AY - United Kingdom - e-mail: v.m.becerra@reading.ac.uk - - diff --git a/dmatrix/doc/DMatrix_Class_Reference.pdf b/dmatrix/doc/DMatrix_Class_Reference.pdf deleted file mode 100644 index d12080c2..00000000 Binary files a/dmatrix/doc/DMatrix_Class_Reference.pdf and /dev/null differ diff --git a/dmatrix/doc/html/annotated.html b/dmatrix/doc/html/annotated.html deleted file mode 100644 index d2b73b2f..00000000 --- a/dmatrix/doc/html/annotated.html +++ /dev/null @@ -1,63 +0,0 @@ - - -
- -
- DMatrix and SparseMatrix C++ classes
- |
-
alist | |
cilist | |
cllist | |
complex | |
DMatrix | DMatrix class |
doublecomplex | |
ErrorHandler | ErrorHandler class |
icilist | |
InitializeDMatrixClass | InitializeDMatrixClass class |
inlist | |
Multitype | |
Namelist | |
olist | |
Vardesc |
- DMatrix and SparseMatrix C++ classes
- |
-
a | DMatrix | [protected] |
Abs(const DMatrix &A) | DMatrix | [friend] |
Allocate(long size) | DMatrix | [protected] |
AllocateAuxArr(void) | DMatrix | [static] |
allocated | DMatrix | [protected] |
any(const DMatrix &A) | DMatrix | [friend] |
asize | DMatrix | [protected] |
assign(long rows, long columns, double a11,...) | DMatrix | |
AssignmentToColonReference(const DMatrix &A) | DMatrix | [protected] |
AssignmentToColonReference(double arg) | DMatrix | [protected] |
atype | DMatrix | [protected] |
auxFlag | DMatrix | [protected] |
auxIndx | DMatrix | [protected, static] |
auxPr | DMatrix | [protected, static] |
ChkAuxArrays() | DMatrix | [protected, static] |
Chol(const DMatrix &A) | DMatrix | [friend] |
CholeskyDecomp(DMatrix &A, int n, DMatrix &pM) | DMatrix | [friend] |
CholeskyRoot(const DMatrix &A) | DMatrix | [friend] |
CholeskySolution(const DMatrix &A, int n, const DMatrix &pM, const DMatrix &bM, DMatrix &xM) | DMatrix | [friend] |
CholFSolve(const DMatrix &Achol, const DMatrix &b) | DMatrix | [friend] |
CholSolve(const DMatrix &A, const DMatrix &b) | DMatrix | [friend] |
colIndx | DMatrix | [protected] |
colMult(long c, double x) | DMatrix | |
colon(double i1, double increment, double i2) | DMatrix | [friend] |
colon(int i1, int increment, int i2) | DMatrix | [friend] |
colon(int i1, int i2) | DMatrix | [friend] |
colon(double i1, double i2) | DMatrix | [friend] |
colon(void) | DMatrix | [friend] |
Column(long icol) const | DMatrix | |
compMat(const DMatrix &m2, char op) const | DMatrix | [protected] |
cond(const DMatrix &A) | DMatrix | [friend] |
cos(const DMatrix &A) | DMatrix | [friend] |
cosh(const DMatrix &A) | DMatrix | [friend] |
cov(const DMatrix &A, int ntype=0) | DMatrix | [friend] |
cov(DMatrix &X, DMatrix &Y, int ntype=0) | DMatrix | [friend] |
cross(const DMatrix &x, const DMatrix &y) | DMatrix | [friend] |
crossProduct(const DMatrix &x, const DMatrix &y) | DMatrix | [friend] |
DeAllocate() | DMatrix | [protected] |
DeAllocateAuxArr(void) | DMatrix | [static] |
DecrementAuxIndx() | DMatrix | [inline, protected, static] |
det(const DMatrix &A) | DMatrix | [friend] |
diag(const DMatrix &dd) | DMatrix | |
diag(const DMatrix &A) | DMatrix | [friend] |
dimAux | DMatrix | [protected, static] |
DMatrix(void) | DMatrix | |
DMatrix(long Initn, long Initm) | DMatrix | |
DMatrix(long vDim, double *v, long Initn, long Initm) | DMatrix | |
DMatrix(long Initn) | DMatrix | |
DMatrix(long Initn, long Initm, double a11,...) | DMatrix | |
DMatrix(const DMatrix &A) | DMatrix | |
dot(const DMatrix &x, const DMatrix &y) | DMatrix | [friend] |
dotProduct(const DMatrix &x, const DMatrix &y) | DMatrix | [friend] |
eig(const DMatrix &A, DMatrix *V=NULL) | DMatrix | [friend] |
elem(long i, long j) | DMatrix | [inline] |
elem(long i, long j) const | DMatrix | [inline] |
elemDivision(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
element(long i, long j) | DMatrix | |
elemProduct(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
enorm(const DMatrix &A) | DMatrix | [friend] |
error_message(const char *input_text) | DMatrix | [friend] |
errorFlag | DMatrix | [protected, static] |
exp(const DMatrix &A) | DMatrix | [friend] |
expm(const DMatrix &A) | DMatrix | [friend] |
eye(long n) | DMatrix | [friend] |
eye(long n, long m) | DMatrix | [friend] |
FillWithZeros(void) | DMatrix | |
find(DMatrix &I, DMatrix &J) const | DMatrix | |
find(int *I, int *J) const | DMatrix | |
find(const DMatrix &A) | DMatrix | [friend] |
Fnorm(const DMatrix &A) | DMatrix | [friend] |
Fprint(FILE *filex) | DMatrix | |
geta() | DMatrix | [inline] |
getatype() | DMatrix | [inline] |
GetAuxFlag() | DMatrix | [inline, protected] |
GetAuxIndx() | DMatrix | [inline, protected, static] |
GetAuxPr(void) | DMatrix | [inline, static] |
GetConstPr() const | DMatrix | [inline] |
GetDimAux() | DMatrix | [inline, protected, static] |
GetEPS() | DMatrix | [inline, static] |
GetInitFlag() | DMatrix | [inline, protected, static] |
getm() | DMatrix | [inline] |
getm() const | DMatrix | [inline] |
GetMemberFlag() | DMatrix | [inline, protected, static] |
GetMType() | DMatrix | [inline, protected] |
getn() | DMatrix | [inline] |
getn() const | DMatrix | [inline] |
GetNoAuxArr() | DMatrix | [inline, protected, static] |
GetNoCols() | DMatrix | [inline] |
GetNoCols() const | DMatrix | [inline] |
GetNoRows() | DMatrix | [inline] |
GetNoRows() const | DMatrix | [inline] |
GetPr() | DMatrix | [inline] |
GetReferencedDMatrixPointer() | DMatrix | [inline, protected] |
GetStartTicks(void) | DMatrix | [inline, protected, static] |
GetTempPr(int i) | DMatrix | [protected, static] |
identity(long n) | DMatrix | [friend] |
identity(long n, long m) | DMatrix | [friend] |
IncrementAuxIndx() | DMatrix | [inline, protected, static] |
InfNorm(const DMatrix &A) | DMatrix | [friend] |
initFlag | DMatrix | [protected, static] |
input_matrix() | DMatrix | |
inv(const DMatrix &A) | DMatrix | [friend] |
isEmpty() | DMatrix | [inline] |
isSymmetric(const DMatrix &A) | DMatrix | [friend] |
isThereError(void) | DMatrix | [inline, static] |
isVector() const | DMatrix | [inline] |
kronProduct(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
length(const DMatrix &A) | DMatrix | [friend] |
linspace(double X1, double X2, long N) | DMatrix | [friend] |
Load(const char *FileName) | DMatrix | |
log(const DMatrix &A) | DMatrix | [friend] |
LQ(const DMatrix &A, DMatrix *Q) | DMatrix | [friend] |
LSMNSolve(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
LU(const DMatrix &A) | DMatrix | [friend] |
LUFSolve(const DMatrix &ALU, const DMatrix &b) | DMatrix | [friend] |
LUSolve(const DMatrix &A, const DMatrix &b) | DMatrix | [friend] |
m | DMatrix | [protected] |
MACH_EPS | DMatrix | [protected, static] |
MatrixSign(const DMatrix &A) | DMatrix | [friend] |
Max(const DMatrix &A, int *rindx=NULL, int *cindx=NULL) | DMatrix | [friend] |
MaxAbs(const DMatrix &A, int *rindx=NULL, int *cindx=NULL) | DMatrix | [friend] |
mean(const DMatrix &A) | DMatrix | [friend] |
memberFlag | DMatrix | [protected, static] |
MemCpyArray(double *aptr) | DMatrix | |
Min(const DMatrix &A, int *rindx=NULL, int *cindx=NULL) | DMatrix | [friend] |
MinAbs(const DMatrix &A, int *rindx=NULL, int *cindx=NULL) | DMatrix | [friend] |
mpow(int p) | DMatrix | |
mpow(DMatrix &A, int p) | DMatrix | [friend] |
mt | DMatrix | [protected] |
mtype | DMatrix | [protected] |
n | DMatrix | [protected] |
noAuxArr | DMatrix | [protected, static] |
norm(const DMatrix &A) | DMatrix | [friend] |
null(const DMatrix &A) | DMatrix | [friend] |
ones(long n, long m) | DMatrix | [friend] |
operator!=(double val) const | DMatrix | |
operator!=(const DMatrix &val) const | DMatrix | |
operator%(const DMatrix &rval) const | DMatrix | |
operator&(const DMatrix B) const | DMatrix | |
operator&&(const DMatrix &B) const | DMatrix | |
operator()(long row, long col) | DMatrix | |
operator()(long row, const char *end) | DMatrix | |
operator()(const char *end, long col) | DMatrix | |
operator()(long row, long col) const | DMatrix | |
operator()(long row, const char *end) const | DMatrix | |
operator()(const char *end, long col) const | DMatrix | |
operator()(long index) | DMatrix | |
operator()(const char *end) | DMatrix | |
operator()(long k) const | DMatrix | |
operator()(const char *end) const | DMatrix | |
operator()(const DMatrix &RowIndx, const DMatrix &ColIndx) | DMatrix | |
operator()(const DMatrix &RowIndx) | DMatrix | |
operator()(const DMatrix &RowIndx, long col) | DMatrix | |
operator()(long row, const DMatrix &ColIndx) | DMatrix | |
operator()(const DMatrix &RowIndx, const char *end) | DMatrix | |
operator()(const char *end, const DMatrix &ColIndx) | DMatrix | |
operator*(const DMatrix &rval) const | DMatrix | |
operator*(double Arg) const | DMatrix | |
operator*(double r, const DMatrix &A) | DMatrix | [friend] |
operator*=(const DMatrix &rval) | DMatrix | |
operator*=(double Arg) | DMatrix | |
operator+(const DMatrix &rval) const | DMatrix | |
operator+(double x) const | DMatrix | |
operator+=(const DMatrix &rval) | DMatrix | |
operator-(const DMatrix &rval) const | DMatrix | |
operator-(double x) const | DMatrix | |
operator-(const DMatrix &A) | DMatrix | [friend] |
operator-=(const DMatrix &rval) | DMatrix | |
operator/(double Arg) const | DMatrix | |
operator/(const DMatrix &rval) const | DMatrix | |
operator/=(double Arg) | DMatrix | |
operator<(double val) const | DMatrix | |
operator<(const DMatrix &val) const | DMatrix | |
operator<=(double val) const | DMatrix | |
operator<=(const DMatrix &val) const | DMatrix | |
operator=(const DMatrix &rval) | DMatrix | |
operator=(double val) | DMatrix | |
operator=(const char *str) | DMatrix | |
operator==(double val) const | DMatrix | |
operator==(const DMatrix &val) const | DMatrix | |
operator>(double val) const | DMatrix | |
operator>(const DMatrix &val) const | DMatrix | |
operator>=(double val) const | DMatrix | |
operator>=(const DMatrix &val) const | DMatrix | |
operator^(double x) | DMatrix | |
operator|(const DMatrix B) const | DMatrix | |
operator||(const DMatrix &B) const | DMatrix | |
orth(const DMatrix &A) | DMatrix | [friend] |
pinv(const DMatrix &A) | DMatrix | [friend] |
Print(const char *text) const | DMatrix | |
print_level | DMatrix | [protected, static] |
PrintInfo(const char *text) const | DMatrix | |
PrintLevel() (defined in DMatrix) | DMatrix | [static] |
prod(const DMatrix &A) | DMatrix | [friend] |
Product(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
ProductT(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
QR(const DMatrix &A) | DMatrix | [friend] |
QRFSolve(const DMatrix &A, const DMatrix &b) | DMatrix | [friend] |
QRSolve(const DMatrix &A, const DMatrix &b) | DMatrix | [friend] |
randn(long n, long m) | DMatrix | [friend] |
random_gaussian(void) | DMatrix | [static] |
random_uniform(void) | DMatrix | [static] |
randu(long n, long m) | DMatrix | [friend] |
rank(const DMatrix &A) | DMatrix | [friend] |
rcond(const DMatrix &A) | DMatrix | [friend] |
Read(FILE *filex) | DMatrix | |
reshape(DMatrix &A, long N, long M) | DMatrix | [friend] |
Resize(long nnrow, long nncol) | DMatrix | |
RiseErrorFlag() | DMatrix | [inline, protected, static] |
Row(long irow) const | DMatrix | |
rowIndx | DMatrix | [protected] |
rowMult(long r, double x) | DMatrix | |
Save(const char *FileName) | DMatrix | |
schur(const DMatrix &A, DMatrix *U=NULL) | DMatrix | [friend] |
seed | DMatrix | [protected, static] |
SetAuxFlag(int arg) | DMatrix | [inline, protected] |
SetAuxIndx(int i) | DMatrix | [inline, protected, static] |
SetColIndexPointer(const DMatrix *arg) | DMatrix | [inline, protected] |
SetColumn(const DMatrix &Col, int icol) | DMatrix | |
SetDimAux(long dd) | DMatrix | [inline, protected, static] |
SetInitFlag(int arg) | DMatrix | [inline, protected, static] |
SetMemberFlag(int arg) | DMatrix | [inline, protected, static] |
SetMType(int arg) | DMatrix | [protected] |
SetNoAuxArr(int nn) | DMatrix | [inline, protected, static] |
SetPrintLevel(int plevel) | DMatrix | [static] |
SetReferencedDMatrixPointer(DMatrix *arg) | DMatrix | [inline, protected] |
SetRow(const DMatrix &Row, int irow) | DMatrix | |
SetRowIndexPointer(const DMatrix *arg) | DMatrix | [inline, protected] |
SetStartTicks(clock_t st) | DMatrix | [inline, protected, static] |
SetSubMatrix(long row, long col, const DMatrix &A) | DMatrix | |
sin(const DMatrix &A) | DMatrix | [friend] |
sinh(const DMatrix &A) | DMatrix | [friend] |
sort(DMatrix &x, int indx[]=NULL) | DMatrix | [friend] |
sort(DMatrix &x, DMatrix &indx) | DMatrix | [friend] |
Sqrt(const DMatrix &A) | DMatrix | [friend] |
start_clock | DMatrix | [protected, static] |
start_time | DMatrix | [protected, static] |
Std(const DMatrix &A, int ntype=0) | DMatrix | [friend] |
stream | DMatrix | [protected, static] |
sub_matrix(long r1, long r2, long c1, long c2) const | DMatrix | |
sum(const DMatrix &A) | DMatrix | [friend] |
SVD(const DMatrix &A, DMatrix *U=NULL, DMatrix *V=NULL) | DMatrix | [friend] |
SVDSolve(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
SwapColumns(int i, int j) | DMatrix | |
SwapRows(int i, int j) | DMatrix | |
tan(const DMatrix &A) | DMatrix | [friend] |
tanh(const DMatrix &A) | DMatrix | [friend] |
tic(void) | DMatrix | [friend] |
toc() | DMatrix | [friend] |
TProduct(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
TProductT(const DMatrix &A, const DMatrix &B) | DMatrix | [friend] |
tra(const DMatrix &A) | DMatrix | [friend] |
trace(const DMatrix &A) | DMatrix | [friend] |
Transpose(void) | DMatrix | |
triu(const DMatrix &A) | DMatrix | [friend] |
var(DMatrix &A, int ntype=0) | DMatrix | [friend] |
vec(const DMatrix &A) | DMatrix | [friend] |
zeros(long n, long m) | DMatrix | [friend] |
~DMatrix() | DMatrix |
- DMatrix and SparseMatrix C++ classes
- |
-
#include <dmatrixv.h>
-Public Member Functions | |
void | input_matrix () |
Allows the user to enter the elements of a matrix using command line prompts. | |
void | Print (const char *text) const |
Prints the elements of a DMatrix object. | |
void | PrintInfo (const char *text) const |
Prints information about a DMatrix object. | |
void | Read (FILE *filex) |
Reads the elements of a matrix from a file. | |
void | Save (const char *FileName) |
Saves the elements of a matrix to a file. | |
void | Load (const char *FileName) |
Reads the elements of a matrix from a file. | |
void | Fprint (FILE *filex) |
Prints the elements of a matrix elements matrix to a file. | |
void | FillWithZeros (void) |
Assigns a zero value to each element of a matrix. | |
void | SwapRows (int i, int j) |
Swaps two rows of a matrix. | |
void | SwapColumns (int i, int j) |
Swaps two columns of a matrix. | |
void | Transpose (void) |
Transposes a matrix. | |
void | diag (const DMatrix &dd) |
Assigns values to the diagonal elements of a matrix, while all off-diagonal elements are set to zero. | |
void | SetColumn (const DMatrix &Col, int icol) |
Assigns values to a column of a matrix, while other columns are left untouched. | |
void | SetRow (const DMatrix &Row, int irow) |
Assigns values to a row of a matrix, while other columns are left untouched. | |
void | colMult (long c, double x) |
Multiples the elements of a specified column of a matrix by a constant scalar value. | |
void | rowMult (long r, double x) |
Multiples the elements of a specified row of a matrix by a constant scalar value. | |
DMatrix & | find (DMatrix &I, DMatrix &J) const |
Finds non-zero values of a matrix. | |
DMatrix & | find (int *I, int *J) const |
Finds non-zero values of a matrix. | |
DMatrix & | sub_matrix (long r1, long r2, long c1, long c2) const |
Extracts a specified sub-matrix from a matrix. | |
void | SetSubMatrix (long row, long col, const DMatrix &A) |
Assigns the elements of a matrix object to a section of the calling object. | |
long | getn () |
Gets the number of rows from the calling object. | |
long | getm () |
Gets the number of columns from the calling object. | |
long | getn () const |
Gets the number of rows from the calling object. | |
long | getm () const |
Gets the number of columns from the calling object. | |
long | GetNoRows () |
Gets the number of rows from the calling object. | |
long | GetNoRows () const |
Gets the number of rows from the calling object. | |
long | GetNoCols () |
Gets the number of columns from the calling object. | |
long | GetNoCols () const |
Gets the number of columns from the calling object. | |
double * | GetPr () |
Gets the pointer to the array where the elements of the matrix are stored. | |
double * | GetConstPr () const |
Gets a pointer to the array where the elements of the matrix are stored (for const objects) | |
double * | geta () |
Gets a pointer to the array where the elements of the matrix are stored. | |
int | getatype () |
Gets the type of element storage of a matrix. | |
int | isEmpty () |
Check if a matrix object is empty, if other words this method checks if the calling object has zero elements. | |
int | isVector () const |
Check if a matrix object contains a row or column vector. | |
double | element (long i, long j) |
Returns the value of a specified element of a matrix. | |
double & | elem (long i, long j) |
Returns a reference to the specified element of a matrix. | |
double | elem (long i, long j) const |
Returns the value of a specified element of a matrix. | |
DMatrix & | Column (long icol) const |
Returns a DMatrix object containing a speficied column of the calling object. | |
DMatrix & | Row (long irow) const |
Returns a DMatrix object containing a speficied row of the calling object. | |
DMatrix & | mpow (int p) |
Computes and returns the integer power of a matrix. | |
- | DMatrix (void) |
Default constructor. Creates an empty matrix. | |
DMatrix (long Initn, long Initm) | |
Constructor with dimensions. Creates a matrix with allocated storage given specified numbers of rows and columns. | |
DMatrix (long vDim, double *v, long Initn, long Initm) | |
Constructor with dimensions using pre-allocated storage. | |
DMatrix (long Initn) | |
Constructor with a single dimension, creates a column vector. | |
DMatrix (long Initn, long Initm, double a11,...) | |
Constructor using a variable list of element values. | |
DMatrix (const DMatrix &A) | |
Copy constructor. Creates a new DMatrix object with the same dimensions and element values as a given DMatrix object. | |
- | ~DMatrix () |
Destructor. Destroys a previously created DMatrix object and frees any allocated memory. | |
void | Resize (long nnrow, long nncol) |
Changes the number of rows and columns of an existing matrix. Allocates new memory if necessary. If the calling object uses preallocated memory and the requested size would exceed that memory, an error is thrown. | |
void | assign (long rows, long columns, double a11,...) |
Assigns values to the elements of an existing DMatrix object using a variable list of values. Resizes the matrix if necessary. | |
void | MemCpyArray (double *aptr) |
Copies values to the elements of a DMatrix object from an existing array. The number of elements of the DMatrix object is assumed to be the number of values to be copied. | |
DMatrix & | operator+ (const DMatrix &rval) const |
Matrix addition operator. The sizes of the matrices being added should be the same, otherwise an error is thrown. | |
DMatrix & | operator+= (const DMatrix &rval) |
Matrix addition and substitution operator. The sizes of the matrices being added should be the same, otherwise an error is thrown.The left hand side object elements are replaced with the result of the operation. | |
DMatrix & | operator+ (double x) const |
Adds a scalar real value to each element of the matrix. . | |
DMatrix & | operator-= (const DMatrix &rval) |
Matrix subtraction and substitution operator. The sizes of the matrices being subtracted should be the same, otherwise an error is thrown.The left hand side object elements are replaced with the result of the operation. | |
DMatrix & | operator- (const DMatrix &rval) const |
Matrix subtraction operator. The sizes of the matrices being subtracted should be the same, otherwise an error is thrown. | |
DMatrix & | operator- (double x) const |
Subtracts a scalar real value from each element of the matrix. . | |
DMatrix & | operator* (const DMatrix &rval) const |
Matrix product operator. Returns the result of the matrix product of the calling object (left hand side of the operator) and the right hand side object. The inner dimensions of the objects being multiplied should be consistent, otherwise an error will be thrown. | |
DMatrix & | operator*= (const DMatrix &rval) |
Matrix product operator with substitution. Computes the matrix product of the calling object (left hand side of the operator) and the right hand side object. The inner dimensions of the objects being multiplied should be consistent, otherwise an error will be thrown. The calling object is modified to store the results of the operation. | |
DMatrix & | operator* (double Arg) const |
Computes the product of a matrix (left hand side of the operator) times a real scalar (right hand side value) and replaces the left hand side object with the result of the operation. | |
DMatrix & | operator*= (double Arg) |
Computes the product of a matrix (left hand side of the operator) times a real scalar (right hand side value), and modifies the calling object to store the result of the operation. | |
DMatrix & | operator/ (double Arg) const |
Computes the division of a matrix (left hand side of the operator) by a real scalar (right hand side value). | |
DMatrix & | operator/ (const DMatrix &rval) const |
Computes the right division of a matrix (left hand side of the operator) by another matrix (right hand side value). This is conceptually equivalent to multiplying the left object by the inverse of the right hand side object but it is computed in a more efficient way. The dimensions of the matrices must be consistent, otherwise an error is returned. The right hand side object must be a square matrix. | |
DMatrix & | operator% (const DMatrix &rval) const |
Computes the left division of a matrix (left hand side of the operator) by another matrix (right hand side value). This is conceptually equivalent to multiplying the inverse of the left object by the right hand side object but it is computed in a more efficient way. The dimensions of the matrices must be consistent, otherwise an error is returned. The left hand side object must be a square matrix. | |
DMatrix & | operator/= (double Arg) |
Computes the division of a matrix (left hand side of the operator) by a real scalar (right hand side value) and modifies the left hand side object with the result of the operation. | |
DMatrix & | operator= (const DMatrix &rval) |
Matrix assignment. The size of the left hand side object is modified if necessary, and the values of all real elements of the right hand side object and copied to the left hand side object. | |
DMatrix & | operator= (double val) |
Matrix assignment to a scalar. The size of the left hand side object is modified to one row by one column if necessary, and the value of the right hand side argument is copied to the single element of the matrix. If the calling object is a "colon reference" matrix, then the right hand side value is copied to each element of the referenced array elements. | |
DMatrix & | operator= (const char *str) |
Matrix assignment to a constant matrix defined as a character string using the bracket notation used in Matlab and Octave. The size of the left hand side object is modified if necessary. For example, the identity matrix of size two by two would be entered as "[1.0 0.0;0.0 1.0]". | |
DMatrix & | operator|| (const DMatrix &B) const |
Concatenates two matrices side by side. The dimensions number of rows of the matrices involved must be the same, otherwise an error is thrown. The number of columns of the resulting matrix is the addition of the number of columns of both matrices involved. | |
DMatrix & | operator&& (const DMatrix &B) const |
Stacks the right hand side matrix below the left hand side matrix. The dimensions number of columns of the matrices involved must be the same, otherwise an error is thrown. The number of rows of the resulting matrix is the addition of the number of rows of both matrices involved. | |
DMatrix & | operator^ (double x) |
Elementwise power operator. Returns a DMatrix object with the same dimensions of the calling object and each of its elements is computed as the corresponding element of the calling object to the power of the right hand side argument. Care must be taken when using this operator as the associations do not work in the same way as with the * operator. It is highly recommended to use parenthesis every time this operator is used. For example use it as follows: (A^x). | |
DMatrix & | operator& (const DMatrix B) const |
Elementwise product operator. Returns a DMatrix object with the same dimensions of the calling objects and each of its elements is computed as the product of the corresponding elements of the calling object and the right hand side object. The dimensions of the calling objects must be the same, otherwise an error is thrown. Care must be taken when using this operator as the associations do not work in the same way as with the * operator. It is highly recommended to use parenthesis every time this operator is used. For example use it as follows: (A&B). | |
DMatrix & | operator| (const DMatrix B) const |
Elementwise division operator. Returns a DMatrix object with the same dimensions of the calling objects and each of its elements is computed as the of the corresponding element of the calling object by the corresponding element of the right hand side object. The dimensions of the calling objects must be the same, otherwise an error is thrown. Care must be taken when using this operator as the associations do not work in the same way as with the / operator. It is highly recommended to use parenthesis every time this operator is used. For example use it as follows: (A|B). | |
double & | operator() (long row, long col) |
Matrix indexing. Returns a reference to the matrix element located at the position indicated by the row and column indices. Indices start from 1. | |
double & | operator() (long row, const char *end) |
Matrix indexing. Returns a reference to the matrix element located at the position indicated by the row index and the last column. Indices start from 1. An error in thrown in case of zero or negative indices. The matrix is resized if necessary. | |
double & | operator() (const char *end, long col) |
Matrix indexing. Returns a reference to the matrix element located at the position indicated by the column index and the last row. Indices start from 1. An error in thrown in case of a range violation. | |
double | operator() (long row, long col) const |
Matrix indexing. Returns the value of the matrix element located at the position indicated by the row and column indices. Indices start from 1. An error in thrown in case of a range violation. | |
double | operator() (long row, const char *end) const |
Matrix indexing. Returns the value of the matrix element located at the position indicated by the row index and the last column. Indices start from 1. An error in thrown in case of a range violation. | |
double | operator() (const char *end, long col) const |
Matrix indexing. Returns the value of the matrix element located at the position indicated by the column index and the last row. Indices start from 1. An error in thrown in case of a range violation. | |
double & | operator() (long index) |
Single index matrix indexing. Returns a reference to the matrix element located at the linear position indicated by the index, assuming column major storage. The indexs start from 1. The matrix is resized if necessary. An error is thrown in case of zero or negative indices. | |
double & | operator() (const char *end) |
Access to last linear element. Returns a reference to the last linear matrix element, assuming column major storage. | |
double | operator() (long k) const |
Single index matrix indexing. Returns the value of the matrix element located at the linear position indicated by the index, assuming column major storage. The index starts from 1. An error is thrown in case of range error. | |
double | operator() (const char *end) const |
Access to last linear element. Returns the value of the last linear matrix element, assuming column major storage. | |
DMatrix & | operator> (double val) const |
Checks if each element of the DMatrix object on the left hand side is greater than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. | |
DMatrix & | operator< (double val) const |
Checks if each element of the DMatrix object on the left hand side is lower than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. | |
DMatrix & | operator>= (double val) const |
Checks if each element of the DMatrix object on the left hand side is greater or equal than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. | |
DMatrix & | operator<= (double val) const |
Checks if each element of the DMatrix object on the left hand side is lower or equal than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. | |
DMatrix & | operator== (double val) const |
Checks if each element of the DMatrix object on the left hand side is equal to the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. | |
DMatrix & | operator!= (double val) const |
Checks if each element of the DMatrix object on the left hand side is different from the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. | |
DMatrix & | operator> (const DMatrix &val) const |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is greater than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown. | |
DMatrix & | operator< (const DMatrix &val) const |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is lower than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown. | |
DMatrix & | operator>= (const DMatrix &val) const |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is greater or equal than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown. | |
DMatrix & | operator<= (const DMatrix &val) const |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is lower or equal than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown. | |
DMatrix & | operator== (const DMatrix &val) const |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is equal to the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown. | |
DMatrix & | operator!= (const DMatrix &val) const |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is different from the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown. | |
DMatrix & | operator() (const DMatrix &RowIndx, const DMatrix &ColIndx) |
Submatrix extraction and referencing using arrays of indices. | |
DMatrix & | operator() (const DMatrix &RowIndx) |
Linear sub-vector extraction and referencing using an array of indices assuming column-major storage. | |
DMatrix & | operator() (const DMatrix &RowIndx, long col) |
Sub-vector extraction and referencing using an array of row indices for a given column. | |
DMatrix & | operator() (long row, const DMatrix &ColIndx) |
Sub-vector extraction and referencing using an array of column indices for a given row. | |
DMatrix & | operator() (const DMatrix &RowIndx, const char *end) |
Sub-vector extraction and referencing using an array of row indices for the last column of a matrix. | |
DMatrix & | operator() (const char *end, const DMatrix &ColIndx) |
Sub-vector extraction and referencing using an array of column indices for the last column of a matrix. | |
-Static Public Member Functions | |
static void | AllocateAuxArr (void) |
Allocates the array of auxiliary (temporary) objects used by the class. | |
static void | DeAllocateAuxArr (void) |
De-allocates the array of auxiliary (temporary) objects previously allocated by AllocateAuxArr() | |
static double | random_uniform (void) |
Returns a pseudo-random uniformly distributed number in the range [0,1]. | |
static double | random_gaussian (void) |
Returns a pseudo-random Gaussian distributed number with zero mean and unit variance. | |
static DMatrix ** | GetAuxPr (void) |
Gets a pointer to the array of auxiliary objects. | |
static int | isThereError (void) |
Checks if the error flag has been raised. If so, a 1 is returned, 0 otherwise. | |
static void | SetPrintLevel (int plevel) |
Sets the print level. | |
-static int | PrintLevel () |
-static double | GetEPS () |
This function returns the machine numerical precision. | |
-Protected Member Functions | |
-void | SetAuxFlag (int arg) |
Sets the value of auxFlag. | |
-int | GetAuxFlag () |
Gets the value of auxFlag. | |
void | Allocate (long size) |
Allocate memory to store matrix elements. | |
void | DeAllocate () |
De-allocate memory previously allocated with DMatrix::Allocate(). | |
DMatrix & | compMat (const DMatrix &m2, char op) const |
Elementwise comparison of matrix elements. | |
void | SetReferencedDMatrixPointer (DMatrix *arg) |
Sets the value of the referenced matrix pointer. | |
DMatrix * | GetReferencedDMatrixPointer () |
Gets the value of the referenced matrix pointer. | |
void | SetRowIndexPointer (const DMatrix *arg) |
Sets the row index pointer. | |
void | SetColIndexPointer (const DMatrix *arg) |
Sets the column index pointer. | |
void | SetMType (int arg) |
Sets the type of matrix. | |
int | GetMType () |
Gets the type of matrix. | |
DMatrix & | AssignmentToColonReference (const DMatrix &A) |
Assigns a matrix to the values pointed to by a colon reference matrix. | |
DMatrix & | AssignmentToColonReference (double arg) |
Assigns a double value to each value pointed to by a colon reference matrix. | |
-Static Protected Member Functions | |
-static DMatrix * | GetTempPr (int i) |
returns pointer to the i-th temporary object | |
-static int | GetMemberFlag () |
Gets the memberFlag value from the object. | |
-static void | SetMemberFlag (int arg) |
Sets the memberFlag value. | |
-static void | ChkAuxArrays () |
Checks the auxiliary objects. | |
-static int | GetNoAuxArr () |
Gets the number of temporary objects. | |
-static long | GetDimAux () |
Gets the dimensions of the array of temporary objects. | |
-static int | GetInitFlag () |
Gets the value of initFlag. | |
-static void | SetInitFlag (int arg) |
Sets the value of initFlag. | |
-static int | GetAuxIndx () |
Gets the current index of temporary objects. | |
-static int | IncrementAuxIndx () |
Increments the index of temporary objects. | |
-static int | DecrementAuxIndx () |
Decrements the index of temporary objects. | |
-static void | SetAuxIndx (int i) |
Sets the index of temporary objects. | |
-static void | SetDimAux (long dd) |
Sets the dimension of each object in the array of temporary objects. | |
-static void | SetNoAuxArr (int nn) |
Sets the number of auxiliary objects. | |
-static void | RiseErrorFlag () |
Sets the errorFlag member to true. | |
-static clock_t | GetStartTicks (void) |
Gets the value of start_clock member. | |
-static void | SetStartTicks (clock_t st) |
Sets the value of start_clock member. | |
-Protected Attributes | |
-double * | a |
Array of doubles to store matrix elements using column major storage. | |
-long | n |
Number of matrix rows. | |
-long | m |
Number of matrix columns. | |
-long | asize |
Number of allocated elements in a. | |
int | atype |
int | mtype |
-int | auxFlag |
Flag to indicate auxiliary (temporary) matrix flag = 1 if temporary matrix, 0 otherwise. | |
-int | allocated |
Flag to indicate that element storage has been allocated. | |
-DMatrix * | mt |
Referenced matrix pointer. | |
-const DMatrix * | rowIndx |
Row indices. | |
-const DMatrix * | colIndx |
Column indices. | |
-Static Protected Attributes | |
-static DMatrix * | auxPr |
Array of Temporary matrices. | |
-static int | noAuxArr |
Number of auxiliary matrices. | |
-static long | dimAux |
Dimension of auxiliary arrays. | |
-static int | auxIndx |
Index of used auxiliary matrices. | |
-static int | memberFlag |
Member function flag to control resetting of auxIndx. | |
-static int | initFlag |
Flag to indicate aux arrays allocation. | |
-static const double | MACH_EPS |
Machine precision constant. | |
-static int | errorFlag |
Flag to indicate error condition. | |
-static int | print_level |
Print level flag, 1: output sent to sderr, 0: no output sent. | |
-static long | seed [] |
current state of each stream | |
-static int | stream |
stream index for pseudo-ramdon number generator | |
-static time_t | start_time |
variable to store start time after tic() call. | |
-static clock_t | start_clock |
clock_t variable | |
-Friends | |
void | CholeskyDecomp (DMatrix &A, int n, DMatrix &pM) |
Cholesky decomposition of a matrix. | |
void | CholeskySolution (const DMatrix &A, int n, const DMatrix &pM, const DMatrix &bM, DMatrix &xM) |
Cholesky solution using the Cholesky decomposition of a matrix. | |
DMatrix & | operator- (const DMatrix &A) |
Matrix unary minus operator. Returns an object of the same dimensions as A but with changed element signs. | |
DMatrix & | colon (double i1, double increment, double i2) |
This function generates a DMatrix object with a vector starting from a given value, with given increments and ending in a given value. | |
DMatrix & | colon (int i1, int increment, int i2) |
This function generates DMatrix object with a vector starting from a given value, with given increments and ending in a given value. | |
DMatrix & | colon (int i1, int i2) |
This function generates DMatrix object with a vector starting from a given value, with unit increments, and ending in a given value. | |
DMatrix & | colon (double i1, double i2) |
This function generates DMatrix object with a vector starting from a given value, with unit increments, and ending in a given value. | |
DMatrix & | colon (void) |
This function generates a special DMatrix object with one row and one column which is understood by the indexing functions that take a DMatrix object as an argument to mean "all rows" or "all columns". | |
int | any (const DMatrix &A) |
This function returns a 1 if any alement of DMatrix object that is passed as argument is non-zero, otherwise it returns a zero. | |
DMatrix & | mpow (DMatrix &A, int p) |
This function calculates the integer matrix power. | |
DMatrix & | operator* (double r, const DMatrix &A) |
This function multiplies a real number by a matrix. | |
DMatrix & | tra (const DMatrix &A) |
This function returns the transpose of a given matrix. | |
DMatrix & | inv (const DMatrix &A) |
This function returns the inverse of a given square matrix. If the argument is not a square matrix an error is thrown. | |
DMatrix & | pinv (const DMatrix &A) |
This function returns the pseudo-inverse of a given rectangular matrix. | |
DMatrix & | identity (long n) |
This function returns the identity matrix with a given number of rows and columns. | |
DMatrix & | identity (long n, long m) |
This function returns a truncated identity matrix with specified numbers of rows and columns. | |
DMatrix & | eye (long n) |
This function returns the identity matrix with a given number of rows and columns. | |
DMatrix & | eye (long n, long m) |
This function returns a truncated identity matrix with specified numbers of rows and columns. | |
DMatrix & | zeros (long n, long m) |
This function returns a matrix full of zeros with specified numbers of rows and columns. | |
DMatrix & | ones (long n, long m) |
This function returns a matrix full of ones with specified numbers of rows and columns. | |
DMatrix & | expm (const DMatrix &A) |
This function returns the exponential matrix of a given square matrix. | |
DMatrix & | sin (const DMatrix &A) |
This function returns a matrix with the sine of each element of the input matrix. | |
DMatrix & | cos (const DMatrix &A) |
This function returns a matrix with the cosine of each element of the input matrix. | |
DMatrix & | tan (const DMatrix &A) |
This function returns a matrix with the tangent of each element of the input matrix. | |
DMatrix & | exp (const DMatrix &A) |
This function returns a matrix with the natural exponential of each element of the input matrix. | |
DMatrix & | sinh (const DMatrix &A) |
This function returns a matrix with the hyperbolic sine of each element of the input matrix. | |
DMatrix & | cosh (const DMatrix &A) |
This function returns a matrix with the hyperbolic cosine of each element of the input matrix. | |
DMatrix & | tanh (const DMatrix &A) |
This function returns a matrix with the hyperbolic tangent of each element of the input matrix. | |
DMatrix & | log (const DMatrix &A) |
This function returns a matrix with the natural logarithm of each element of the input matrix. | |
DMatrix & | diag (const DMatrix &A) |
if A is a matrix this function extracts a column vector with the diagonal values of A. If A is a vector this function returns a matrix having the elements of A in the diagonal | |
DMatrix & | TProduct (const DMatrix &A, const DMatrix &B) |
This function returns the product of the first matrix transposed times the second matrix. The number of rows of both matrices must be the same, otherwise an error is thrown. | |
DMatrix & | ProductT (const DMatrix &A, const DMatrix &B) |
This function returns the product of the first matrix times the second matrix transposed. The number of columns of both matrices must be the same, otherwise an error is thrown. | |
DMatrix & | TProductT (const DMatrix &A, const DMatrix &B) |
This function returns the product of the first matrix transposed times the second matrix transposed. The number of rows of the first matrix must be the same as the number of columns of the second matrix, otherwise an error is thrown. | |
DMatrix & | Product (const DMatrix &A, const DMatrix &B) |
This function calculates the product of two matrices. The number of columns of the first matrix must be the same as the number of rows of the second matrix, otherwise an error is thrown. | |
DMatrix & | LUSolve (const DMatrix &A, const DMatrix &b) |
Solves the system of equations using LU factorisation. | |
DMatrix & | LUFSolve (const DMatrix &ALU, const DMatrix &b) |
Solves the system of equations using LU factorisation using a previously found LU factors. | |
DMatrix & | CholSolve (const DMatrix &A, const DMatrix &b) |
Solves the system of equations using Cholesky factorisation. | |
DMatrix & | CholFSolve (const DMatrix &Achol, const DMatrix &b) |
Solves the system of equations using Cholesky factorisation. The function uses a previously found Cholesky factorisation. | |
DMatrix & | Chol (const DMatrix &A) |
Returns the Cholesky factorisation of a matrix A, which must be a positive definite symmetric matrix. | |
DMatrix & | CholeskyRoot (const DMatrix &A) |
Returns the Cholesky root R of a given matrix A, such that A=R'R. A must be a positive definite symmetric matrix. | |
DMatrix & | QRSolve (const DMatrix &A, const DMatrix &b) |
Solves the system of equations using QR factorisation. The number of rows of matrix A must be greater or equal than the number of columns. | |
DMatrix & | QRFSolve (const DMatrix &A, const DMatrix &b) |
Solves the system of equations using QR factorisation. The function uses a previously found QR factorisation. | |
DMatrix & | QR (const DMatrix &A) |
Returns the QR factorisation of a matrix A. The number of rows of matrix A must be greater or equal than the number of columns. | |
DMatrix & | LSMNSolve (const DMatrix &A, const DMatrix &B) |
This function solves overdetermined or underdetermined real linear systems using a QR or LQ factorization of A. It is assumed that matrix A has full rank. The function uses the LAPACK routine dgels. | |
DMatrix & | LQ (const DMatrix &A, DMatrix *Q) |
Returns the LQ factorisation of a matrix A. The function uses the LAPACK routine dgelqf_(). | |
DMatrix & | LU (const DMatrix &A) |
Returns the LU factorisation of a matrix A. | |
DMatrix & | SVD (const DMatrix &A, DMatrix *U=NULL, DMatrix *V=NULL) |
Returns the singular value decomposition of a matrix , where vector s contains the singular values of A. The function uses the LAPACK routine dgesvd_(). | |
DMatrix & | orth (const DMatrix &A) |
This function returns Q, the orthonormal basis for the range of a matrix A, such that . The number of columns of Q is the rank of A. | |
DMatrix & | null (const DMatrix &A) |
This function returns Z, the orthonormal basis for the null space of a matrix A, such that and . The number of columns of Z is the nullity of A. | |
DMatrix & | SVDSolve (const DMatrix &A, const DMatrix &B) |
This function uses the LAPACK routine dgelss_() to compute the minimum norm solution to a real linear least squares problem: Minimize using the singular value decomposition (SVD) of A. A is a rectangular matrix which may be rank-deficient. | |
DMatrix & | schur (const DMatrix &A, DMatrix *U=NULL) |
This function computes and returns the Schur decomposition of a matrix A, such that , where U is an upper triangular matrix and Q is a unitary matrix. This function uses the LAPACK routine dgees_() | |
DMatrix & | eig (const DMatrix &A, DMatrix *V=NULL) |
This function computes the eigenvalues and (optionally) the eigenvectors of a matrix A. This function uses the LAPACK routines dsyev_() and dgeev_. | |
double | enorm (const DMatrix &A) |
This function computes and return the Euclidean norm of a matrix A, which is the square root of the sum of its squared elements. | |
double | norm (const DMatrix &A) |
This function computes 2-norm of matrix A, which is computed as the maximum singular value of A. | |
double | InfNorm (const DMatrix &A) |
This function computes infinity norm of matrix A, which is computed as the maximum absolute value row sum. | |
double | Fnorm (const DMatrix &A) |
This function computes Frobenius norm of matrix A. | |
DMatrix & | Abs (const DMatrix &A) |
This function computes and returns the element-wise absolute value of matrix A. | |
double | Max (const DMatrix &A, int *rindx=NULL, int *cindx=NULL) |
This function finds and returns the element of matrix A with maximum value. It also returns the indices of such element. If more than one element has the same maximum value, the indices of the first element found when searching column by column is returned. | |
double | MaxAbs (const DMatrix &A, int *rindx=NULL, int *cindx=NULL) |
This function finds and returns the element of matrix A with maximum absolute value. It also returns the indices of such element. If more than one element has the same maximum absolute value, the indices of the first element found when searching column by column is returned. | |
double | Min (const DMatrix &A, int *rindx=NULL, int *cindx=NULL) |
This function finds and returns the element of matrix A with minimum value. It also returns the indices of such element. If more than one element has the same minimum value, the indices of the first element found when searching column by column is returned. | |
double | MinAbs (const DMatrix &A, int *rindx=NULL, int *cindx=NULL) |
This function finds and returns the element of matrix A with minimum absolute value. It also returns the indices of such element. If more than one element has the same minimum absolute value, the indices of the first element found when searching column by column is returned. | |
void | sort (DMatrix &x, int indx[]=NULL) |
This function sorts the input vector x in ascending order. Optionally, it also returns an integer array of sorted indices. If the input object is not a vector, then an error is thrown. | |
void | sort (DMatrix &x, DMatrix &indx) |
This function sorts the input vector x in ascending order. It also returns a DMatrix object with the sorted indices. If the input object is not a vector, then an error is thrown. | |
double | dotProduct (const DMatrix &x, const DMatrix &y) |
This function computes the dot product of two vectors. If any of the input arguments does not contain a vector, or if the vector lengths are not equal, an error is thrown. | |
double | dot (const DMatrix &x, const DMatrix &y) |
This function computes the dot product of two vectors. If any of the input arguments does not contain a vector, or if the vector lengths are not equal, an error is thrown. | |
DMatrix & | crossProduct (const DMatrix &x, const DMatrix &y) |
This function computes the cross product of two vectors. If any of the input arguments does not contain a vector, or if the length of any of the vectors is not 3, an error is thrown. | |
DMatrix & | cross (const DMatrix &x, const DMatrix &y) |
This function computes the cross product of two vectors. If any of the input arguments does not contain a vector, or if the length of any of the vectors is not 3, an error is thrown. | |
int | isSymmetric (const DMatrix &A) |
This function checks if the input matrix is symmetric. If the input matrix is not square, an error is thrown. | |
double | cond (const DMatrix &A) |
This function calculates the 2-norm condition number of a matrix, which is the ratio of the maximum singular value to the minimum singular value of the matrix. A large condition number indicates a nearly singular matrix. If the input matrix is not square, an error is thrown. | |
double | rcond (const DMatrix &A) |
This function estimates the 1-norm reciprocal condition number of a matrix. The function uses the LAPACK function dgecon. if A is well conditioned, then rcond(A) is near 1. If A is badly conditioned, then rcond(A) is close to the machine numerical precision (very small). If the input matrix is not square, an error is thrown. | |
int | rank (const DMatrix &A) |
This function returns an estimate of the rank of a matrix, which is the number of linearly independent rows or columns. | |
double | det (const DMatrix &A) |
This function returns the determinant of a square matrix. If the input matrix is not square, an error is thrown. | |
double | trace (const DMatrix &A) |
This function returns the trace of a square matrix. If the input matrix is not square, an error is thrown. | |
DMatrix & | mean (const DMatrix &A) |
This function returns a row vector with the mean values of the columns of matrix A. | |
DMatrix & | Std (const DMatrix &A, int ntype=0) |
This function returns a row vector with the standard deviation of each column of matrix A. If ntype is 0 (default) the result is normalised with (n-1), where n is the number of rows of A. Otherwise, the result is normalised with n. | |
DMatrix & | cov (const DMatrix &A, int ntype=0) |
Computes the covariance matrix of a data matrix where the N rows correspond to samples and the M columns are variables. The result is returned as an M x M matrix. If ntype=0 (default) then the result is normalised with N-1. Otherwise, if ntype=1, the result is normalised with N. | |
DMatrix & | cov (DMatrix &X, DMatrix &Y, int ntype=0) |
Computes the covariance matrix of two vectors X and Y of dimension N. The result is returned as an 1 x 1 DMatrix object. If ntype=0 (default) then the result is normalised with N-1. Otherwise, if ntype=1, the result is normalised with N. | |
DMatrix & | var (DMatrix &A, int ntype=0) |
This function returns a row vector with the variance of each column of matrix A. If ntype is 0 (default) the result is normalised with (n-1), where n is the number of rows of A. Otherwise, the result is normalised with n. | |
DMatrix & | sum (const DMatrix &A) |
This function returns a row vector with the sum of the elements of each column of matrix A. | |
DMatrix & | prod (const DMatrix &A) |
This function returns a row vector with the product of the elements of each column of matrix A. | |
DMatrix & | elemProduct (const DMatrix &A, const DMatrix &B) |
This function computes and returns the element-wise product of two matrices of the same dimensions. If the dimensions of the two input matrices are not the same, an error is thrown. | |
DMatrix & | elemDivision (const DMatrix &A, const DMatrix &B) |
This function computes and returns the element-wise division of two matrices of the same dimensions. If the dimensions of the two input matrices are not the same, an error is thrown. The dimensions of the returned object are the same as the dimensions of the factors. | |
DMatrix & | kronProduct (const DMatrix &A, const DMatrix &B) |
This function computes and returns the Kronecker product of two matrices. The row (column) dimension of the returned object is the product of the row (column) dimensions of both factors. | |
DMatrix & | vec (const DMatrix &A) |
This function returns a column vector made by stacking the columns of a matrix one below the other from left to right. | |
DMatrix & | MatrixSign (const DMatrix &A) |
This function returns a DMatrix object with the same dimensions as the input matrix such that each of its elements is 1 is the corresponding value of the input matrix is positive, -1 if the corresponding value of the input matrix is negative, and 0 if the corresponding value of the input matrix is 0. | |
DMatrix & | find (const DMatrix &A) |
This function returns a column vector with the linear indices of the non-zero elements of the input matrix A. The linear index is 1 for element (1,1) of the input matrix A, and length(A) for the (nrows,ncols) element of the input matrix A. | |
DMatrix & | randu (long n, long m) |
This function returns an nxm matrix where each element is a uniform pseudo-random number in the range (0,1). | |
DMatrix & | randn (long n, long m) |
This function returns an nxm matrix where each element is a Gaussian pseudo-random number in the range with zero mean and variance 1. | |
DMatrix & | linspace (double X1, double X2, long N) |
This function returns a linearly spaced vector with N points between the values X1 and X2. | |
void | error_message (const char *input_text) |
This function prints an error message and throws an exception to be handled by the ErrorHandler class. | |
-void | tic (void) |
This function, which is to be used in conjunction with function toc(), starts counting elapsed CPU time. | |
double | toc () |
This function, which is to be used in conjunction with function tic(), stops counting CPU time, and it prints and returns the elapsed time in seconds since the function tic() was called. | |
DMatrix & | Sqrt (const DMatrix &A) |
This function computes the square root of each element of the input matrix A, and it returns a DMatrix object with the same dimensions as the input matrix. If any element of the input matrix is negative, an error is thrown. | |
DMatrix & | triu (const DMatrix &A) |
This function extracts and return the triangular upper part of the input matrix A. The returned object has the same dimensions as the input object. | |
DMatrix & | reshape (DMatrix &A, long N, long M) |
This function returns the N-by-M matrix whose elements are taken columnwise from the input matrix A. An error is thrown if A does not have N*M elements. | |
long | length (const DMatrix &A) |
This function returns the number of elements of a matrix A. |
DMatrix class.
-A C++ class for dense and real matrix and vector computations with interfaces to a number of LAPACK functions
-DMatrix::DMatrix | -( | -long | -Initn, | -
- | - | long | -Initm | -
- | ) | -- |
Constructor with dimensions. Creates a matrix with allocated storage given specified numbers of rows and columns.
-Initn,: | number of rows |
Initm,: | number of columns |
DMatrix::DMatrix | -( | -long | -vDim, | -
- | - | double * | -v, | -
- | - | long | -Initn, | -
- | - | long | -Initm | -
- | ) | -- |
Constructor with dimensions using pre-allocated storage.
-vDim,: | Allocated length of array v |
v,: | double array to be used as storage by the DMatrix object |
Initn,: | number of rows |
Initm,: | number of columns |
DMatrix::DMatrix | -( | -long | -Initn | ) | -- |
Constructor with a single dimension, creates a column vector.
-Initn,: | number of rows |
DMatrix::DMatrix | -( | -long | -Initn, | -
- | - | long | -Initm, | -
- | - | double | -a11, | -
- | - | - | ... | -
- | ) | -- |
Constructor using a variable list of element values.
-Initn,: | number of rows |
Initm,: | number of columns |
a11,: | first element of list doubles, values are entered column by column |
DMatrix::DMatrix | -( | -const DMatrix & | -A | ) | -- |
void DMatrix::Allocate | -( | -long | -size | ) | - [protected] |
-
Allocate memory to store matrix elements.
-size | number of double elements to allocate |
static void DMatrix::AllocateAuxArr | -( | -void | -) | - [static] |
-
Allocates the array of auxiliary (temporary) objects used by the class.
-Allocates a DMatrix array of size N_TEMP_OBJECTS. Each element is allocated a storage of size D_TEMP_OBJECTS. These two macros are given default values but may be changed by the user at compilation time. The purpose of the array of temporary objects is to to store the intermediate objects resulting from single lines of code that call various operators and functions returning DMatrix objects. A simple example is as follows. Consider the C++ statement D= A*B + C; where A,B C and D are DMatrix objects. This statement involves two temporary objects: one to store the result of A*B, and another one to store the result of (A*B)+C;
-void DMatrix::assign | -( | -long | -rows, | -
- | - | long | -columns, | -
- | - | double | -a11, | -
- | - | - | ... | -
- | ) | -- |
Assigns values to the elements of an existing DMatrix object using a variable list of values. Resizes the matrix if necessary.
-rows,: | number of rows |
columns,: | number of columns |
a11,: | first element of the list of double arguments. |
DMatrix& DMatrix::AssignmentToColonReference | -( | -double | -arg | ) | - [protected] |
-
Assigns a double value to each value pointed to by a colon reference matrix.
-arg | is a double value to be assigned. |
void DMatrix::colMult | -( | -long | -c, | -
- | - | double | -x | -
- | ) | -- |
Multiples the elements of a specified column of a matrix by a constant scalar value.
-c,: | index to the column that is to be changed |
x,: | scalar value |
DMatrix& DMatrix::Column | -( | -long | -icol | ) | -const | -
DMatrix& DMatrix::compMat | -( | -const DMatrix & | -m2, | -
- | - | char | -op | -
- | ) | - const [protected] |
-
Elementwise comparison of matrix elements.
-m2 | DMatrix object to be compared with the calling object. |
op | (char) indicates type of operator. Use 1 for >, 2 for >=,. 3 for <, 4 for <=, 5 for ==, 6 for != comparisons |
void DMatrix::DeAllocate | -( | -) | - [protected] |
-
De-allocate memory previously allocated with DMatrix::Allocate().
-static void DMatrix::DeAllocateAuxArr | -( | -void | -) | - [static] |
-
De-allocates the array of auxiliary (temporary) objects previously allocated by AllocateAuxArr()
-void DMatrix::diag | -( | -const DMatrix & | -dd | ) | -- |
Assigns values to the diagonal elements of a matrix, while all off-diagonal elements are set to zero.
-The dimensions of dd should be consistant with the dimensions of the calling object
-dd,: | reference to constant DMatrix object which should contain a vector with the desired diagonal elements |
double DMatrix::elem | -( | -long | -i, | -
- | - | long | -j | -
- | ) | - const [inline] |
-
Returns the value of a specified element of a matrix.
-i,: | row index (starting from 1) |
j,: | column index (starting from 1) |
double& DMatrix::elem | -( | -long | -i, | -
- | - | long | -j | -
- | ) | - [inline] |
-
Returns a reference to the specified element of a matrix.
-i,: | row index (starting from 1) |
j,: | column index (starting from 1) |
double DMatrix::element | -( | -long | -i, | -
- | - | long | -j | -
- | ) | -- |
Returns the value of a specified element of a matrix.
-i,: | row index (starting from 1) |
j,: | column index (starting from 1) |
void DMatrix::FillWithZeros | -( | -void | -) | -- |
Assigns a zero value to each element of a matrix.
-Finds non-zero values of a matrix.
-I,: | DMatrix object with the row index of each non-zero element |
J,: | DMatrix object with the column index of each non-zero element |
DMatrix& DMatrix::find | -( | -int * | -I, | -
- | - | int * | -J | -
- | ) | -const | -
Finds non-zero values of a matrix.
-I,: | C++ double array with the row index of each non-zero element |
J,: | C++ double array with the column index of each non-zero element |
void DMatrix::Fprint | -( | -FILE * | -filex | ) | -- |
Prints the elements of a matrix elements matrix to a file.
-filex | is a pointer to a file already opened using "fopen()". |
double* DMatrix::geta | -( | -) | - [inline] |
-
Gets a pointer to the array where the elements of the matrix are stored.
-int DMatrix::getatype | -( | -) | - [inline] |
-
Gets the type of element storage of a matrix.
-static DMatrix** DMatrix::GetAuxPr | -( | -void | -) | - [inline, static] |
-
Gets a pointer to the array of auxiliary objects.
-double* DMatrix::GetConstPr | -( | -) | - const [inline] |
-
Gets a pointer to the array where the elements of the matrix are stored (for const objects)
-long DMatrix::getm | -( | -) | - [inline] |
-
Gets the number of columns from the calling object.
-long DMatrix::getm | -( | -) | - const [inline] |
-
Gets the number of columns from the calling object.
-int DMatrix::GetMType | -( | -) | - [inline, protected] |
-
Gets the type of matrix.
-long DMatrix::getn | -( | -) | - [inline] |
-
Gets the number of rows from the calling object.
-long DMatrix::getn | -( | -) | - const [inline] |
-
Gets the number of rows from the calling object.
-long DMatrix::GetNoCols | -( | -) | - [inline] |
-
Gets the number of columns from the calling object.
-long DMatrix::GetNoCols | -( | -) | - const [inline] |
-
Gets the number of columns from the calling object.
-long DMatrix::GetNoRows | -( | -) | - const [inline] |
-
Gets the number of rows from the calling object.
-long DMatrix::GetNoRows | -( | -) | - [inline] |
-
Gets the number of rows from the calling object.
-double* DMatrix::GetPr | -( | -) | - [inline] |
-
Gets the pointer to the array where the elements of the matrix are stored.
-DMatrix* DMatrix::GetReferencedDMatrixPointer | -( | -) | - [inline, protected] |
-
Gets the value of the referenced matrix pointer.
-void DMatrix::input_matrix | -( | -) | -- |
Allows the user to enter the elements of a matrix using command line prompts.
-int DMatrix::isEmpty | -( | -) | - [inline] |
-
Check if a matrix object is empty, if other words this method checks if the calling object has zero elements.
-static int DMatrix::isThereError | -( | -void | -) | - [inline, static] |
-
Checks if the error flag has been raised. If so, a 1 is returned, 0 otherwise.
-int DMatrix::isVector | -( | -) | - const [inline] |
-
Check if a matrix object contains a row or column vector.
-void DMatrix::Load | -( | -const char * | -FileName | ) | -- |
Reads the elements of a matrix from a file.
-The calling object should have the appropriate number of rows and columns.
-FileName | is a string with the file name where the matrix elements are stored. |
void DMatrix::MemCpyArray | -( | -double * | -aptr | ) | -- |
DMatrix& DMatrix::mpow | -( | -int | -p | ) | -- |
Computes and returns the integer power of a matrix.
-p,: | integer value, starting from 0 |
DMatrix& DMatrix::operator!= | -( | -double | -val | ) | -const | -
Checks if each element of the DMatrix object on the left hand side is different from the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise.
-val,: | right hand side value |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is different from the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown.
-val,: | val: right hand side object |
Computes the left division of a matrix (left hand side of the operator) by another matrix (right hand side value). This is conceptually equivalent to multiplying the inverse of the left object by the right hand side object but it is computed in a more efficient way. The dimensions of the matrices must be consistent, otherwise an error is returned. The left hand side object must be a square matrix.
-rval,: | DMatrix object at the right hand side of the operator. |
Elementwise product operator. Returns a DMatrix object with the same dimensions of the calling objects and each of its elements is computed as the product of the corresponding elements of the calling object and the right hand side object. The dimensions of the calling objects must be the same, otherwise an error is thrown. Care must be taken when using this operator as the associations do not work in the same way as with the * operator. It is highly recommended to use parenthesis every time this operator is used. For example use it as follows: (A&B).
-B,: | DMatrix object at the right hand side of the operator |
Stacks the right hand side matrix below the left hand side matrix. The dimensions number of columns of the matrices involved must be the same, otherwise an error is thrown. The number of rows of the resulting matrix is the addition of the number of rows of both matrices involved.
-B,: | DMatrix object at the right hand side of the operator. |
DMatrix& DMatrix::operator() | -( | -const DMatrix & | -RowIndx, | -
- | - | long | -col | -
- | ) | -- |
Sub-vector extraction and referencing using an array of row indices for a given column.
-RowIndx | is a DMatrix array that contains row index values usually generated using the colon() function. |
col | is a column index |
double DMatrix::operator() | -( | -const char * | -end, | -
- | - | long | -col | -
- | ) | -const | -
Matrix indexing. Returns the value of the matrix element located at the position indicated by the column index and the last row. Indices start from 1. An error in thrown in case of a range violation.
-end,: | Character string containing the word "end". |
col,: | Column index starting from 1. |
double DMatrix::operator() | -( | -const char * | -end | ) | -const | -
Access to last linear element. Returns the value of the last linear matrix element, assuming column major storage.
-end,: | Character string containing the word "end". |
DMatrix& DMatrix::operator() | -( | -const char * | -end, | -
- | - | const DMatrix & | -ColIndx | -
- | ) | -- |
Sub-vector extraction and referencing using an array of column indices for the last column of a matrix.
-end | is a character string containing the word "end". |
ColIndx | is a DMatrix array that contains column index values usually generated using the colon() function. |
double& DMatrix::operator() | -( | -const char * | -end | ) | -- |
Access to last linear element. Returns a reference to the last linear matrix element, assuming column major storage.
-end,: | Character string containing the word "end". |
DMatrix& DMatrix::operator() | -( | -const DMatrix & | -RowIndx, | -
- | - | const DMatrix & | -ColIndx | -
- | ) | -- |
Submatrix extraction and referencing using arrays of indices.
-RowIndx | is a DMatrix array that contains row index values usually generated using the colon() function. |
ColIndx | is a DMatrix array that contains column index values usually generated using the colon() function. |
Linear sub-vector extraction and referencing using an array of indices assuming column-major storage.
-RowIndx | is a DMatrix array that contains row index values usually generated using the colon() function. |
double& DMatrix::operator() | -( | -long | -row, | -
- | - | long | -col | -
- | ) | -- |
Matrix indexing. Returns a reference to the matrix element located at the position indicated by the row and column indices. Indices start from 1.
-row,: | Row index starting from 1. |
col,: | Column index starting from 1. |
double& DMatrix::operator() | -( | -long | -row, | -
- | - | const char * | -end | -
- | ) | -- |
Matrix indexing. Returns a reference to the matrix element located at the position indicated by the row index and the last column. Indices start from 1. An error in thrown in case of zero or negative indices. The matrix is resized if necessary.
-row,: | Row index starting from 1. |
end,: | Character string containing the word "end". |
double& DMatrix::operator() | -( | -const char * | -end, | -
- | - | long | -col | -
- | ) | -- |
Matrix indexing. Returns a reference to the matrix element located at the position indicated by the column index and the last row. Indices start from 1. An error in thrown in case of a range violation.
-end,: | Character string containing the word "end". |
col,: | Column index starting from 1. |
DMatrix& DMatrix::operator() | -( | -long | -row, | -
- | - | const DMatrix & | -ColIndx | -
- | ) | -- |
Sub-vector extraction and referencing using an array of column indices for a given row.
-row | is a row index. |
ColIndx | is a DMatrix array that contains column index values usually generated using the colon() function. |
double DMatrix::operator() | -( | -long | -row, | -
- | - | const char * | -end | -
- | ) | -const | -
Matrix indexing. Returns the value of the matrix element located at the position indicated by the row index and the last column. Indices start from 1. An error in thrown in case of a range violation.
-row,: | Row index starting from 1. |
end,: | Character string containing the word "end". |
double& DMatrix::operator() | -( | -long | -index | ) | -- |
Single index matrix indexing. Returns a reference to the matrix element located at the linear position indicated by the index, assuming column major storage. The indexs start from 1. The matrix is resized if necessary. An error is thrown in case of zero or negative indices.
-index,: | index value |
DMatrix& DMatrix::operator() | -( | -const DMatrix & | -RowIndx, | -
- | - | const char * | -end | -
- | ) | -- |
Sub-vector extraction and referencing using an array of row indices for the last column of a matrix.
-RowIndx | is a DMatrix array that contains row index values usually generated using the colon() function. |
end | is a character string containing the word "end". |
double DMatrix::operator() | -( | -long | -k | ) | -const | -
Single index matrix indexing. Returns the value of the matrix element located at the linear position indicated by the index, assuming column major storage. The index starts from 1. An error is thrown in case of range error.
-k,: | index value |
double DMatrix::operator() | -( | -long | -row, | -
- | - | long | -col | -
- | ) | -const | -
Matrix indexing. Returns the value of the matrix element located at the position indicated by the row and column indices. Indices start from 1. An error in thrown in case of a range violation.
-row,: | Row index starting from 1. |
col,: | Column index starting from 1. |
Matrix product operator. Returns the result of the matrix product of the calling object (left hand side of the operator) and the right hand side object. The inner dimensions of the objects being multiplied should be consistent, otherwise an error will be thrown.
-rval,: | matrix located at the right hand side of the operator. |
DMatrix& DMatrix::operator* | -( | -double | -Arg | ) | -const | -
Computes the product of a matrix (left hand side of the operator) times a real scalar (right hand side value) and replaces the left hand side object with the result of the operation.
-Arg,: | double value that will multiply each element of the matrix. |
DMatrix& DMatrix::operator*= | -( | -double | -Arg | ) | -- |
Computes the product of a matrix (left hand side of the operator) times a real scalar (right hand side value), and modifies the calling object to store the result of the operation.
-Arg,: | double value that will multiply each element of the matrix. |
Matrix product operator with substitution. Computes the matrix product of the calling object (left hand side of the operator) and the right hand side object. The inner dimensions of the objects being multiplied should be consistent, otherwise an error will be thrown. The calling object is modified to store the results of the operation.
-rval,: | matrix located at the right hand side of the operator. |
Matrix addition operator. The sizes of the matrices being added should be the same, otherwise an error is thrown.
-rval,: | matrix located at the right hand side of the operator. |
DMatrix& DMatrix::operator+ | -( | -double | -x | ) | -const | -
Adds a scalar real value to each element of the matrix. .
-x,: | double value to be added |
Matrix addition and substitution operator. The sizes of the matrices being added should be the same, otherwise an error is thrown.The left hand side object elements are replaced with the result of the operation.
-rval,: | matrix located right hand side of the operator. |
DMatrix& DMatrix::operator- | -( | -double | -x | ) | -const | -
Subtracts a scalar real value from each element of the matrix. .
-x,: | double value to be subtracted |
Matrix subtraction operator. The sizes of the matrices being subtracted should be the same, otherwise an error is thrown.
-rval,: | matrix located at the right hand side of the operator. |
Matrix subtraction and substitution operator. The sizes of the matrices being subtracted should be the same, otherwise an error is thrown.The left hand side object elements are replaced with the result of the operation.
-rval,: | matrix located right hand side of the operator. |
Computes the right division of a matrix (left hand side of the operator) by another matrix (right hand side value). This is conceptually equivalent to multiplying the left object by the inverse of the right hand side object but it is computed in a more efficient way. The dimensions of the matrices must be consistent, otherwise an error is returned. The right hand side object must be a square matrix.
-rval,: | DMatrix object at the right hand side of the operator. |
DMatrix& DMatrix::operator/ | -( | -double | -Arg | ) | -const | -
Computes the division of a matrix (left hand side of the operator) by a real scalar (right hand side value).
-Arg,: | double value that will divide each element of the matrix. |
DMatrix& DMatrix::operator/= | -( | -double | -Arg | ) | -- |
Computes the division of a matrix (left hand side of the operator) by a real scalar (right hand side value) and modifies the left hand side object with the result of the operation.
-Arg,: | double value that will divide each element of the matrix. |
DMatrix& DMatrix::operator< | -( | -double | -val | ) | -const | -
Checks if each element of the DMatrix object on the left hand side is lower than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise.
-val,: | right hand side value |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is lower than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown.
-val,: | val: right hand side object |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is lower or equal than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown.
-val,: | val: right hand side object |
DMatrix& DMatrix::operator<= | -( | -double | -val | ) | -const | -
Checks if each element of the DMatrix object on the left hand side is lower or equal than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise.
-val,: | right hand side value |
Matrix assignment. The size of the left hand side object is modified if necessary, and the values of all real elements of the right hand side object and copied to the left hand side object.
-rval,: | DMatrix object at the right hand side of the operator |
DMatrix& DMatrix::operator= | -( | -double | -val | ) | -- |
Matrix assignment to a scalar. The size of the left hand side object is modified to one row by one column if necessary, and the value of the right hand side argument is copied to the single element of the matrix. If the calling object is a "colon reference" matrix, then the right hand side value is copied to each element of the referenced array elements.
-val,: | double value at the right hand side of the operator |
DMatrix& DMatrix::operator= | -( | -const char * | -str | ) | -- |
Matrix assignment to a constant matrix defined as a character string using the bracket notation used in Matlab and Octave. The size of the left hand side object is modified if necessary. For example, the identity matrix of size two by two would be entered as "[1.0 0.0;0.0 1.0]".
-str,: | Character string containing the constant matrix defined using Matlab/Octave bracket notation. |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is equal to the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown.
-val,: | val: right hand side object |
DMatrix& DMatrix::operator== | -( | -double | -val | ) | -const | -
Checks if each element of the DMatrix object on the left hand side is equal to the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise.
-val,: | right hand side value |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is greater than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown.
-val,: | val: right hand side object |
DMatrix& DMatrix::operator> | -( | -double | -val | ) | -const | -
Checks if each element of the DMatrix object on the left hand side is greater than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise.
-val,: | right hand side value |
DMatrix& DMatrix::operator>= | -( | -double | -val | ) | -const | -
Checks if each element of the DMatrix object on the left hand side is greater or equal than the right hand side value. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise.
-val,: | right hand side value |
Elementwise matrix comparison. Checks if each element of the matrix on the left hand side is greater or equal than the corresponding element of the right hand side matrix. The result is a DMatrix object where each element has the value of 1 if the corresponding comparison was true, 0 otherwise. The dimensions of the two matrices involved must be the same, otherwise an error is thrown.
-val,: | val: right hand side object |
DMatrix& DMatrix::operator^ | -( | -double | -x | ) | -- |
Elementwise power operator. Returns a DMatrix object with the same dimensions of the calling object and each of its elements is computed as the corresponding element of the calling object to the power of the right hand side argument. Care must be taken when using this operator as the associations do not work in the same way as with the * operator. It is highly recommended to use parenthesis every time this operator is used. For example use it as follows: (A^x).
-x,: | double argument at the right hand side of the operator. |
Elementwise division operator. Returns a DMatrix object with the same dimensions of the calling objects and each of its elements is computed as the of the corresponding element of the calling object by the corresponding element of the right hand side object. The dimensions of the calling objects must be the same, otherwise an error is thrown. Care must be taken when using this operator as the associations do not work in the same way as with the / operator. It is highly recommended to use parenthesis every time this operator is used. For example use it as follows: (A|B).
-B,: | DMatrix object at the right hand side of the operator |
Concatenates two matrices side by side. The dimensions number of rows of the matrices involved must be the same, otherwise an error is thrown. The number of columns of the resulting matrix is the addition of the number of columns of both matrices involved.
-B,: | DMatrix object at the right hand side of the operator. |
void DMatrix::Print | -( | -const char * | -text | ) | -const | -
Prints the elements of a DMatrix object.
-text | is a string that serves as a prompt for the matrix being entered. |
void DMatrix::PrintInfo | -( | -const char * | -text | ) | -const | -
Prints information about a DMatrix object.
-text | is a a string that serves as a label for the matrix being printed. |
static double DMatrix::random_gaussian | -( | -void | -) | - [static] |
-
Returns a pseudo-random Gaussian distributed number with zero mean and unit variance.
-static double DMatrix::random_uniform | -( | -void | -) | - [static] |
-
Returns a pseudo-random uniformly distributed number in the range [0,1].
-void DMatrix::Read | -( | -FILE * | -filex | ) | -- |
Reads the elements of a matrix from a file.
-The file in question should contain the elements of the matrix row by row The elements should be separated by spaces and each row should be separated by a new line. The calling object should have the appropriate number of rows and columns.
-filex | pointer to a file already opened using "fopen()". |
void DMatrix::Resize | -( | -long | -nnrow, | -
- | - | long | -nncol | -
- | ) | -- |
Changes the number of rows and columns of an existing matrix. Allocates new memory if necessary. If the calling object uses preallocated memory and the requested size would exceed that memory, an error is thrown.
-nnrow,: | new number of rows |
nncol,: | new number of columns |
DMatrix& DMatrix::Row | -( | -long | -irow | ) | -const | -
void DMatrix::rowMult | -( | -long | -r, | -
- | - | double | -x | -
- | ) | -- |
Multiples the elements of a specified row of a matrix by a constant scalar value.
-r,: | index to the row that is to be changed |
x,: | scalar value |
void DMatrix::Save | -( | -const char * | -FileName | ) | -- |
Saves the elements of a matrix to a file.
-FileName | is a string with the desired file name |
void DMatrix::SetColIndexPointer | -( | -const DMatrix * | -arg | ) | - [inline, protected] |
-
Sets the column index pointer.
-arg | Pointer to DMatrix object |
void DMatrix::SetColumn | -( | -const DMatrix & | -Col, | -
- | - | int | -icol | -
- | ) | -- |
Assigns values to a column of a matrix, while other columns are left untouched.
-Col,: | reference to constant DMatrix object which should contain a vector with the desired column values |
icol,: | index to the column that is to be changed |
void DMatrix::SetMType | -( | -int | -arg | ) | - [protected] |
-
Sets the type of matrix.
-arg | (int) should be 0 for a normal matrix, or 1 for a colon reference matrix |
static void DMatrix::SetPrintLevel | -( | -int | -plevel | ) | - [static] |
-
Sets the print level.
-plevel | desired print level |
void DMatrix::SetReferencedDMatrixPointer | -( | -DMatrix * | -arg | ) | - [inline, protected] |
-
Sets the value of the referenced matrix pointer.
-arg | Pointer to DMatrix object |
void DMatrix::SetRow | -( | -const DMatrix & | -Row, | -
- | - | int | -irow | -
- | ) | -- |
Assigns values to a row of a matrix, while other columns are left untouched.
-Row,: | reference to constant DMatrix object which should contain a vector with the desired row values |
irow,: | index to the row that is to be changed |
void DMatrix::SetRowIndexPointer | -( | -const DMatrix * | -arg | ) | - [inline, protected] |
-
Sets the row index pointer.
-arg | Pointer to DMatrix object |
void DMatrix::SetSubMatrix | -( | -long | -row, | -
- | - | long | -col, | -
- | - | const DMatrix & | -A | -
- | ) | -- |
Assigns the elements of a matrix object to a section of the calling object.
-row,: | start of row range |
col,: | start of column range |
A,: | DMatrix object whose element values are to be copied into the calling object |
DMatrix& DMatrix::sub_matrix | -( | -long | -r1, | -
- | - | long | -r2, | -
- | - | long | -c1, | -
- | - | long | -c2 | -
- | ) | -const | -
Extracts a specified sub-matrix from a matrix.
-r1,: | start of row range |
r2,: | end of row range |
c1,: | start of column range |
c2,: | end of column range |
void DMatrix::SwapColumns | -( | -int | -i, | -
- | - | int | -j | -
- | ) | -- |
Swaps two columns of a matrix.
-i,: | first column index |
j,: | second column index. |
void DMatrix::SwapRows | -( | -int | -i, | -
- | - | int | -j | -
- | ) | -- |
Swaps two rows of a matrix.
-i,: | first row index |
j,: | second row index. |
void DMatrix::Transpose | -( | -void | -) | -- |
Transposes a matrix.
-int any | -( | -const DMatrix & | -A | ) | - [friend] |
-
Returns the Cholesky factorisation of a matrix A, which must be a positive definite symmetric matrix.
-A | is a DMatrix object· |
void CholeskyDecomp | -( | -DMatrix & | -A, | -
- | - | int | -n, | -
- | - | DMatrix & | -pM | -
- | ) | - [friend] |
-
Cholesky decomposition of a matrix.
-A | is a DMatrix object |
n | is the number of columns of the input matrix A. |
pM | (modified), is a DMatrix object which on output contains the Cholesky decomposition of input matrix a. |
void CholeskySolution | -( | -const DMatrix & | -A, | -
- | - | int | -n, | -
- | - | const DMatrix & | -pM, | -
- | - | const DMatrix & | -bM, | -
- | - | DMatrix & | -xM | -
- | ) | - [friend] |
-
Cholesky solution using the Cholesky decomposition of a matrix.
-A | DMatrix object |
n | is the number of columns of the input matrix A. |
pM | DMatrix object which on output contains the Cholesky decomposition of input matrix a. |
bM | DMatrix object with a vector of right-hand-side values |
xM | (modified) DMatrix object which on return contains the solution to the system of equations |
DMatrix& CholFSolve | -( | -const DMatrix & | -Achol, | -
- | - | const DMatrix & | -b | -
- | ) | - [friend] |
-
Solves the system of equations using Cholesky factorisation. The function uses a previously found Cholesky factorisation.
-Achol | is a DMatrix object resulting from a previous call to Chol(). |
b | is a DMatrix object. |
DMatrix& CholSolve | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -b | -
- | ) | - [friend] |
-
Solves the system of equations using Cholesky factorisation.
- -DMatrix& colon | -( | -void | -) | - [friend] |
-
DMatrix& colon | -( | -double | -i1, | -
- | - | double | -increment, | -
- | - | double | -i2 | -
- | ) | - [friend] |
-
DMatrix& colon | -( | -int | -i1, | -
- | - | int | -increment, | -
- | - | int | -i2 | -
- | ) | - [friend] |
-
DMatrix& colon | -( | -int | -i1, | -
- | - | int | -i2 | -
- | ) | - [friend] |
-
DMatrix& colon | -( | -double | -i1, | -
- | - | double | -i2 | -
- | ) | - [friend] |
-
double cond | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function calculates the 2-norm condition number of a matrix, which is the ratio of the maximum singular value to the minimum singular value of the matrix. A large condition number indicates a nearly singular matrix. If the input matrix is not square, an error is thrown.
-A | is a DMatrix object. |
Computes the covariance matrix of a data matrix where the N rows correspond to samples and the M columns are variables. The result is returned as an M x M matrix. If ntype=0 (default) then the result is normalised with N-1. Otherwise, if ntype=1, the result is normalised with N.
-A | is a DMatrix object. |
ntype | is the type of normalization, 0 (default) or 1. |
DMatrix& cov | -( | -DMatrix & | -X, | -
- | - | DMatrix & | -Y, | -
- | - | int | -ntype = 0 |
-
- | ) | - [friend] |
-
Computes the covariance matrix of two vectors X and Y of dimension N. The result is returned as an 1 x 1 DMatrix object. If ntype=0 (default) then the result is normalised with N-1. Otherwise, if ntype=1, the result is normalised with N.
-X | is a DMatrix object. |
Y | is a DMatrix object |
ntype | is the type of normalization, 0 (default) or 1. |
DMatrix& cross | -( | -const DMatrix & | -x, | -
- | - | const DMatrix & | -y | -
- | ) | - [friend] |
-
This function computes the cross product of two vectors. If any of the input arguments does not contain a vector, or if the length of any of the vectors is not 3, an error is thrown.
- -DMatrix& crossProduct | -( | -const DMatrix & | -x, | -
- | - | const DMatrix & | -y | -
- | ) | - [friend] |
-
This function computes the cross product of two vectors. If any of the input arguments does not contain a vector, or if the length of any of the vectors is not 3, an error is thrown.
- -double det | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function returns the determinant of a square matrix. If the input matrix is not square, an error is thrown.
-A | is a DMatrix object. |
if A is a matrix this function extracts a column vector with the diagonal values of A. If A is a vector this function returns a matrix having the elements of A in the diagonal
-A | is a DMatrix object |
DMatrix& eig | -( | -const DMatrix & | -A, | -
- | - | DMatrix * | -V = NULL |
-
- | ) | - [friend] |
-
This function computes the eigenvalues and (optionally) the eigenvectors of a matrix A. This function uses the LAPACK routines dsyev_() and dgeev_.
- -DMatrix& elemDivision | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function computes and returns the element-wise division of two matrices of the same dimensions. If the dimensions of the two input matrices are not the same, an error is thrown. The dimensions of the returned object are the same as the dimensions of the factors.
- -DMatrix& elemProduct | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function computes and returns the element-wise product of two matrices of the same dimensions. If the dimensions of the two input matrices are not the same, an error is thrown.
- -double enorm | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function computes and return the Euclidean norm of a matrix A, which is the square root of the sum of its squared elements.
-A | is a DMatrix object. |
void error_message | -( | -const char * | -input_text | ) | - [friend] |
-
This function prints an error message and throws an exception to be handled by the ErrorHandler class.
-input_text | is the error message |
DMatrix& eye | -( | -long | -n | ) | - [friend] |
-
This function returns the identity matrix with a given number of rows and columns.
-n | is the desired number of rows and columns |
DMatrix& eye | -( | -long | -n, | -
- | - | long | -m | -
- | ) | - [friend] |
-
This function returns a truncated identity matrix with specified numbers of rows and columns.
-n | is the desired number of rows |
m | is the desired number of columns |
This function returns a column vector with the linear indices of the non-zero elements of the input matrix A. The linear index is 1 for element (1,1) of the input matrix A, and length(A) for the (nrows,ncols) element of the input matrix A.
-A | is a DMatrix object. |
double Fnorm | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function computes Frobenius norm of matrix A.
-A | is a DMatrix object. |
DMatrix& identity | -( | -long | -n, | -
- | - | long | -m | -
- | ) | - [friend] |
-
This function returns a truncated identity matrix with specified numbers of rows and columns.
-n | is the desired number of rows |
m | is the desired number of columns |
DMatrix& identity | -( | -long | -n | ) | - [friend] |
-
This function returns the identity matrix with a given number of rows and columns.
-n | is the desired number of rows and columns |
double InfNorm | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function computes infinity norm of matrix A, which is computed as the maximum absolute value row sum.
-A | is a DMatrix object. |
int isSymmetric | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function checks if the input matrix is symmetric. If the input matrix is not square, an error is thrown.
-A | is a DMatrix object. |
DMatrix& kronProduct | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function computes and returns the Kronecker product of two matrices. The row (column) dimension of the returned object is the product of the row (column) dimensions of both factors.
- -long length | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function returns the number of elements of a matrix A.
-A | is a DMatrix object |
DMatrix& linspace | -( | -double | -X1, | -
- | - | double | -X2, | -
- | - | long | -N | -
- | ) | - [friend] |
-
This function returns a linearly spaced vector with N points between the values X1 and X2.
-X1 | is a real number |
X2 | is a real number |
N | is the desired length of the returned vector |
Returns the LQ factorisation of a matrix A. The function uses the LAPACK routine dgelqf_().
-A | is a DMatrix object· |
Q | is a pointer to a DMatrix object, which is modified on output to contain the Q factor of the decomposition. |
DMatrix& LSMNSolve | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function solves overdetermined or underdetermined real linear systems using a QR or LQ factorization of A. It is assumed that matrix A has full rank. The function uses the LAPACK routine dgels.
- -Returns the LU factorisation of a matrix A.
-A | is a DMatrix object· |
DMatrix& LUFSolve | -( | -const DMatrix & | -ALU, | -
- | - | const DMatrix & | -b | -
- | ) | - [friend] |
-
Solves the system of equations using LU factorisation using a previously found LU factors.
-ALU | is a DMatrix object resulting from a previous call to the LU() function |
b | is a DMatrix object. |
DMatrix& LUSolve | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -b | -
- | ) | - [friend] |
-
Solves the system of equations using LU factorisation.
- -This function returns a DMatrix object with the same dimensions as the input matrix such that each of its elements is 1 is the corresponding value of the input matrix is positive, -1 if the corresponding value of the input matrix is negative, and 0 if the corresponding value of the input matrix is 0.
-A | is a DMatrix object. |
double Max | -( | -const DMatrix & | -A, | -
- | - | int * | -rindx = NULL , |
-
- | - | int * | -cindx = NULL |
-
- | ) | - [friend] |
-
This function finds and returns the element of matrix A with maximum value. It also returns the indices of such element. If more than one element has the same maximum value, the indices of the first element found when searching column by column is returned.
-A | is a DMatrix object. |
rindx | is an optional pointer to an integer which is modified with the row index. |
cindx | is an optional pointer to an integer which is modified with the column index. |
double MaxAbs | -( | -const DMatrix & | -A, | -
- | - | int * | -rindx = NULL , |
-
- | - | int * | -cindx = NULL |
-
- | ) | - [friend] |
-
This function finds and returns the element of matrix A with maximum absolute value. It also returns the indices of such element. If more than one element has the same maximum absolute value, the indices of the first element found when searching column by column is returned.
-A | is a DMatrix object. |
rindx | is a pointer to an integer which is modified with the row index. |
cindx | is a pointer to an integer which is modified with the column index. |
double Min | -( | -const DMatrix & | -A, | -
- | - | int * | -rindx = NULL , |
-
- | - | int * | -cindx = NULL |
-
- | ) | - [friend] |
-
This function finds and returns the element of matrix A with minimum value. It also returns the indices of such element. If more than one element has the same minimum value, the indices of the first element found when searching column by column is returned.
-A | is a DMatrix object. |
rindx | is a pointer to an integer which is modified with the row index. |
cindx | is a pointer to an integer which is modified with the column index. |
double MinAbs | -( | -const DMatrix & | -A, | -
- | - | int * | -rindx = NULL , |
-
- | - | int * | -cindx = NULL |
-
- | ) | - [friend] |
-
This function finds and returns the element of matrix A with minimum absolute value. It also returns the indices of such element. If more than one element has the same minimum absolute value, the indices of the first element found when searching column by column is returned.
-A | is a DMatrix object. |
rindx | is a pointer to an integer which is modified with the row index. |
cindx | is a pointer to an integer which is modified with the column index. |
double norm | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function computes 2-norm of matrix A, which is computed as the maximum singular value of A.
-A | is a DMatrix object. |
DMatrix& ones | -( | -long | -n, | -
- | - | long | -m | -
- | ) | - [friend] |
-
This function returns a matrix full of ones with specified numbers of rows and columns.
-n | is the desired number of rows |
m | is the desired number of columns |
Matrix unary minus operator. Returns an object of the same dimensions as A but with changed element signs.
-A,: | matrix located at the right hand side of the operator. |
DMatrix& Product | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function calculates the product of two matrices. The number of columns of the first matrix must be the same as the number of rows of the second matrix, otherwise an error is thrown.
- -DMatrix& ProductT | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function returns the product of the first matrix times the second matrix transposed. The number of columns of both matrices must be the same, otherwise an error is thrown.
- -Returns the QR factorisation of a matrix A. The number of rows of matrix A must be greater or equal than the number of columns.
-A | is a DMatrix object· |
DMatrix& QRFSolve | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -b | -
- | ) | - [friend] |
-
Solves the system of equations using QR factorisation. The function uses a previously found QR factorisation.
- -DMatrix& QRSolve | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -b | -
- | ) | - [friend] |
-
Solves the system of equations using QR factorisation. The number of rows of matrix A must be greater or equal than the number of columns.
- -DMatrix& randn | -( | -long | -n, | -
- | - | long | -m | -
- | ) | - [friend] |
-
This function returns an nxm matrix where each element is a Gaussian pseudo-random number in the range with zero mean and variance 1.
-n | is the desired number of rows of the returned matrix |
m | is the desired number of columns of the returned matrix |
DMatrix& randu | -( | -long | -n, | -
- | - | long | -m | -
- | ) | - [friend] |
-
This function returns an nxm matrix where each element is a uniform pseudo-random number in the range (0,1).
-n | is the desired number of rows of the returned matrix |
m | is the desired number of columns of the returned matrix |
int rank | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function returns an estimate of the rank of a matrix, which is the number of linearly independent rows or columns.
-A | is a DMatrix object. |
double rcond | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function estimates the 1-norm reciprocal condition number of a matrix. The function uses the LAPACK function dgecon. if A is well conditioned, then rcond(A) is near 1. If A is badly conditioned, then rcond(A) is close to the machine numerical precision (very small). If the input matrix is not square, an error is thrown.
-A | is a DMatrix object. |
DMatrix& reshape | -( | -DMatrix & | -A, | -
- | - | long | -N, | -
- | - | long | -M | -
- | ) | - [friend] |
-
This function returns the N-by-M matrix whose elements are taken columnwise from the input matrix A. An error is thrown if A does not have N*M elements.
-A | is a DMatrix object |
N | is the desired number of rows of the reshaped matrix |
M | is the desired number of columns of the reshaped matrix |
DMatrix& schur | -( | -const DMatrix & | -A, | -
- | - | DMatrix * | -U = NULL |
-
- | ) | - [friend] |
-
This function computes and returns the Schur decomposition of a matrix A, such that , where U is an upper triangular matrix and Q is a unitary matrix. This function uses the LAPACK routine dgees_()
- -This function sorts the input vector x in ascending order. It also returns a DMatrix object with the sorted indices. If the input object is not a vector, then an error is thrown.
-x | is a DMatrix object which upon input contains the unsorted vector and upon output contains the sorted vector. |
indx | is a DMatrix object which upon output contains the values of the sorted indices. |
void sort | -( | -DMatrix & | -x, | -
- | - | int | -indx[] = NULL |
-
- | ) | - [friend] |
-
This function sorts the input vector x in ascending order. Optionally, it also returns an integer array of sorted indices. If the input object is not a vector, then an error is thrown.
-x | is a DMatrix object which upon input contains the unsorted vector and upon output contains the sorted vector. |
indx | is a pointer to the first element of the array of sorted indices. |
This function computes the square root of each element of the input matrix A, and it returns a DMatrix object with the same dimensions as the input matrix. If any element of the input matrix is negative, an error is thrown.
-A | is a DMatrix object. |
This function returns a row vector with the standard deviation of each column of matrix A. If ntype is 0 (default) the result is normalised with (n-1), where n is the number of rows of A. Otherwise, the result is normalised with n.
-A | is a DMatrix object. |
ntype | is the type of normalization, 0 (default) or 1. |
DMatrix& SVD | -( | -const DMatrix & | -A, | -
- | - | DMatrix * | -U = NULL , |
-
- | - | DMatrix * | -V = NULL |
-
- | ) | - [friend] |
-
Returns the singular value decomposition of a matrix , where vector s contains the singular values of A. The function uses the LAPACK routine dgesvd_().
-A | is a DMatrix object· |
U | is a pointer to a DMatrix object, which is modified on output to contain the U factor of the decomposition. |
V | is a pointer to a DMatrix object, which is modified on output to contain the V factor of the decomposition. |
DMatrix& SVDSolve | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function uses the LAPACK routine dgelss_() to compute the minimum norm solution to a real linear least squares problem: Minimize using the singular value decomposition (SVD) of A. A is a rectangular matrix which may be rank-deficient.
- -double toc | -( | -) | - [friend] |
-
DMatrix& TProduct | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function returns the product of the first matrix transposed times the second matrix. The number of rows of both matrices must be the same, otherwise an error is thrown.
- -DMatrix& TProductT | -( | -const DMatrix & | -A, | -
- | - | const DMatrix & | -B | -
- | ) | - [friend] |
-
This function returns the product of the first matrix transposed times the second matrix transposed. The number of rows of the first matrix must be the same as the number of columns of the second matrix, otherwise an error is thrown.
- -double trace | -( | -const DMatrix & | -A | ) | - [friend] |
-
This function returns the trace of a square matrix. If the input matrix is not square, an error is thrown.
-A | is a DMatrix object. |
This function returns a row vector with the variance of each column of matrix A. If ntype is 0 (default) the result is normalised with (n-1), where n is the number of rows of A. Otherwise, the result is normalised with n.
-A | is a DMatrix object. |
ntype | is the type of normalization, 0 (default) or 1. |
DMatrix& zeros | -( | -long | -n, | -
- | - | long | -m | -
- | ) | - [friend] |
-
This function returns a matrix full of zeros with specified numbers of rows and columns.
-n | is the desired number of rows |
m | is the desired number of columns |
int DMatrix::atype [protected] |
-
Flag to indicate type of allocation. type = 0 : allocated matrix type = 1 : non-allocated matrix, uses predefined array for storage
- -int DMatrix::mtype [protected] |
-
Flag to indicate type of matrix mtype = 0 : normal matrix mtype = 1 : colon - reference matrix
- -
- DMatrix and SparseMatrix C++ classes
- |
-
error_message | ErrorHandler | |
ErrorHandler(const string m) | ErrorHandler |
- DMatrix and SparseMatrix C++ classes
- |
-
ErrorHandler class. -More...
- -#include <dmatrixv.h>
-Public Member Functions | |
ErrorHandler (const string m) | |
A constructor which takes the error message as an argument and assigns it to error_message. | |
-Public Attributes | |
-string | error_message |
A string of characters which contains the error message. |
ErrorHandler class.
-This is a C++ class intended to handle error conditions.
-ErrorHandler::ErrorHandler | -( | -const string | -m | ) | -- |
A constructor which takes the error message as an argument and assigns it to error_message.
-m | is the error message string. |
- DMatrix and SparseMatrix C++ classes
- |
-
InitializeDMatrixClass() | InitializeDMatrixClass | [inline] |
~InitializeDMatrixClass() | InitializeDMatrixClass | [inline] |
- DMatrix and SparseMatrix C++ classes
- |
-
InitializeDMatrixClass class. -More...
- -#include <dmatrixv.h>
-Public Member Functions | |
- | InitializeDMatrixClass () |
This is the default constructor which calls the function DMatrix::AllocateAuxArr(). | |
- | ~InitializeDMatrixClass () |
This is the destructor which calls the function DMatrix::DeAllocateAuxArr(). |
InitializeDMatrixClass class.
-This is a dummy C++ class intended to initialise the temporary objects of the DMatrix class.
-
- DMatrix and SparseMatrix C++ classes
- |
-
| complex | ErrorHandler |
|
| |||
alist |
|
| Multitype | olist | |||
| DMatrix | icilist |
|
| |||
cilist | doublecomplex | InitializeDMatrixClass | Namelist | Vardesc | |||
cllist |
| inlist |
- DMatrix and SparseMatrix C++ classes
- |
-
00001 /************************************************************************************************ -00002 This file is part of the DMatrix library, a C++ tool for numerical linear algebra -00003 -00004 Copyright (C) 2009 Victor M. Becerra -00005 -00006 This library is free software; you can redistribute it and/or -00007 modify it under the terms of the GNU Lesser General Public -00008 License as published by the Free Software Foundation; either -00009 version 2.1 of the License, or (at your option) any later version. -00010 -00011 This library is distributed in the hope that it will be useful, -00012 but WITHOUT ANY WARRANTY; without even the implied warranty of -00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -00014 Lesser General Public License for more details. -00015 -00016 You should have received a copy of the GNU Lesser General Public -00017 License along with this library; if not, write to the Free Software -00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA, -00019 or visit http://www.gnu.org/licenses/ -00020 -00021 Author: Dr. Victor M. Becerra -00022 University of Reading -00023 School of Systems Engineering -00024 P.O. Box 225, Reading RG6 6AY -00025 United Kingdom -00026 e-mail: v.m.becerra@ieee.org -00027 -00028 **********************************************************************************************/ -00029 -00058 #ifndef DMATRIX_H -00059 #define DMATRIX_H -00060 -00061 #ifndef bool -00062 // typedef int bool; -00063 #endif -00064 -00065 #ifndef N_TEMP_OBJECTS -00066 #define N_TEMP_OBJECTS (40) -00067 #endif -00068 -00069 #ifndef D_TEMP_OBJECTS -00070 #define D_TEMP_OBJECTS (1000000) -00071 #endif -00072 -00073 #ifndef OUTPUT_STREAM -00074 #define OUTPUT_STREAM stderr -00075 #endif -00076 -00077 -00078 #ifdef SPARSE_MATRIX -00079 -00080 #include "cs.h" -00081 -00082 #endif -00083 -00084 #ifdef UNIX -00085 -00086 -00087 extern "C" { -00088 -00089 -00090 #include <stdio.h> -00091 #include <stdarg.h> -00092 -00093 -00094 } -00095 -00096 -00097 #else -00098 -00099 -00100 #include <stdio.h> -00101 #include <stdarg.h> -00102 -00103 #ifdef WIN32 -00104 #include <stdlib.h> -00105 #include <malloc.h> -00106 #endif -00107 -00108 #ifndef WIN32 -00109 #include <mem.h> static long start_clock; -00110 #endif -00111 -00112 #endif -00113 -00114 -00115 -00116 -00117 #ifndef MATLAB_MEX_FILE -00118 -00119 #define mxCalloc calloc -00120 #define mxFree free -00121 -00122 -00123 #endif /* MATLAB_MEX_FILE */ -00124 -00125 -00126 #include <time.h> -00127 -00128 #ifndef true -00129 #define true 1 -00130 #endif -00131 -00132 #ifndef false -00133 #define false 0 -00134 #endif -00135 -00136 #include <string> -00137 using std::string; -00138 -00139 -00140 #define RAND_MODULUS 2147483647 /* DO NOT CHANGE THIS VALUE */ -00141 #define RAND_MULTIPLIER 48271 /* DO NOT CHANGE THIS VALUE */ -00142 #define RAND_CHECK 399268537 /* DO NOT CHANGE THIS VALUE */ -00143 #define RAND_STREAMS 256 /* # of streams, DO NOT CHANGE THIS VALUE */ -00144 #define RAND_A256 22925 /* jump multiplier, DO NOT CHANGE THIS VALUE */ -00145 #define RAND_DEFAULT 123456789 /* initial seed, use 0 < RAND_DEFAULT < RAND_MODULUS */ -00146 -00147 -00148 class DMatrix; -00149 class SparseMatrix; -00150 -00152 -00159 class DMatrix { // define DMatrix class -00160 -00161 protected: -00163 double *a; -00165 long n; -00167 long m; -00169 long asize; -00174 int atype; -00179 int mtype; -00181 int auxFlag; -00183 int allocated; -00185 DMatrix* mt; -00187 const DMatrix* rowIndx; -00189 const DMatrix* colIndx; -00190 -00191 // Protected static members -00193 static DMatrix* auxPr; -00195 static int noAuxArr; -00197 static long dimAux; -00199 static int auxIndx; -00201 static int memberFlag; -00203 static int initFlag; -00205 static const double MACH_EPS; -00207 static int errorFlag; -00209 static int print_level; -00210 -00212 static long seed[]; -00214 static int stream; -00216 static time_t start_time; -00218 static clock_t start_clock; -00220 static DMatrix* GetTempPr(int i); -00222 static int GetMemberFlag() { return memberFlag; } -00224 static void SetMemberFlag(int arg) { memberFlag=arg; } -00226 static void ChkAuxArrays(); -00228 static int GetNoAuxArr() { return noAuxArr; } -00230 static long GetDimAux() { return dimAux; } -00232 static int GetInitFlag() { return initFlag; } -00234 static void SetInitFlag(int arg) { initFlag = arg ; } -00236 static int GetAuxIndx() { return auxIndx; } -00238 static int IncrementAuxIndx() { -00239 #ifdef CHECK_AUX -00240 fprintf(stderr,"\nauxIndx=%d",auxIndx); -00241 #endif -00242 return ++auxIndx; } -00244 static int DecrementAuxIndx() { return --auxIndx ; } -00246 static void SetAuxIndx( int i ) { auxIndx = i; } -00248 static void SetDimAux( long dd ) { dimAux = dd; } -00250 static void SetNoAuxArr( int nn ) { noAuxArr = nn ; } -00252 static void RiseErrorFlag() { errorFlag = true; } -00254 void SetAuxFlag(int arg) { auxFlag = arg; } -00256 int GetAuxFlag() { return auxFlag; } -00258 static clock_t GetStartTicks(void) { return start_clock; } -00260 static void SetStartTicks(clock_t st) { start_clock=st; } -00261 -00262 #ifdef DECLARED_TEMPS -00263 -00264 static double axp[N_TEMP_OBJECTS][D_TEMP_OBJECTS]; -00265 -00266 #endif -00267 -00268 -00269 #define MC_EPSILON 2.221e-16 -00270 -00272 -00280 friend void CholeskyDecomp(DMatrix& A, int n, DMatrix& pM); -00281 -00283 -00293 friend void CholeskySolution(const DMatrix& A, int n, const DMatrix& pM, -00294 const DMatrix& bM, DMatrix& xM); -00295 -00297 -00303 void Allocate(long size); -00304 -00306 -00311 void DeAllocate(); // De-allocate memory -00312 -00313 -00315 -00320 DMatrix& compMat( const DMatrix& m2, char op ) const; -00321 -00323 -00327 void SetReferencedDMatrixPointer( DMatrix* arg ) { mt = arg; } -00329 -00332 DMatrix* GetReferencedDMatrixPointer() { return mt; } -00334 -00338 void SetRowIndexPointer(const DMatrix* arg ) { rowIndx = arg; } -00340 -00344 void SetColIndexPointer(const DMatrix* arg ) { colIndx = arg; } -00346 -00350 void SetMType( int arg ); -00352 -00355 int GetMType() { return mtype; } -00357 -00361 DMatrix& AssignmentToColonReference( const DMatrix& A ); -00363 -00367 DMatrix& AssignmentToColonReference( double arg ); -00368 -00369 public: -00370 -00371 -00372 #ifdef SPARSE_MATRIX -00373 friend class SparseMatrix; -00374 #endif -00375 -00376 // Public methods -00378 -00389 static void AllocateAuxArr( void ); -00391 -00394 static void DeAllocateAuxArr( void ); -00396 -00399 static double random_uniform(void); -00401 -00404 static double random_gaussian(void); -00406 -00409 static DMatrix** GetAuxPr(void) { return &auxPr; } -00411 -00414 static int isThereError(void) { return errorFlag; } -00415 -00416 // Input / Output functions -00417 -00419 -00422 void input_matrix(); -00423 -00425 -00429 void Print(const char *text) const; -00430 -00432 -00436 void PrintInfo(const char *text) const; -00438 -00445 void Read(FILE *filex); -00447 -00451 void Save( const char * FileName ); -00453 -00458 void Load( const char * FileName ); -00459 -00461 -00465 void Fprint( FILE *filex ); -00466 -00468 -00472 static void SetPrintLevel( int plevel ); -00473 -00474 static int PrintLevel(); -00475 -00476 // Modifying member functions -00478 -00481 void FillWithZeros( void ); -00483 -00488 void SwapRows( int i, int j ); -00490 -00495 void SwapColumns( int i, int j ); -00497 -00500 void Transpose(void); -00502 -00507 void diag( const DMatrix& dd ); -00509 -00514 void SetColumn( const DMatrix& Col, int icol ); -00516 -00521 void SetRow( const DMatrix& Row, int irow ); -00523 -00528 void colMult(long c, double x ); -00530 -00535 void rowMult(long r, double x ); -00537 -00542 DMatrix& find(DMatrix& I, DMatrix& J) const; -00544 -00549 DMatrix& find(int* I, int* J) const; -00550 -00551 -00552 // Sub-matrix functions -00554 -00561 DMatrix& sub_matrix(long r1, long r2, long c1, long c2) const ; -00563 -00569 void SetSubMatrix(long row, long col, const DMatrix& A); -00570 -00571 // Interface functions -00573 -00576 long getn() {return n;} -00578 -00581 long getm() {return m;} -00583 -00586 long getn() const {return n;} -00588 -00591 long getm() const {return m;} -00593 -00596 long GetNoRows() { return n; } -00598 -00601 long GetNoRows() const { return n; } -00603 -00606 long GetNoCols() { return m; } -00608 -00611 long GetNoCols() const { return m; } -00613 -00616 double *GetPr() { return a; } -00618 -00621 double *GetConstPr() const { return a; } -00623 -00626 double* geta() {return a;} -00628 -00631 int getatype() { return atype; } -00633 -00636 int isEmpty() { if (n*m == 0) return 1; else return 0; } -00637 -00639 -00642 int isVector() const { if (n==1 || m==1) return 1; else return 0; } -00643 -00644 // methods to access to matrix elements, columns and rows -00646 -00651 double element(long i, long j ); -00653 -00658 double& elem( long i, long j ) { return a[ (j-1)*n + i-1 ]; } -00660 -00665 double elem( long i, long j ) const { return a[(j-1)*n+i-1]; } -00667 -00671 DMatrix& Column(long icol ) const; -00673 -00677 DMatrix& Row(long irow ) const; -00678 -00680 -00684 DMatrix& mpow(int p); -00685 -00686 -00687 // Constructors -00688 -00690 DMatrix(void); // Default constructor -00692 -00696 DMatrix( long Initn, long Initm); -00698 -00704 DMatrix( long vDim, double* v, long Initn, long Initm ); -00706 -00709 DMatrix( long Initn); // Column vector constructor using memory allocation -00711 -00716 DMatrix(long Initn,long Initm,double a11,...); -00718 -00721 DMatrix( const DMatrix& A); // copy constructor -00722 -00723 -00725 ~DMatrix(); -00726 // Resizing and assignment -00728 -00732 void Resize(long nnrow, long nncol ); -00734 -00739 void assign(long rows,long columns,double a11,...); // Assignment using variable list -00741 -00744 void MemCpyArray(double * aptr ); -00745 -00746 // Operators -00748 -00752 DMatrix& operator+ (const DMatrix& rval) const; -00754 -00758 DMatrix& operator += (const DMatrix &rval); -00760 -00763 DMatrix& operator+ (double x) const; -00765 -00769 DMatrix& operator -= (const DMatrix &rval); -00771 -00775 DMatrix& operator- (const DMatrix& rval) const; -00777 -00780 DMatrix& operator- (double x) const; -00782 -00786 friend DMatrix& operator- (const DMatrix& A); -00788 -00792 DMatrix& operator* (const DMatrix& rval) const; -00794 -00798 DMatrix& operator *= (const DMatrix &rval); -00800 -00804 DMatrix& operator* (double Arg) const; -00806 -00810 DMatrix& operator *= (double Arg); -00812 -00816 DMatrix& operator/ (double Arg) const; -00818 -00822 DMatrix& operator/ (const DMatrix& rval) const; -00824 -00828 DMatrix& operator% (const DMatrix& rval) const; -00830 -00834 DMatrix& operator /= (double Arg); -00836 -00840 DMatrix& operator= (const DMatrix& rval); -00842 -00846 DMatrix& operator = (double val); -00848 -00852 DMatrix& operator = (const char* str); -00854 -00858 DMatrix& operator ||(const DMatrix& B) const; -00860 -00864 DMatrix& operator &&(const DMatrix& B) const; -00866 -00870 DMatrix& operator^(double x); -00872 -00876 DMatrix& operator &(const DMatrix B) const; -00878 -00882 DMatrix& operator |(const DMatrix B) const; -00884 -00889 double& operator() (long row,long col); -00891 -00896 double& operator() (long row,const char* end); -00898 -00903 double& operator() (const char* end,long col); -00905 -00910 double operator() (long row,long col) const; -00912 -00917 double operator() (long row,const char* end) const; -00919 -00924 double operator() (const char* end,long col) const; -00926 -00930 double& operator() (long index ); -00932 -00936 double& operator() (const char* end); -00938 -00942 double operator() (long k ) const; -00944 -00948 double operator() (const char* end) const; -00950 -00954 DMatrix& operator > ( double val ) const ; -00956 -00960 DMatrix& operator < ( double val ) const ; -00962 -00966 DMatrix& operator >= ( double val ) const ; -00968 -00972 DMatrix& operator <= ( double val ) const ; -00974 -00978 DMatrix& operator == ( double val ) const ; -00980 -00984 DMatrix& operator != ( double val ) const ; -00986 -00990 DMatrix& operator > ( const DMatrix& val ) const ; -00992 -00996 DMatrix& operator < ( const DMatrix& val ) const ; -00998 -01002 DMatrix& operator >= ( const DMatrix& val ) const ; -01004 -01008 DMatrix& operator <= ( const DMatrix& val ) const ; -01010 -01014 DMatrix& operator == ( const DMatrix& val ) const ; -01016 -01020 DMatrix& operator != ( const DMatrix& val ) const ; -01021 -01022 // Indexing functions -01024 -01029 DMatrix& operator() (const DMatrix& RowIndx, const DMatrix& ColIndx ); -01031 -01035 DMatrix& operator() (const DMatrix& RowIndx ); -01037 -01042 DMatrix& operator() (const DMatrix& RowIndx, long col ); -01044 -01049 DMatrix& operator() (long row, const DMatrix& ColIndx); -01051 -01056 DMatrix& operator() (const DMatrix& RowIndx,const char* end ); -01058 -01063 DMatrix& operator() (const char* end, const DMatrix& ColIndx); -01064 -01065 // Miscellaneous friend functions -01067 -01073 friend DMatrix& colon( double i1, double increment, double i2 ); -01075 -01081 friend DMatrix& colon( int i1, int increment, int i2); -01083 -01088 friend DMatrix& colon( int i1, int i2 ); -01090 -01095 friend DMatrix& colon( double i1, double i2); -01097 -01100 friend DMatrix& colon( void ); -01101 -01102 // Miscellaneous friend functions -01104 -01108 friend int any( const DMatrix& A ); -01110 -01115 friend DMatrix& mpow( DMatrix& A, int p ); -01117 -01122 friend DMatrix& operator *(double r, const DMatrix& A); -01124 -01128 friend DMatrix& tra(const DMatrix& A); -01130 -01134 friend DMatrix& inv(const DMatrix& A); -01136 -01140 friend DMatrix& pinv(const DMatrix& A); -01142 -01146 friend DMatrix& identity(long n); -01148 -01153 friend DMatrix& identity(long n, long m); -01155 -01159 friend DMatrix& eye(long n); -01161 -01166 friend DMatrix& eye(long n,long m); -01168 -01173 friend DMatrix& zeros(long n, long m); -01175 -01180 friend DMatrix& ones(long n, long m); -01182 -01186 friend DMatrix& expm(const DMatrix& A); -01188 -01192 friend DMatrix& sin(const DMatrix& A); -01194 -01198 friend DMatrix& cos(const DMatrix& A); -01200 -01204 friend DMatrix& tan(const DMatrix& A); -01206 -01210 friend DMatrix& exp(const DMatrix& A); -01212 -01216 friend DMatrix& sinh(const DMatrix& A); -01218 -01222 friend DMatrix& cosh(const DMatrix& A); -01224 -01228 friend DMatrix& tanh(const DMatrix& A); -01230 -01234 friend DMatrix& log(const DMatrix& A); -01236 -01240 friend DMatrix& diag( const DMatrix& A ); -01242 -01247 friend DMatrix& TProduct(const DMatrix& A,const DMatrix& B); -01249 -01254 friend DMatrix& ProductT(const DMatrix& A,const DMatrix& B); -01256 -01261 friend DMatrix& TProductT(const DMatrix& A,const DMatrix& B); -01263 -01268 friend DMatrix& Product(const DMatrix& A,const DMatrix& B); -01270 -01276 friend DMatrix& LUSolve(const DMatrix& A ,const DMatrix& b ); -01278 -01284 friend DMatrix& LUFSolve(const DMatrix& ALU ,const DMatrix& b ); -01286 -01292 friend DMatrix& CholSolve( const DMatrix& A, const DMatrix &b ); -01294 -01300 friend DMatrix& CholFSolve( const DMatrix& Achol, const DMatrix &b ); -01302 -01307 friend DMatrix& Chol( const DMatrix& A ); -01309 -01313 friend DMatrix& CholeskyRoot(const DMatrix& A ); -01315 -01321 friend DMatrix& QRSolve( const DMatrix& A, const DMatrix &b ); -01323 -01329 friend DMatrix& QRFSolve( const DMatrix& A, const DMatrix &b ); -01331 -01336 friend DMatrix& QR( const DMatrix& A ); -01337 -01339 -01344 friend DMatrix& LSMNSolve( const DMatrix& A, const DMatrix& B ); -01345 -01347 -01352 friend DMatrix& LQ( const DMatrix& A, DMatrix* Q ); -01354 -01359 friend DMatrix& LU( const DMatrix& A ); -01361 -01367 friend DMatrix& SVD( const DMatrix& A, DMatrix* U=NULL, DMatrix* V=NULL ); -01369 -01373 friend DMatrix& orth( const DMatrix& A ); -01375 -01379 friend DMatrix& null( const DMatrix& A ); -01381 -01387 friend DMatrix& SVDSolve( const DMatrix& A, const DMatrix& B ); -01389 -01394 friend DMatrix& schur(const DMatrix& A, DMatrix* U= NULL ); -01396 -01401 friend DMatrix& eig(const DMatrix& A, DMatrix* V= NULL ); -01403 -01407 friend double enorm(const DMatrix& A); -01409 -01413 friend double norm(const DMatrix& A); -01415 -01419 friend double InfNorm(const DMatrix& A); -01421 -01425 friend double Fnorm( const DMatrix& A); -01427 -01431 friend DMatrix& Abs(const DMatrix& A); -01433 -01439 friend double Max(const DMatrix& A,int* rindx=NULL, int* cindx=NULL); -01441 -01447 friend double MaxAbs(const DMatrix& A, int* rindx=NULL, int* cindx=NULL); -01449 -01455 friend double Min(const DMatrix& A, int* rindx=NULL, int* cindx=NULL ); -01457 -01463 friend double MinAbs(const DMatrix& A, int* rindx=NULL, int* cindx=NULL); -01465 -01470 friend void sort( DMatrix& x, int indx[] = NULL); -01472 -01477 friend void sort( DMatrix& x, DMatrix& indx); -01479 -01484 friend double dotProduct( const DMatrix& x, const DMatrix& y ); -01486 -01491 friend double dot(const DMatrix& x, const DMatrix& y) { return dotProduct(x,y); } -01493 -01498 friend DMatrix& crossProduct(const DMatrix& x, const DMatrix& y); -01500 -01505 friend DMatrix& cross(const DMatrix& x, const DMatrix& y) { return crossProduct(x,y); } -01507 -01511 friend int isSymmetric( const DMatrix& A ); -01513 -01517 friend double cond( const DMatrix& A ); -01519 -01523 friend double rcond( const DMatrix& A ); -01525 -01529 friend int rank( const DMatrix& A ); -01531 -01535 friend double det( const DMatrix& A ); -01537 -01541 friend double trace( const DMatrix& A ); -01543 -01547 friend DMatrix& mean( const DMatrix& A ); -01549 -01554 friend DMatrix& Std( const DMatrix& A, int ntype=0 ); -01556 -01561 friend DMatrix& cov( const DMatrix& A, int ntype=0 ); -01563 -01569 friend DMatrix& cov(DMatrix& X, DMatrix& Y, int ntype=0 ); -01571 -01576 friend DMatrix& var(DMatrix& A, int ntype=0 ); -01578 -01582 friend DMatrix& sum( const DMatrix& A ); -01584 -01588 friend DMatrix& prod( const DMatrix& A ); -01590 -01595 friend DMatrix& elemProduct( const DMatrix& A, const DMatrix& B ); -01597 -01602 friend DMatrix& elemDivision( const DMatrix& A, const DMatrix& B); -01604 -01609 friend DMatrix& kronProduct( const DMatrix& A, const DMatrix& B ); -01611 -01615 friend DMatrix& vec( const DMatrix& A ); -01617 -01621 friend DMatrix& MatrixSign( const DMatrix& A ); -01623 -01627 friend DMatrix& find(const DMatrix& A); -01629 -01634 friend DMatrix& randu(long n, long m); -01636 -01641 friend DMatrix& randn(long n, long m); -01643 -01649 friend DMatrix& linspace(double X1, double X2, long N); -01651 static double GetEPS() { return MC_EPSILON ; } -01652 -01654 -01658 friend void error_message(const char *input_text); -01660 friend void tic(void); -01662 -01665 friend double toc(); -01666 -01667 #ifdef MATLAB_MEX_FILE -01668 friend void mxArray2DMatrix( DMatrix& A, mxArray* mx ); -01669 -01670 friend void DMatrix2mxArray( char* Name, mxArray* mx, DMatrix& A ); -01671 -01672 #endif -01673 -01674 -01678 friend DMatrix& Sqrt(const DMatrix& A); -01680 -01684 friend DMatrix& triu(const DMatrix& A); -01686 -01692 friend DMatrix& reshape(DMatrix& A, long N, long M); -01694 -01698 friend long length(const DMatrix& A); -01699 -01700 }; -01701 -01702 -01704 -01708 class InitializeDMatrixClass{ -01709 -01710 public: -01712 InitializeDMatrixClass() { DMatrix::AllocateAuxArr(); } -01714 ~InitializeDMatrixClass() { DMatrix::DeAllocateAuxArr(); } -01715 -01716 }; -01717 -01718 -01719 -01720 /* inline utility functions and prototypes */ -01721 // Swap double -01722 inline void Swap(double *x,double *y) -01723 {double temp = *x; *x = *y; *y = temp;} -01724 // Swap int -01725 inline void Swap(int *x,int *y) -01726 {int temp = *x; *x = *y; *y = temp;} -01727 double MachEps(void); -01728 double ArrayNorm( long n, double* x ); -01729 double factorial(long j); -01730 /* Declaration of all friend functions of DMatrix class */ -01731 void CholeskyDecomp(DMatrix& a, int n, DMatrix& pM); -01732 void CholeskySolution(const DMatrix& a, int n, const DMatrix& pM, -01733 const DMatrix& bM, DMatrix& xM); -01734 void Hessemberg(DMatrix& a ); -01735 DMatrix& operator- (const DMatrix& A); -01736 DMatrix& colon( double i1, double increment, double i2 ); -01737 DMatrix& colon( int i1, int increment, int i2); -01738 DMatrix& colon( int i1, int i2 ); -01739 DMatrix& colon( double i1, double i2); -01740 DMatrix& colon( void ); -01741 int any( const DMatrix& val ); -01742 DMatrix& mpow( DMatrix& A, int p ); -01743 DMatrix& operator *(double Arg, const DMatrix& A); -01744 DMatrix& tra(const DMatrix& A); -01745 DMatrix& inv(const DMatrix& A); -01746 DMatrix& pinv(const DMatrix& A); -01747 DMatrix& identity(long n); -01748 DMatrix& identity(long n, long m); -01749 DMatrix& eye(long n); -01750 DMatrix& eye(long n,long m); -01751 DMatrix& zeros(long n, long m); -01752 DMatrix& ones(long n, long m); -01753 DMatrix& expm(const DMatrix& A); -01754 DMatrix& sin(const DMatrix& A); -01755 DMatrix& cos(const DMatrix& A); -01756 DMatrix& tan(const DMatrix& A); -01757 DMatrix& exp(const DMatrix& A); -01758 DMatrix& log(const DMatrix& A); -01759 DMatrix& diag( const DMatrix& A ); -01760 DMatrix& TProduct(const DMatrix& A,const DMatrix& B); -01761 DMatrix& ProductT(const DMatrix& A,const DMatrix& B); -01762 DMatrix& TProductT(const DMatrix& A,const DMatrix& B); -01763 DMatrix& Product(const DMatrix& A,const DMatrix& B); -01764 DMatrix& LUSolve(const DMatrix& A ,const DMatrix& b ); -01765 DMatrix& LUFSolve(const DMatrix& ALU ,const DMatrix& b ); -01766 DMatrix& CholSolve( const DMatrix& A, const DMatrix &b ); -01767 DMatrix& CholFSolve( const DMatrix& Achol, const DMatrix &b ); -01768 DMatrix& Chol( const DMatrix& A ); -01769 DMatrix& CholeskyRoot(const DMatrix& A ); -01770 DMatrix& QRSolve( const DMatrix& A, const DMatrix &b ); -01771 DMatrix& QRFSolve( const DMatrix& A, const DMatrix &b ); -01772 DMatrix& QR( const DMatrix& A ); -01773 DMatrix& LQ( const DMatrix& A, DMatrix* Q ); -01774 DMatrix& LU( const DMatrix& A ); -01775 DMatrix& SVD( const DMatrix& A, DMatrix* U, DMatrix* V ); -01776 DMatrix& orth( const DMatrix& A ); -01777 DMatrix& null( const DMatrix& A ); -01778 DMatrix& SVDSolve( const DMatrix& A, const DMatrix& B ); -01779 DMatrix& schur(const DMatrix& A, DMatrix* U ); -01780 DMatrix& eig(const DMatrix& A, DMatrix* V ); -01781 double enorm(const DMatrix& A); -01782 double norm(const DMatrix& A); -01783 DMatrix& Abs(const DMatrix& A); -01784 double Max(const DMatrix& A,int* rindx, int* cindx); -01785 double MaxAbs(const DMatrix& A, int* rindx, int* cindx); -01786 double Min(const DMatrix& A, int* rindx, int* cindx ); -01787 double MinAbs(const DMatrix& A, int* rindx, int* cindx); -01788 void sort( DMatrix& A, int indx[]); -01789 void sort( DMatrix& A, DMatrix& indx); -01790 double InfNorm(const DMatrix& A); -01791 double Fnorm( const DMatrix& A); -01792 double dotProduct( const DMatrix& A, const DMatrix& B ); -01793 int isSymmetric( const DMatrix& A ); -01794 double cond( const DMatrix& A ); -01795 double rcond( const DMatrix& A ); -01796 int rank( const DMatrix& A ); -01797 double det( const DMatrix& A ); -01798 double trace( const DMatrix& A ); -01799 DMatrix& mean( const DMatrix& A ); -01800 DMatrix& Std( const DMatrix& A, int ntype ); -01801 DMatrix& cov( const DMatrix& A, int ntype ); -01802 DMatrix& cov(DMatrix& X, DMatrix& Y, int ntype ); -01803 DMatrix& var(DMatrix& A, int ntype); -01804 DMatrix& sum( const DMatrix& A ); -01805 DMatrix& prod( const DMatrix& A ); -01806 DMatrix& elemProduct( const DMatrix& A, const DMatrix& B ); -01807 DMatrix& elemDivision( const DMatrix& A, const DMatrix& B); -01808 DMatrix& kronProduct( const DMatrix& A, const DMatrix& B ); -01809 DMatrix& vec( const DMatrix& A ); -01810 DMatrix& MatrixSign( const DMatrix& A ); -01811 DMatrix& find(const DMatrix& A); -01812 DMatrix& randu(long n, long m); -01813 DMatrix& randn(long n, long m); -01814 DMatrix& linspace(double X1, double X2, long N); -01815 DMatrix& LSMNSolve( const DMatrix& A, const DMatrix& B ); -01816 void error_message(const char *input_text); -01817 void tic(void); -01818 double toc(); -01819 #ifdef MATLAB_MEX_FILE -01820 void mxArray2DMatrix( DMatrix& A, mxArray* mx ); -01821 void DMatrix2mxArray( const char* Name, mxArray* mx, DMatrix& A ); -01822 #endif -01823 DMatrix& Sqrt(const DMatrix& A); -01824 DMatrix& triu(const DMatrix& A); -01825 DMatrix& reshape(DMatrix& A, long nn, long mm); -01826 long length(const DMatrix& A); -01827 void* my_calloc(size_t num, size_t size ); -01828 -01829 -01830 // =========================================================== -01831 -01832 -01833 -01834 #ifdef LAPACK -01835 -01836 -01837 -01838 extern "C" { -01839 -01840 #include "f2c.h" -01841 -01842 /* CLAPACK real matrix eigenvalues routine */ -01843 int dgeev_(char *jobvl, char *jobvr, integer *n, doublereal * -01844 a, integer *lda, doublereal *wr, doublereal *wi, doublereal *vl, -01845 integer *ldvl, doublereal *vr, integer *ldvr, doublereal *work, -01846 integer *lwork, integer *info); -01847 -01848 /* CLAPACK symmetric real matrix eigenvalues routine */ -01849 int dsyev_(char *jobz, char *uplo, integer *n, doublereal *a, -01850 integer *lda, doublereal *w, doublereal *work, integer *lwork, -01851 integer *info); -01852 -01853 /* CLAPACK real matrix singular value decomposition routine */ -01854 int dgesvd_(char *jobu, char *jobvt, integer *m, integer *n, -01855 doublereal *a, integer *lda, doublereal *s, doublereal *u, integer * -01856 ldu, doublereal *vt, integer *ldvt, doublereal *work, integer *lwork, -01857 integer *info); -01858 -01859 /* CLAPACK real matrix schur decomposition routine */ -01860 int dgees_(char *jobvs, char *sort, L_fp select, integer *n, -01861 doublereal *a, integer *lda, integer *sdim, doublereal *wr, -01862 doublereal *wi, doublereal *vs, integer *ldvs, doublereal *work, -01863 integer *lwork, logical *bwork, integer *info); -01864 -01865 /* CLAPACK rectangular linear system solution routine */ -01866 int dgels_(char *trans, integer *m, integer *n, integer * -01867 nrhs, doublereal *a, integer *lda, doublereal *b, integer *ldb, -01868 doublereal *work, integer *lwork, integer *info); -01869 -01870 /* CLAPACK reciprocal condition number estimator */ -01871 int dgecon_(char *norm, integer *n, doublereal *a, integer * -01872 lda, doublereal *anorm, doublereal *rcond, doublereal *work, integer * -01873 iwork, integer *info); -01874 -01875 /* CLAPACK LU factorization routine */ -01876 int dgetrf_(integer *m, integer *n, doublereal *a, integer * -01877 lda, integer *ipiv, integer *info); -01878 -01879 /* CLAPACK Minimum norm solution by using singular value decomp */ -01880 int dgelss_(integer *m, integer *n, integer *nrhs, -01881 doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal * -01882 s, doublereal *rcond, integer *rank, doublereal *work, integer *lwork, -01883 integer *info); -01884 -01885 /* CLAPACK LQ factorization routine */ -01886 -01887 int dgelqf_(integer *m, integer *n, doublereal *a, integer * -01888 lda, doublereal *tau, doublereal *work, integer *lwork, integer *info); -01889 -01890 -01891 -01892 -01893 } /* End of extern "C" block */ -01894 -01895 #endif /* LAPACK */ -01896 -01897 -01898 // #define SPARSE -01899 -01900 #ifdef SPARSE_MATRIX -01901 -01902 -01904 -01908 class SparseMatrix { -01909 protected: -01911 double *a; -01913 int n; -01915 int m; -01917 int asize; -01919 int nz; -01921 int *RowIndx; -01923 int *ColIndx; -01924 -01925 public: -01926 -01927 // Interface functions -01929 -01932 int GetNoRows() const { return n; } -01934 -01937 int GetNoCols() const { return m; } -01939 -01942 int GetNonZero() const {return nz;} -01944 -01947 DMatrix& GetRowIndxDMatrix(); -01949 -01952 DMatrix& GetColIndxDMatrix(); -01954 -01957 int* GetRowIndx_C_Array() const {return RowIndx;} -01959 -01962 int* GetColIndx_C_Array() const {return ColIndx;} -01964 -01967 double *GetPr() const { return a; } -01969 -01975 void InsertNonZero(int i, int j, double val); -01977 -01981 void Save(const char* fname) const; -01983 -01987 void SaveSparsityPattern(const char* fname) const; -01989 -01993 void Load(const char* fname); -01995 -01999 friend SparseMatrix& tra(const SparseMatrix& A); -02001 -02008 SparseMatrix& sub_matrix(int istart, int iend, int jstart, int jend) const; -02010 -02014 DMatrix& Column(int j) const; -02016 -02020 DMatrix& Row(int i) const; -02022 -02030 void set_sub_matrix(const SparseMatrix& B, int istart, int iend, int jstart, int jend); -02031 -02032 // Display functions -02034 -02038 void Print(const char* text); -02039 -02040 // Constructors -02042 SparseMatrix(void); // Default constructor -02044 -02052 SparseMatrix(double* aa, int nn, int mm, int nnz, int* RowIndxArg, int* ColIndxArg); // Constructor using arrays -02054 -02057 SparseMatrix( const DMatrix& A ); // Constructor using DMatrix object -02059 -02062 SparseMatrix( const SparseMatrix& A); // copy constructor -02064 -02069 SparseMatrix( int nn, int mm, int nnz); // Constructor without element assigment -02070 -02071 // Destructor -02073 ~SparseMatrix(); -02074 -02075 // Other functions -02077 -02083 void Resize(int nnew, int mnew, int nznew); -02085 -02089 friend SparseMatrix& inv(SparseMatrix& A); -02091 -02094 void Transpose(); -02096 -02101 friend SparseMatrix& Product(const SparseMatrix& A,const SparseMatrix& B); -02103 -02108 friend SparseMatrix& TProduct(SparseMatrix& A,SparseMatrix& B); -02110 -02115 friend SparseMatrix& ProductT(SparseMatrix& A, SparseMatrix& B); -02117 -02122 friend SparseMatrix& elemProduct(const SparseMatrix A, const SparseMatrix& B); -02124 -02128 friend SparseMatrix& sparse(DMatrix& A); -02130 -02134 friend SparseMatrix& speye(int n); -02136 -02140 friend SparseMatrix& spones(const SparseMatrix& s); -02142 -02146 friend SparseMatrix& spconvert(DMatrix& A); -02148 -02152 friend DMatrix& full(const SparseMatrix& A); -02154 -02158 friend DMatrix& null( const SparseMatrix& A ); -02160 -02166 friend DMatrix& SVD(const SparseMatrix& A, DMatrix* U=NULL, DMatrix* V=NULL ); -02168 -02172 friend DMatrix& QR( const SparseMatrix& A ); -02174 -02179 friend DMatrix& LQ( const SparseMatrix& A, DMatrix* Q ); -02181 -02185 friend DMatrix& orth( const SparseMatrix& A ); -02187 -02192 friend DMatrix& schur(const SparseMatrix& A, DMatrix* U= NULL ); -02194 -02199 friend DMatrix& eig(const SparseMatrix& A, DMatrix* V= NULL ); -02201 -02205 friend double enorm(const SparseMatrix& A); -02207 -02211 friend double norm(const SparseMatrix& A); -02213 -02217 friend SparseMatrix& Abs(const SparseMatrix& A); -02219 -02223 friend double cond( const SparseMatrix& A ); -02225 -02229 friend double rcond( const SparseMatrix& A ); -02231 -02235 friend int rank( const SparseMatrix& A ); -02237 -02241 friend SparseMatrix& sprand(const SparseMatrix& S); -02243 -02249 friend SparseMatrix& sprand(int n, int m, double density); -02251 -02255 friend SparseMatrix& sprandn(const SparseMatrix& S); -02257 -02263 friend SparseMatrix& sprandn(int n, int m, double density); -02264 -02266 -02269 void Compress(); -02270 -02271 // Operators -02273 -02277 SparseMatrix& operator += (const SparseMatrix &rval); -02279 -02283 SparseMatrix& operator -= (const SparseMatrix &rval); -02285 -02289 SparseMatrix& operator *= (const SparseMatrix &rval); -02291 -02295 SparseMatrix& operator*= (double Arg); -02297 -02301 SparseMatrix& operator/= (double Arg); -02303 -02307 SparseMatrix& operator+ (const SparseMatrix& rval) const; -02309 -02313 SparseMatrix& operator - (const SparseMatrix& rval) const; -02315 -02319 SparseMatrix& operator* (const SparseMatrix& rval) const; -02321 -02325 SparseMatrix& operator* (DMatrix& rval) const; -02327 -02331 SparseMatrix& operator* (double Arg) const; -02333 -02338 friend SparseMatrix& operator *(double Arg, const SparseMatrix& A); -02340 -02344 SparseMatrix& operator/ (double Arg) const; -02346 -02350 SparseMatrix& operator/ (SparseMatrix& rval); -02352 -02356 SparseMatrix& operator= (const SparseMatrix& rval); -02358 -02362 SparseMatrix& operator^(double x) const; -02364 -02368 SparseMatrix& operator||(SparseMatrix& B) const; -02370 -02374 SparseMatrix& operator&&(SparseMatrix& B) const; -02376 -02381 double& operator() (int row,int col); -02383 -02388 double operator() (int row,int col) const; -02390 -02394 SparseMatrix& operator %(SparseMatrix& B); -02396 -02405 friend void SparseLUSolve(SparseMatrix& A, DMatrix& b, DMatrix& x, DMatrix& r, int argc, char *argv[]); -02407 -02414 friend void* SparseLUFactor(SparseMatrix& A, int argc, char *argv[]); -02416 -02427 friend void SparseLUSolveGivenFactor(void* LUSOLv, SparseMatrix& A, DMatrix& b, DMatrix& x, DMatrix& r, int argc, char *argv[]); -02429 -02433 friend void sp_error_message(const char *error_text); -02434 -02435 -02436 }; -02437 -02438 // Declaration of all friend functions of SparseMatrix class -02439 -02440 void SparseLUSolve(SparseMatrix& A, DMatrix& bb, DMatrix& xx, DMatrix& rr, int argc=1, char *argv[]=NULL); -02441 -02442 void* SparseLUFactor(SparseMatrix& A, int argc=1, char *argv[]=NULL); -02443 -02444 void SparseLUSolveGivenFactor(void* LUSOLv, SparseMatrix& A, DMatrix& bb, DMatrix& xx, DMatrix& rr, int argc=1, char *argv[]=NULL); -02445 -02446 void sp_error_message(const char *error_text); -02447 -02448 SparseMatrix& TProduct(SparseMatrix& A,SparseMatrix& B); -02449 -02450 SparseMatrix& ProductT(SparseMatrix& A, SparseMatrix& B); -02451 -02452 SparseMatrix& elemProduct(const SparseMatrix A, const SparseMatrix& B); -02453 -02454 SparseMatrix& tra(const SparseMatrix& A); -02455 SparseMatrix& inv(SparseMatrix& A); -02456 SparseMatrix& Product(const SparseMatrix& A,const SparseMatrix& B); -02457 SparseMatrix& sparse(DMatrix& A); -02458 SparseMatrix& speye(int n); -02459 SparseMatrix& spones(const SparseMatrix& s); -02460 SparseMatrix& spconvert(DMatrix& A); -02461 DMatrix& full(const SparseMatrix& A); -02462 DMatrix& null( const SparseMatrix& A ); -02463 DMatrix& SVD(const SparseMatrix& A, DMatrix* U, DMatrix* V ); -02464 DMatrix& QR( const SparseMatrix& A ); -02465 DMatrix& LQ( const SparseMatrix& A, DMatrix* Q ); -02466 DMatrix& orth( const SparseMatrix& A ); -02467 DMatrix& schur(const SparseMatrix& A, DMatrix* U ); -02468 DMatrix& eig(const SparseMatrix& A, DMatrix* V ); -02469 double enorm(const SparseMatrix& A); -02470 double norm(const SparseMatrix& A); -02471 SparseMatrix& Abs(const SparseMatrix& A); -02472 double cond( const SparseMatrix& A ); -02473 double rcond( const SparseMatrix& A ); -02474 int rank( const SparseMatrix& A ); -02475 SparseMatrix& sprand(const SparseMatrix& S); -02476 SparseMatrix& sprand(int n, int m, double density); -02477 SparseMatrix& sprandn(const SparseMatrix& S); -02478 SparseMatrix& sprandn(int n, int m, double density); -02479 SparseMatrix& operator *(double Arg, const SparseMatrix& A); -02480 -02481 -02482 // =========================================================== -02483 -02484 -02485 -02486 -02487 #endif /* SPARSE_MATRIX */ -02488 -02489 -02491 -02494 class ErrorHandler -02495 { -02496 public: -02498 string error_message; -02500 -02504 ErrorHandler(const string m); -02505 }; -02506 -02507 -02508 -02509 #endif /* DMATRIX_H */ -02510 -02511 -02512 -
- DMatrix and SparseMatrix C++ classes
- |
-
00001 /* f2c.h -- Standard Fortran to C header file */ -00002 -00007 #ifndef F2C_INCLUDE -00008 #define F2C_INCLUDE -00009 -00010 typedef long int integer; -00011 typedef unsigned long int uinteger; -00012 typedef char *address; -00013 typedef short int shortint; -00014 typedef float real; -00015 typedef double doublereal; -00016 typedef struct { real r, i; } complex; -00017 typedef struct { doublereal r, i; } doublecomplex; -00018 typedef long int logical; -00019 typedef short int shortlogical; -00020 typedef char logical1; -00021 typedef char integer1; -00022 #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ -00023 typedef long long longint; /* system-dependent */ -00024 typedef unsigned long long ulongint; /* system-dependent */ -00025 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) -00026 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) -00027 #endif -00028 -00029 #define TRUE_ (1) -00030 #define FALSE_ (0) -00031 -00032 /* Extern is for use with -E */ -00033 #ifndef Extern -00034 #define Extern extern -00035 #endif -00036 -00037 /* I/O stuff */ -00038 -00039 #ifdef f2c_i2 -00040 /* for -i2 */ -00041 typedef short flag; -00042 typedef short ftnlen; -00043 typedef short ftnint; -00044 #else -00045 typedef long int flag; -00046 typedef long int ftnlen; -00047 typedef long int ftnint; -00048 #endif -00049 -00050 /*external read, write*/ -00051 typedef struct -00052 { flag cierr; -00053 ftnint ciunit; -00054 flag ciend; -00055 char *cifmt; -00056 ftnint cirec; -00057 } cilist; -00058 -00059 /*internal read, write*/ -00060 typedef struct -00061 { flag icierr; -00062 char *iciunit; -00063 flag iciend; -00064 char *icifmt; -00065 ftnint icirlen; -00066 ftnint icirnum; -00067 } icilist; -00068 -00069 /*open*/ -00070 typedef struct -00071 { flag oerr; -00072 ftnint ounit; -00073 char *ofnm; -00074 ftnlen ofnmlen; -00075 char *osta; -00076 char *oacc; -00077 char *ofm; -00078 ftnint orl; -00079 char *oblnk; -00080 } olist; -00081 -00082 /*close*/ -00083 typedef struct -00084 { flag cerr; -00085 ftnint cunit; -00086 char *csta; -00087 } cllist; -00088 -00089 /*rewind, backspace, endfile*/ -00090 typedef struct -00091 { flag aerr; -00092 ftnint aunit; -00093 } alist; -00094 -00095 /* inquire */ -00096 typedef struct -00097 { flag inerr; -00098 ftnint inunit; -00099 char *infile; -00100 ftnlen infilen; -00101 ftnint *inex; /*parameters in standard's order*/ -00102 ftnint *inopen; -00103 ftnint *innum; -00104 ftnint *innamed; -00105 char *inname; -00106 ftnlen innamlen; -00107 char *inacc; -00108 ftnlen inacclen; -00109 char *inseq; -00110 ftnlen inseqlen; -00111 char *indir; -00112 ftnlen indirlen; -00113 char *infmt; -00114 ftnlen infmtlen; -00115 char *inform; -00116 ftnint informlen; -00117 char *inunf; -00118 ftnlen inunflen; -00119 ftnint *inrecl; -00120 ftnint *innrec; -00121 char *inblank; -00122 ftnlen inblanklen; -00123 } inlist; -00124 -00125 #define VOID void -00126 -00127 union Multitype { /* for multiple entry points */ -00128 integer1 g; -00129 shortint h; -00130 integer i; -00131 /* longint j; */ -00132 real r; -00133 doublereal d; -00134 complex c; -00135 doublecomplex z; -00136 }; -00137 -00138 typedef union Multitype Multitype; -00139 -00140 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */ -00141 -00142 struct Vardesc { /* for Namelist */ -00143 char *name; -00144 char *addr; -00145 ftnlen *dims; -00146 int type; -00147 }; -00148 typedef struct Vardesc Vardesc; -00149 -00150 struct Namelist { -00151 char *name; -00152 Vardesc **vars; -00153 int nvars; -00154 }; -00155 typedef struct Namelist Namelist; -00156 -00157 #define abs(x) ((x) >= 0 ? (x) : -(x)) -00158 #define dabs(x) (doublereal)abs(x) -00159 #define min(a,b) ((a) <= (b) ? (a) : (b)) -00160 #define max(a,b) ((a) >= (b) ? (a) : (b)) -00161 #define dmin(a,b) (doublereal)min(a,b) -00162 #define dmax(a,b) (doublereal)max(a,b) -00163 #define bit_test(a,b) ((a) >> (b) & 1) -00164 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) -00165 #define bit_set(a,b) ((a) | ((uinteger)1 << (b))) -00166 -00167 /* procedure parameter types for -A and -C++ */ -00168 -00169 #define F2C_proc_par_types 1 -00170 #ifdef __cplusplus -00171 typedef int /* Unknown procedure type */ (*U_fp)(...); -00172 typedef shortint (*J_fp)(...); -00173 typedef integer (*I_fp)(...); -00174 typedef real (*R_fp)(...); -00175 typedef doublereal (*D_fp)(...), (*E_fp)(...); -00176 typedef /* Complex */ VOID (*C_fp)(...); -00177 typedef /* Double Complex */ VOID (*Z_fp)(...); -00178 typedef logical (*L_fp)(...); -00179 typedef shortlogical (*K_fp)(...); -00180 typedef /* Character */ VOID (*H_fp)(...); -00181 typedef /* Subroutine */ int (*S_fp)(...); -00182 #else -00183 typedef int /* Unknown procedure type */ (*U_fp)(); -00184 typedef shortint (*J_fp)(); -00185 typedef integer (*I_fp)(); -00186 typedef real (*R_fp)(); -00187 typedef doublereal (*D_fp)(), (*E_fp)(); -00188 typedef /* Complex */ VOID (*C_fp)(); -00189 typedef /* Double Complex */ VOID (*Z_fp)(); -00190 typedef logical (*L_fp)(); -00191 typedef shortlogical (*K_fp)(); -00192 typedef /* Character */ VOID (*H_fp)(); -00193 typedef /* Subroutine */ int (*S_fp)(); -00194 #endif -00195 /* E_fp is for real functions when -R is not specified */ -00196 typedef VOID C_f; /* complex function */ -00197 typedef VOID H_f; /* character function */ -00198 typedef VOID Z_f; /* double complex function */ -00199 typedef doublereal E_f; /* real function with -R not specified */ -00200 -00201 /* undef any lower-case symbols that your C compiler predefines, e.g.: */ -00202 -00203 #ifndef Skip_f2c_Undefs -00204 #undef cray -00205 #undef gcos -00206 #undef mc68010 -00207 #undef mc68020 -00208 #undef mips -00209 #undef pdp11 -00210 #undef sgi -00211 #undef sparc -00212 #undef sun -00213 #undef sun2 -00214 #undef sun3 -00215 #undef sun4 -00216 #undef u370 -00217 #undef u3b -00218 #undef u3b2 -00219 #undef u3b5 -00220 #undef unix -00221 #undef vax -00222 #endif -00223 #endif -
- DMatrix and SparseMatrix C++ classes
- |
-
dmatrixv.h [code] | |
f2c.h [code] |
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
The author developed the main features of the DMatrix class between 1994 and 1999. The class makes extensive use of operator overloading in order to facilitate the implementation in C++ of complicated matrix expressions, and it has intefaces to a number of LAPACK routines. In 2008, the class has been tested with current compilers, its functionality was expanded, and the code was published under the GNU Lesser General Public License. The class at present is restricted to dense and real matrices. In 2008, the SparseMatrix class was added to the library to incorporate basic sparse matrix functionality. The SparseMatrix class offers interfaces to some functions available in the CXSparse and LUSOL libraries.
-The library should compile without problems with the following C++ compilers: GNU C++ version 4.X and Microsoft Visual Studio 2005.
-This work is copyright (c) Victor M. Becerra (2009)
-This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
-This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA, or visit http://www.gnu.org/licenses/
-Author: Dr. Victor M. Becerra, University of Reading, School of Systems Engineering, P.O. Box 225, Reading RG6 6AY, United Kingdom, e-mail: v.m.becerra@ieee.org.
-See the INSTALL file.
-See the source code in the examples directory.
-
- DMatrix and SparseMatrix C++ classes
- |
-
name (defined in Namelist) | Namelist | |
nvars (defined in Namelist) | Namelist | |
vars (defined in Namelist) | Namelist |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-char * | name |
-Vardesc ** | vars |
-int | nvars |
- DMatrix and SparseMatrix C++ classes
- |
-
addr (defined in Vardesc) | Vardesc | |
dims (defined in Vardesc) | Vardesc | |
name (defined in Vardesc) | Vardesc | |
type (defined in Vardesc) | Vardesc |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-char * | name |
-char * | addr |
-ftnlen * | dims |
-int | type |
- DMatrix and SparseMatrix C++ classes
- |
-
aerr (defined in alist) | alist | |
aunit (defined in alist) | alist |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-flag | aerr |
-ftnint | aunit |
- DMatrix and SparseMatrix C++ classes
- |
-
ciend (defined in cilist) | cilist | |
cierr (defined in cilist) | cilist | |
cifmt (defined in cilist) | cilist | |
cirec (defined in cilist) | cilist | |
ciunit (defined in cilist) | cilist |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-flag | cierr |
-ftnint | ciunit |
-flag | ciend |
-char * | cifmt |
-ftnint | cirec |
- DMatrix and SparseMatrix C++ classes
- |
-
cerr (defined in cllist) | cllist | |
csta (defined in cllist) | cllist | |
cunit (defined in cllist) | cllist |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-flag | cerr |
-ftnint | cunit |
-char * | csta |
- DMatrix and SparseMatrix C++ classes
- |
-
i (defined in complex) | complex | |
r (defined in complex) | complex |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-real | r |
-real | i |
- DMatrix and SparseMatrix C++ classes
- |
-
i (defined in doublecomplex) | doublecomplex | |
r (defined in doublecomplex) | doublecomplex |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-doublereal | r |
-doublereal | i |
- DMatrix and SparseMatrix C++ classes
- |
-
iciend (defined in icilist) | icilist | |
icierr (defined in icilist) | icilist | |
icifmt (defined in icilist) | icilist | |
icirlen (defined in icilist) | icilist | |
icirnum (defined in icilist) | icilist | |
iciunit (defined in icilist) | icilist |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-flag | icierr |
-char * | iciunit |
-flag | iciend |
-char * | icifmt |
-ftnint | icirlen |
-ftnint | icirnum |
- DMatrix and SparseMatrix C++ classes
- |
-
inacc (defined in inlist) | inlist | |
inacclen (defined in inlist) | inlist | |
inblank (defined in inlist) | inlist | |
inblanklen (defined in inlist) | inlist | |
indir (defined in inlist) | inlist | |
indirlen (defined in inlist) | inlist | |
inerr (defined in inlist) | inlist | |
inex (defined in inlist) | inlist | |
infile (defined in inlist) | inlist | |
infilen (defined in inlist) | inlist | |
infmt (defined in inlist) | inlist | |
infmtlen (defined in inlist) | inlist | |
inform (defined in inlist) | inlist | |
informlen (defined in inlist) | inlist | |
inname (defined in inlist) | inlist | |
innamed (defined in inlist) | inlist | |
innamlen (defined in inlist) | inlist | |
innrec (defined in inlist) | inlist | |
innum (defined in inlist) | inlist | |
inopen (defined in inlist) | inlist | |
inrecl (defined in inlist) | inlist | |
inseq (defined in inlist) | inlist | |
inseqlen (defined in inlist) | inlist | |
inunf (defined in inlist) | inlist | |
inunflen (defined in inlist) | inlist | |
inunit (defined in inlist) | inlist |
- DMatrix and SparseMatrix C++ classes
- |
-
- DMatrix and SparseMatrix C++ classes
- |
-
oacc (defined in olist) | olist | |
oblnk (defined in olist) | olist | |
oerr (defined in olist) | olist | |
ofm (defined in olist) | olist | |
ofnm (defined in olist) | olist | |
ofnmlen (defined in olist) | olist | |
orl (defined in olist) | olist | |
osta (defined in olist) | olist | |
ounit (defined in olist) | olist |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-flag | oerr |
-ftnint | ounit |
-char * | ofnm |
-ftnlen | ofnmlen |
-char * | osta |
-char * | oacc |
-char * | ofm |
-ftnint | orl |
-char * | oblnk |
- DMatrix and SparseMatrix C++ classes
- |
-
c (defined in Multitype) | Multitype | |
d (defined in Multitype) | Multitype | |
g (defined in Multitype) | Multitype | |
h (defined in Multitype) | Multitype | |
i (defined in Multitype) | Multitype | |
r (defined in Multitype) | Multitype | |
z (defined in Multitype) | Multitype |
- DMatrix and SparseMatrix C++ classes
- |
-
-Public Attributes | |
-integer1 | g |
-shortint | h |
-integer | i |
-real | r |
-doublereal | d |
-complex | c |
-doublecomplex | z |
...-\newenvironment{DoxyPre}{% - \small% - \begin{alltt}% -}{% - \end{alltt}% - \normalsize% -} - -% Used by @code ... @endcode -\newenvironment{DoxyCode}{% - \footnotesize% - \verbatim% -}{% - \endverbatim% - \normalsize% -} - -% Used by @example, @include, @includelineno and @dontinclude -\newenvironment{DoxyCodeInclude}{% - \DoxyCode% -}{% - \endDoxyCode% -} - -% Used by @verbatim ... @endverbatim -\newenvironment{DoxyVerb}{% - \footnotesize% - \verbatim% -}{% - \endverbatim% - \normalsize% -} - -% Used by @verbinclude -\newenvironment{DoxyVerbInclude}{% - \DoxyVerb% -}{% - \endDoxyVerb% -} - -% Used by numbered lists (using '-#' or