diff options
Diffstat (limited to '2.3-1/src/c/matrixOperations/inversion')
9 files changed, 1750 insertions, 0 deletions
diff --git a/2.3-1/src/c/matrixOperations/inversion/Makefile.am b/2.3-1/src/c/matrixOperations/inversion/Makefile.am new file mode 100644 index 00000000..aa5890e3 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/Makefile.am @@ -0,0 +1,56 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixInversion_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixInversion.la + +HEAD = ../includes/matrixInversion.h + +libMatrixInversion_la_SOURCES = $(HEAD) \ + sinverma.c \ + dinverma.c \ + cinverma.c \ + zinverma.c + +check_PROGRAMS = testMatrixInversion + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInversion.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testMatrixInversion_SOURCES = testMatrixInversion.c +testMatrixInversion_LDADD = $(check_LDADD) +testMatrixInversion_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixInversion diff --git a/2.3-1/src/c/matrixOperations/inversion/Makefile.in b/2.3-1/src/c/matrixOperations/inversion/Makefile.in new file mode 100644 index 00000000..5ce88abc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/Makefile.in @@ -0,0 +1,731 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixInversion$(EXEEXT) +TESTS = testMatrixInversion$(EXEEXT) +subdir = src/c/matrixOperations/inversion +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixInversion_la_LIBADD = +am__objects_1 = +am_libMatrixInversion_la_OBJECTS = $(am__objects_1) \ + libMatrixInversion_la-sinverma.lo \ + libMatrixInversion_la-dinverma.lo \ + libMatrixInversion_la-cinverma.lo \ + libMatrixInversion_la-zinverma.lo +libMatrixInversion_la_OBJECTS = $(am_libMatrixInversion_la_OBJECTS) +libMatrixInversion_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixInversion_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixInversion_OBJECTS = \ + testMatrixInversion-testMatrixInversion.$(OBJEXT) +testMatrixInversion_OBJECTS = $(am_testMatrixInversion_OBJECTS) +testMatrixInversion_DEPENDENCIES = $(check_LDADD) +testMatrixInversion_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixInversion_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixInversion_la_SOURCES) \ + $(testMatrixInversion_SOURCES) +DIST_SOURCES = $(libMatrixInversion_la_SOURCES) \ + $(testMatrixInversion_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixInversion_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixInversion.la +HEAD = ../includes/matrixInversion.h +libMatrixInversion_la_SOURCES = $(HEAD) \ + sinverma.c \ + dinverma.c \ + cinverma.c \ + zinverma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInversion.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testMatrixInversion_SOURCES = testMatrixInversion.c +testMatrixInversion_LDADD = $(check_LDADD) +testMatrixInversion_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/inversion/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/inversion/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixInversion.la: $(libMatrixInversion_la_OBJECTS) $(libMatrixInversion_la_DEPENDENCIES) + $(libMatrixInversion_la_LINK) -rpath $(pkglibdir) $(libMatrixInversion_la_OBJECTS) $(libMatrixInversion_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixInversion$(EXEEXT): $(testMatrixInversion_OBJECTS) $(testMatrixInversion_DEPENDENCIES) + @rm -f testMatrixInversion$(EXEEXT) + $(testMatrixInversion_LINK) $(testMatrixInversion_OBJECTS) $(testMatrixInversion_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-cinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-dinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-sinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-zinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixInversion-testMatrixInversion.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixInversion_la-sinverma.lo: sinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-sinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-sinverma.Tpo -c -o libMatrixInversion_la-sinverma.lo `test -f 'sinverma.c' || echo '$(srcdir)/'`sinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-sinverma.Tpo $(DEPDIR)/libMatrixInversion_la-sinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sinverma.c' object='libMatrixInversion_la-sinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-sinverma.lo `test -f 'sinverma.c' || echo '$(srcdir)/'`sinverma.c + +libMatrixInversion_la-dinverma.lo: dinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-dinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-dinverma.Tpo -c -o libMatrixInversion_la-dinverma.lo `test -f 'dinverma.c' || echo '$(srcdir)/'`dinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-dinverma.Tpo $(DEPDIR)/libMatrixInversion_la-dinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dinverma.c' object='libMatrixInversion_la-dinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-dinverma.lo `test -f 'dinverma.c' || echo '$(srcdir)/'`dinverma.c + +libMatrixInversion_la-cinverma.lo: cinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-cinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-cinverma.Tpo -c -o libMatrixInversion_la-cinverma.lo `test -f 'cinverma.c' || echo '$(srcdir)/'`cinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-cinverma.Tpo $(DEPDIR)/libMatrixInversion_la-cinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cinverma.c' object='libMatrixInversion_la-cinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-cinverma.lo `test -f 'cinverma.c' || echo '$(srcdir)/'`cinverma.c + +libMatrixInversion_la-zinverma.lo: zinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-zinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-zinverma.Tpo -c -o libMatrixInversion_la-zinverma.lo `test -f 'zinverma.c' || echo '$(srcdir)/'`zinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-zinverma.Tpo $(DEPDIR)/libMatrixInversion_la-zinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zinverma.c' object='libMatrixInversion_la-zinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-zinverma.lo `test -f 'zinverma.c' || echo '$(srcdir)/'`zinverma.c + +testMatrixInversion-testMatrixInversion.o: testMatrixInversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -MT testMatrixInversion-testMatrixInversion.o -MD -MP -MF $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo -c -o testMatrixInversion-testMatrixInversion.o `test -f 'testMatrixInversion.c' || echo '$(srcdir)/'`testMatrixInversion.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo $(DEPDIR)/testMatrixInversion-testMatrixInversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInversion.c' object='testMatrixInversion-testMatrixInversion.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -c -o testMatrixInversion-testMatrixInversion.o `test -f 'testMatrixInversion.c' || echo '$(srcdir)/'`testMatrixInversion.c + +testMatrixInversion-testMatrixInversion.obj: testMatrixInversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -MT testMatrixInversion-testMatrixInversion.obj -MD -MP -MF $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo -c -o testMatrixInversion-testMatrixInversion.obj `if test -f 'testMatrixInversion.c'; then $(CYGPATH_W) 'testMatrixInversion.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInversion.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo $(DEPDIR)/testMatrixInversion-testMatrixInversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInversion.c' object='testMatrixInversion-testMatrixInversion.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -c -o testMatrixInversion-testMatrixInversion.obj `if test -f 'testMatrixInversion.c'; then $(CYGPATH_W) 'testMatrixInversion.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInversion.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/inversion/cinverma.c b/2.3-1/src/c/matrixOperations/inversion/cinverma.c new file mode 100644 index 00000000..069fb399 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/cinverma.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include <stdlib.h> +#include "matrixInversion.h" +#include "lapack.h" + +void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = DoubleComplex ( (double) creals( in[i]) , (double) cimags ( in[i])) ; + } + + zinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/inversion/dinverma.c b/2.3-1/src/c/matrixOperations/inversion/dinverma.c new file mode 100644 index 00000000..91130f36 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/dinverma.c @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include <stdlib.h> +#include "matrixInversion.h" +#include "lapack.h" + +void dinverma ( double* in, double* out, int leadDimIn ) +{ + int info = 0 ; + int* vectPivot = (int*) malloc ( sizeof(int) * (unsigned int)( leadDimIn*leadDimIn) ); + double* work = (double*) malloc ( sizeof(double) * (unsigned int) (leadDimIn*leadDimIn) ); + + int i = 0 ; + + for ( i = 0 ; i < leadDimIn*leadDimIn ; i ++) + { + out[i] = in[i] ; + } + + dgetrf_ ( &leadDimIn, &leadDimIn, out, &leadDimIn, vectPivot, &info ); + dgetri_ ( &leadDimIn, out, &leadDimIn , vectPivot, work , &leadDimIn , &info ); + + free(vectPivot); + free(work); + + +} + diff --git a/2.3-1/src/c/matrixOperations/inversion/sinverma.c b/2.3-1/src/c/matrixOperations/inversion/sinverma.c new file mode 100644 index 00000000..f02a0e8b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/sinverma.c @@ -0,0 +1,55 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include <stdio.h> +#include <stdlib.h> +#include "matrixInversion.h" +#include "lapack.h" + +void sinverma ( float* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c b/2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c new file mode 100644 index 00000000..2a0e0058 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c @@ -0,0 +1,581 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixInversion.h" +#include <math.h> +#include <stdio.h> +#include <assert.h> + +#define LEADDIM 10 + +#define SMATRIX_IN {0.56672112690284848f,0.57116389367729425f,0.81601104838773608f,0.05689279362559319f,\ + 0.55959366867318749f,0.12493403162807226f,0.72792222863063216f,0.26777664758265018f,\ + 0.54653349192813039f,0.98854076582938433f,\ +0.73956565884873271f,0.00371731072664261f,0.59005728596821427f,0.3096467358991504f,\ + 0.25522057106718421f,0.62518793903291225f,0.11574173765257001f,0.61170040909200907f,\ + 0.67839562846347690f,0.33200952783226967f,\ +0.02587099233642220f,0.51744682248681784f,0.39168732380494475f,0.24135384149849415f,\ + 0.50644348980858922f,0.42361020017415285f,0.28937275288626552f,0.08879321813583374f,\ + 0.62128817522898316f,0.34549844544380903f,\ +0.70648676296696067f,0.52114724926650524f,0.28704008506610990f,0.65027950797230005f,\ + 0.08813347620889544f,0.44987633451819420f,0.72272530803456903f,0.89767962601035833f,\ + 0.24278218811377883f,0.43377211131155491f,\ +0.96770532103255391f,0.50685344357043505f,0.52329764096066356f,0.5596947595477104f,\ + 0.56173070007935166f,0.46817600261420012f,0.77945467224344611f,0.79010718129575253f,\ + 0.98085420625284314f,0.81870661024004221f,\ +0.42568723810836673f,0.24615605548024178f,0.92295324662700295f,0.10007458087056875f,\ + 0.46782181179150939f,0.39504976756870747f,0.03661171020939946f,0.51753685344010592f,\ + 0.83254515705630183f,0.61048321425914764f,\ +0.18711117887869477f,0.01895748358219862f,0.84335647663101554f,0.07485948316752911f,\ + 0.85328151332214475f,0.01245901081711054f,0.18675393564626575f,0.49205840751528740f,\ + 0.74896081397309899f,0.94149570073932409f,\ +0.21240556007251143f,0.57950199581682682f,0.26281475694850087f,0.43609866220504045f,\ + 0.91105451015755534f,0.80826673656702042f,0.81026530498638749f,0.25904283951967955f,\ + 0.41390872886404395f,0.35999277792870998f,\ +0.69127879338338971f,0.76568587962538004f,0.35726496530696750f,0.76933998242020607f,\ + 0.54776339093223214f,0.09622887428849936f,0.95611717319115996f,0.22074085660278797f,\ + 0.01432593585923314f,0.81914897728711367f,\ +0.13049928424879909f,0.96820035576820374f,0.6561381467618048f,0.24455389659851789f,\ + 0.52831235667690635f,0.84689256362617016f,0.78766220854595304f,0.12620826158672571f,\ + 0.78838609857484698f,0.34530424699187279f} + +#define SMATRIX_TEST {-0.52918209318099763f,-1.4122060840199684f,-2.81447731203224061f,-1.55267562705322471f,\ + 1.7795249093271313f,3.41331242497436538f,-1.88904543501184552f,1.12197724430279377f,\ + 0.72267367241531266f,-0.34793324767314804f,\ +-0.04291642356311276f,-3.42251783874691506f,0.02468613395048536f,0.08908661449574046f,\ + 0.97788374996171823f,4.61261377725807620f,-2.59399616857143833f,1.20317500146072143f,\ + -0.02166245003208622f,-1.3267013649317376f,\ +-2.67087412768695565f,-0.22033432555244847f,-5.29579931307827412f,-1.14315667195430248f,\ + 0.09168583909366912f,1.5851803683202144f,1.66558750370151065f,-0.86555486622239652f,\ + 1.8195567574793376f,3.61754347340892135f,\ +-1.89697408392725020f,1.8626200864938904f,0.79417407448685418f,-0.05121347333860876f,\ + -0.58894433303940863f,-2.25150397211694164f,1.83391219779456915f,-1.71612581802446540f,\ + 1.573412079629398f,1.342726670155854f,\ +-2.25362434223770558f,-3.27855988666729736f,-4.38426363396032048f,-1.74427000048068570f,\ + 2.03129249683994884f,4.82780099711724908f,-0.73809777439724900f,2.2509436506925824f,\ + 0.94584198058114821f,0.25243671945739055f,\ +3.84378244490602494f,3.72355620392145159f,6.53582696174593814f,1.94952916234761564f,\ + -3.13395988068588593f,-4.02699662712894213f,-0.76253598522946087f,0.23575927310254180f,\ + -1.8359327702678865f,-2.83401823371425543f,\ +-1.18180799907519307f,0.63788382527496235f,-3.78074265572599399f,-0.54137361290359209f,\ + 0.70395890323932231f,-2.37398893454907611f,2.2701087812490388f,-0.86112335471809098f,\ + 0.47829335155324559f,3.33447092282135671f,\ +-0.74596393761410851f,-2.37451784604461391f,-1.71445760029220273f,1.04267932396181950f,\ + 0.72418115460071419f,2.59078382027510390f,-0.24977554095572621f,1.00522161428916723f,\ + -0.63851725590828357f,-0.32538135452852734f,\ +-1.03321944290699186f,0.06105622131119152f,-0.23434658474553238f,-0.78361018751135569f,\ + 1.52101204019895975f,-0.98475391631291920f,0.82324943504312742f,-1.09543520381998416f,\ + -0.06310749918170644f,1.29987814669920709f,\ +6.08715177443300171f,4.38684491456130132f,10.9588676689371631f,3.07570017972914656f,\ + -3.9362327692213568f,-6.43408376602510224f,-0.44360914322700107f,-0.86171558904483270f,\ + -2.44206676099519093f,-4.96806164188692279f} + +#define DMATRIX_IN {0.56672112690284848,0.57116389367729425,0.81601104838773608,0.05689279362559319,\ + 0.55959366867318749,0.12493403162807226,0.72792222863063216,0.26777664758265018,\ + 0.54653349192813039,0.98854076582938433,\ +0.73956565884873271,0.00371731072664261,0.59005728596821427,0.3096467358991504,\ + 0.25522057106718421,0.62518793903291225,0.11574173765257001,0.61170040909200907,\ + 0.67839562846347690,0.33200952783226967,\ +0.02587099233642220,0.51744682248681784,0.39168732380494475,0.24135384149849415,\ + 0.50644348980858922,0.42361020017415285,0.28937275288626552,0.08879321813583374,\ + 0.62128817522898316,0.34549844544380903,\ +0.70648676296696067,0.52114724926650524,0.28704008506610990,0.65027950797230005,\ + 0.08813347620889544,0.44987633451819420,0.72272530803456903,0.89767962601035833,\ + 0.24278218811377883,0.43377211131155491,\ +0.96770532103255391,0.50685344357043505,0.52329764096066356,0.5596947595477104,\ + 0.56173070007935166,0.46817600261420012,0.77945467224344611,0.79010718129575253,\ + 0.98085420625284314,0.81870661024004221,\ +0.42568723810836673,0.24615605548024178,0.92295324662700295,0.10007458087056875,\ + 0.46782181179150939,0.39504976756870747,0.03661171020939946,0.51753685344010592,\ + 0.83254515705630183,0.61048321425914764,\ +0.18711117887869477,0.01895748358219862,0.84335647663101554,0.07485948316752911,\ + 0.85328151332214475,0.01245901081711054,0.18675393564626575,0.49205840751528740,\ + 0.74896081397309899,0.94149570073932409,\ +0.21240556007251143,0.57950199581682682,0.26281475694850087,0.43609866220504045,\ + 0.91105451015755534,0.80826673656702042,0.81026530498638749,0.25904283951967955,\ + 0.41390872886404395,0.35999277792870998,\ +0.69127879338338971,0.76568587962538004,0.35726496530696750,0.76933998242020607,\ + 0.54776339093223214,0.09622887428849936,0.95611717319115996,0.22074085660278797,\ + 0.01432593585923314,0.81914897728711367,\ +0.13049928424879909,0.96820035576820374,0.6561381467618048,0.24455389659851789,\ + 0.52831235667690635,0.84689256362617016,0.78766220854595304,0.12620826158672571,\ + 0.78838609857484698,0.34530424699187279} + +#define DMATRIX_TEST {-0.52918209318099763,-1.4122060840199684,-2.81447731203224061,-1.55267562705322471,\ + 1.7795249093271313,3.41331242497436538,-1.88904543501184552,1.12197724430279377,\ + 0.72267367241531266,-0.34793324767314804,\ +-0.04291642356311276,-3.42251783874691506,0.02468613395048536,0.08908661449574046,\ + 0.97788374996171823,4.61261377725807620,-2.59399616857143833,1.20317500146072143,\ + -0.02166245003208622,-1.3267013649317376,\ +-2.67087412768695565,-0.22033432555244847,-5.29579931307827412,-1.14315667195430248,\ + 0.09168583909366912,1.5851803683202144,1.66558750370151065,-0.86555486622239652,\ + 1.8195567574793376,3.61754347340892135,\ +-1.89697408392725020,1.8626200864938904,0.79417407448685418,-0.05121347333860876,\ + -0.58894433303940863,-2.25150397211694164,1.83391219779456915,-1.71612581802446540,\ + 1.573412079629398,1.342726670155854,\ +-2.25362434223770558,-3.27855988666729736,-4.38426363396032048,-1.74427000048068570,\ + 2.03129249683994884,4.82780099711724908,-0.73809777439724900,2.2509436506925824,\ + 0.94584198058114821,0.25243671945739055,\ +3.84378244490602494,3.72355620392145159,6.53582696174593814,1.94952916234761564,\ + -3.13395988068588593,-4.02699662712894213,-0.76253598522946087,0.23575927310254180,\ + -1.8359327702678865,-2.83401823371425543,\ +-1.18180799907519307,0.63788382527496235,-3.78074265572599399,-0.54137361290359209,\ + 0.70395890323932231,-2.37398893454907611,2.2701087812490388,-0.86112335471809098,\ + 0.47829335155324559,3.33447092282135671,\ +-0.74596393761410851,-2.37451784604461391,-1.71445760029220273,1.04267932396181950,\ + 0.72418115460071419,2.59078382027510390,-0.24977554095572621,1.00522161428916723,\ + -0.63851725590828357,-0.32538135452852734,\ +-1.03321944290699186,0.06105622131119152,-0.23434658474553238,-0.78361018751135569,\ + 1.52101204019895975,-0.98475391631291920,0.82324943504312742,-1.09543520381998416,\ + -0.06310749918170644,1.29987814669920709,\ +6.08715177443300171,4.38684491456130132,10.9588676689371631,3.07570017972914656,\ + -3.9362327692213568,-6.43408376602510224,-0.44360914322700107,-0.86171558904483270,\ + -2.44206676099519093,-4.96806164188692279} + +#define CRMATRIX_IN {0.56672112690284848f,0.57116389367729425f,0.81601104838773608f,0.05689279362559319f,\ + 0.55959366867318749f,0.12493403162807226f,0.72792222863063216f,0.26777664758265018f,\ + 0.54653349192813039f,0.98854076582938433f,\ +0.73956565884873271f,0.00371731072664261f,0.59005728596821427f,0.3096467358991504f,\ + 0.25522057106718421f,0.62518793903291225f,0.11574173765257001f,0.61170040909200907f,\ + 0.67839562846347690f,0.33200952783226967f,\ +0.02587099233642220f,0.51744682248681784f,0.39168732380494475f,0.24135384149849415f,\ + 0.50644348980858922f,0.42361020017415285f,0.28937275288626552f,0.08879321813583374f,\ + 0.62128817522898316f,0.34549844544380903f,\ +0.70648676296696067f,0.52114724926650524f,0.28704008506610990f,0.65027950797230005f,\ + 0.08813347620889544f,0.44987633451819420f,0.72272530803456903f,0.89767962601035833f,\ + 0.24278218811377883f,0.43377211131155491f,\ +0.96770532103255391f,0.50685344357043505f,0.52329764096066356f,0.5596947595477104f,\ + 0.56173070007935166f,0.46817600261420012f,0.77945467224344611f,0.79010718129575253f,\ + 0.98085420625284314f,0.81870661024004221f,\ +0.42568723810836673f,0.24615605548024178f,0.92295324662700295f,0.10007458087056875f,\ + 0.46782181179150939f,0.39504976756870747f,0.03661171020939946f,0.51753685344010592f,\ + 0.83254515705630183f,0.61048321425914764f,\ +0.18711117887869477f,0.01895748358219862f,0.84335647663101554f,0.07485948316752911f,\ + 0.85328151332214475f,0.01245901081711054f,0.18675393564626575f,0.49205840751528740f,\ + 0.74896081397309899f,0.94149570073932409f,\ +0.21240556007251143f,0.57950199581682682f,0.26281475694850087f,0.43609866220504045f,\ + 0.91105451015755534f,0.80826673656702042f,0.81026530498638749f,0.25904283951967955f,\ + 0.41390872886404395f,0.35999277792870998f,\ +0.69127879338338971f,0.76568587962538004f,0.35726496530696750f,0.76933998242020607f,\ + 0.54776339093223214f,0.09622887428849936f,0.95611717319115996f,0.22074085660278797f,\ + 0.01432593585923314f,0.81914897728711367f,\ +0.13049928424879909f,0.96820035576820374f,0.6561381467618048f,0.24455389659851789f,\ + 0.52831235667690635f,0.84689256362617016f,0.78766220854595304f,0.12620826158672571f,\ + 0.78838609857484698f,0.34530424699187279f} + +#define CIMATRIX_IN {0.26598573336377740f,0.12025266280397773f,0.90711546363309026f,0.41329363686963916f,\ + 0.33616027468815446f,0.20337020372971892f,0.31845858739688993f,0.04173615900799632f,\ + 0.00291663268581033f,0.92589621385559440f,\ +0.97098186518996954f,0.82874121330678463f,0.33601493109017611f,0.14022908732295036f,\ + 0.53368766140192747f,0.30119446106255054f,0.57618944440037012f,0.34382718056440353f,\ + 0.89934705849736929f,0.09938172809779644f,\ +0.88752476638182998f,0.31610729591920972f,0.11756130633875728f,0.49523561308160424f,\ + 0.20390639593824744f,0.27625959040597081f,0.42549022240564227f,0.1970167332328856f,\ + 0.83879271661862731f,0.42805786477401853f,\ +0.20667528547346592f,0.53051907662302256f,0.92537237703800201f,0.41948772873729467f,\ + 0.15899897180497646f,0.29445307422429323f,0.97619816288352013f,0.21228986512869596f,\ + 0.43437494523823261f,0.94318309519439936f,\ +0.85251609655097127f,0.57151748193427920f,0.72636712575331330f,0.86262222891673446f,\ + 0.01818151073530316f,0.57180739520117640f,0.25189600000157952f,0.31403985014185309f,\ + 0.77678761305287480f,0.03273952705785632f,\ +0.67446978110820055f,0.04780154302716255f,0.90094979386776686f,0.28575096465647221f,\ + 0.40983706060796976f,0.21417701244354248f,0.43911290075629950f,0.78216253779828548f,\ + 0.13953176606446505f,0.92132670804858208f,\ +0.91528743831440806f,0.82486197212710977f,0.39489932497963309f,0.25121363671496511f,\ + 0.01058345986530185f,0.68954616272822022f,0.07593036955222487f,0.05409323470667005f,\ + 0.11506372271105647f,0.94490244099870324f,\ +0.02848597615957260f,0.5798843121156096f,0.56551797501742840f,0.33891015965491533f,\ + 0.19653097167611122f,0.58555728476494551f,0.25593801774084568f,0.91902069095522165f,\ + 0.53554199635982513f,0.900706990621984f,\ +0.23678414756432176f,0.27918082987889647f,0.70614896761253476f,0.39219759730622172f,\ + 0.27255953708663583f,0.42041230341419578f,0.06706167431548238f,0.46035157097503543f,\ + 0.43117330456152558f,0.80943161016330123f,\ +0.70153435599058867f,0.95451109297573566f,0.67878311965614557f,0.46815521270036697f,\ + 0.34376550372689962f,0.42775720171630383f,0.76511315722018480f,0.29926850274205208f,\ + 0.61453847866505384f,0.02519542910158634f} + +#define CRMATRIX_RESULT {1.13334136062879454f,1.00204710284162091f,-0.36268445209785111f,0.44135219666801256f,\ + -0.28889550886983612f,-0.83933700493692454f,0.02619582683916769f,-0.03686600548096228f,\ + -0.3105979269805872f,-0.41314497983816856f,\ +-1.35807279244359291f,-0.95351719301170645f,0.24508427491574258f,-0.29038757219777517f,\ + 0.37390577835866062f,1.1835902691419622f,-0.05725271188164360f,-0.45507733751420543f,\ + 0.89349083196709700f,0.22599186865989143f,\ +0.04475841273073522f,0.65452526617183937f,-0.45264724847008608f,1.48730985056287901f,\ + -0.62424039568072809f,-0.07013705727696817f,0.66279285096827567f,-0.49314454581179629f,\ + -0.75846179749076570f,0.03847068162421585f,\ +-0.28834686632766587f,-0.12621821344664338f,0.66167042153468991f,-0.30750952923310820f,\ + -0.38799028698820520f,-0.06244610332663336f,-0.16699468178690519f,-0.25703548004808097f,\ + 1.05027930016160997f,0.31201179786307248f,\ +3.09851038226275932f,0.68543010150986716f,0.67201299485007393f,-1.36595464827487545f,\ + -0.97056467795873491f,-2.43637154663396904f,-0.44698290573897426f,0.25335968244039719f,\ + 0.52656196888052886f,0.8186504936893056f,\ +1.61532430192389009f,0.61052036715893920f,0.37049911672435160f,-0.89240571480272601f,\ + -0.10120030002332725f,-0.89781867625900547f,-0.69692694811392220f,1.15675538992405480f,\ + -0.60391534256305657f,-0.22021828342698485f,\ +-0.3741129583278592f,-0.04777966095669883f,-0.71234429260192467f,0.67967568250401755f,\ + 0.25551727122371526f,-0.21501817490214456f,0.33990052672394827f,0.26217278721004078f,\ + -0.62229775428125067f,0.12867275098729825f,\ +-1.29410590757942501f,-0.90500447621878899f,-0.02669409932542677f,-0.65737384875432148f,\ + 1.06680350537307067f,1.0309312701659521f,-0.17448425396711695f,0.10358425160515741f,\ + 0.48518012284543799f,-0.12380980760248197f,\ +-1.74148559631895505f,-0.80563620794306168f,0.09831541569063014f,0.29858001971458137f,\ + 0.71315790168444038f,1.51589578494898358f,0.26752178758245609f,-0.07814488857312252f,\ + -0.33226019516643074f,-0.25594588429781640f,\ +-0.55157638336116810f,-0.32553554473562663f,0.18945085905693287f,-0.49018398019943904f,\ + 0.22032383413091419f,0.80929284051108974f,-0.26930477901947342f,0.01565276572275408f,\ + 0.50897245662655299f,-0.2000796589321248f} + +#define CIMATRIX_RESULT {-0.72071682835421724f,-0.27956750077582515f,-0.12213482023956473f,0.66199681493358187f,\ + 0.19294748584842841f,0.71511499705121806f,-0.07262892107788382f,0.16934235088255833f,\ + -0.28481834522168847f,-0.4356262417043216f,\ +0.89322305892893428f,-0.47480723687179577f,0.74313808566553685f,-0.47801173363000360f,\ + 0.13877492668810687f,-0.24397029588270253f,-0.56410605487977428f,0.13174383488792796f,\ + -0.11275208753659083f,-0.02853860897251614f,\ +-2.35574562422712885f,-0.66252937112300103f,0.41163350762074485f,0.21189678704881354f,\ + 0.57210153384651341f,1.59871861336304111f,0.24013928122080053f,0.1908634439410304f,\ + 0.04233444329438218f,-0.74974593479018292f,\ +0.21852271998327827f,0.46641793006923571f,-0.50775725878230649f,0.36932403849454087f,\ + -0.97035140329820424f,-0.59905481375287661f,0.47057866052210873f,-0.27484558236611223f,\ + 0.14983776443256616f,0.65314738162484509f,\ +1.21784046668363755f,0.89544041489161419f,-0.55385999040744260f,2.3960585010456512f,\ + -1.08813967734866801f,-1.76566044616615891f,1.01831164014477937f,-0.39749297613335716f,\ + -1.42421433146953369f,0.1681331405197976f,\ +1.2139424005771302f,1.25657353572343178f,-0.00767306183273730f,0.23949549471191356f,\ + -0.93651648982768132f,-0.892557290343648f,-0.31803824197434533f,-0.30269705651930523f,\ + 0.06480270543120303f,0.04863444130781940f,\ +-0.4833117651305104f,0.0427206592410736f,-0.32334126501314669f,-0.77563551313076551f,\ + 0.77531171370204577f,0.4186703610529936f,0.06140053814127502f,0.40102788900264252f,\ + 0.23384530409440230f,-0.64994440926481989f,\ +1.96328712223105617f,0.26113952707794202f,0.7924550400337056f,-0.65512478202793500f,\ + -0.18012047754401772f,-1.54644464183129848f,-0.24103692367484025f,0.06994604293168416f,\ + -0.14071021436989639f,0.02396061029170871f,\ +-0.38634718234016863f,-0.79360643330422442f,-0.24953759611467596f,-1.18124389108964234f,\ + 0.36517943778230522f,0.69540420551183901f,-0.15267947346137922f,0.23673803504827576f,\ + 0.58370191145957184f,0.41325242999322420f,\ +0.27463944706760368f,-0.07374243215114486f,-0.23939703640616677f,-0.68898202198243763f,\ + 0.18544512532830235f,-0.26697093307764330f,-0.38327334858322648f,-0.29893133575699177f,\ + 0.40729781218472505f,0.82660964787147106f} + + + +#define ZRMATRIX_IN {0.56672112690284848,0.57116389367729425,0.81601104838773608,0.05689279362559319,\ + 0.55959366867318749,0.12493403162807226,0.72792222863063216,0.26777664758265018,\ + 0.54653349192813039,0.98854076582938433,\ +0.73956565884873271,0.00371731072664261,0.59005728596821427,0.3096467358991504,\ + 0.25522057106718421,0.62518793903291225,0.11574173765257001,0.61170040909200907,\ + 0.67839562846347690,0.33200952783226967,\ +0.02587099233642220,0.51744682248681784,0.39168732380494475,0.24135384149849415,\ + 0.50644348980858922,0.42361020017415285,0.28937275288626552,0.08879321813583374,\ + 0.62128817522898316,0.34549844544380903,\ +0.70648676296696067,0.52114724926650524,0.28704008506610990,0.65027950797230005,\ + 0.08813347620889544,0.44987633451819420,0.72272530803456903,0.89767962601035833,\ + 0.24278218811377883,0.43377211131155491,\ +0.96770532103255391,0.50685344357043505,0.52329764096066356,0.5596947595477104,\ + 0.56173070007935166,0.46817600261420012,0.77945467224344611,0.79010718129575253,\ + 0.98085420625284314,0.81870661024004221,\ +0.42568723810836673,0.24615605548024178,0.92295324662700295,0.10007458087056875,\ + 0.46782181179150939,0.39504976756870747,0.03661171020939946,0.51753685344010592,\ + 0.83254515705630183,0.61048321425914764,\ +0.18711117887869477,0.01895748358219862,0.84335647663101554,0.07485948316752911,\ + 0.85328151332214475,0.01245901081711054,0.18675393564626575,0.49205840751528740,\ + 0.74896081397309899,0.94149570073932409,\ +0.21240556007251143,0.57950199581682682,0.26281475694850087,0.43609866220504045,\ + 0.91105451015755534,0.80826673656702042,0.81026530498638749,0.25904283951967955,\ + 0.41390872886404395,0.35999277792870998,\ +0.69127879338338971,0.76568587962538004,0.35726496530696750,0.76933998242020607,\ + 0.54776339093223214,0.09622887428849936,0.95611717319115996,0.22074085660278797,\ + 0.01432593585923314,0.81914897728711367,\ +0.13049928424879909,0.96820035576820374,0.6561381467618048,0.24455389659851789,\ + 0.52831235667690635,0.84689256362617016,0.78766220854595304,0.12620826158672571,\ + 0.78838609857484698,0.34530424699187279} + +#define ZIMATRIX_IN {0.26598573336377740,0.12025266280397773,0.90711546363309026,0.41329363686963916,\ + 0.33616027468815446,0.20337020372971892,0.31845858739688993,0.04173615900799632,\ + 0.00291663268581033,0.92589621385559440,\ +0.97098186518996954,0.82874121330678463,0.33601493109017611,0.14022908732295036,\ + 0.53368766140192747,0.30119446106255054,0.57618944440037012,0.34382718056440353,\ + 0.89934705849736929,0.09938172809779644,\ +0.88752476638182998,0.31610729591920972,0.11756130633875728,0.49523561308160424,\ + 0.20390639593824744,0.27625959040597081,0.42549022240564227,0.1970167332328856,\ + 0.83879271661862731,0.42805786477401853,\ +0.20667528547346592,0.53051907662302256,0.92537237703800201,0.41948772873729467,\ + 0.15899897180497646,0.29445307422429323,0.97619816288352013,0.21228986512869596,\ + 0.43437494523823261,0.94318309519439936,\ +0.85251609655097127,0.57151748193427920,0.72636712575331330,0.86262222891673446,\ + 0.01818151073530316,0.57180739520117640,0.25189600000157952,0.31403985014185309,\ + 0.77678761305287480,0.03273952705785632,\ +0.67446978110820055,0.04780154302716255,0.90094979386776686,0.28575096465647221,\ + 0.40983706060796976,0.21417701244354248,0.43911290075629950,0.78216253779828548,\ + 0.13953176606446505,0.92132670804858208,\ +0.91528743831440806,0.82486197212710977,0.39489932497963309,0.25121363671496511,\ + 0.01058345986530185,0.68954616272822022,0.07593036955222487,0.05409323470667005,\ + 0.11506372271105647,0.94490244099870324,\ +0.02848597615957260,0.5798843121156096,0.56551797501742840,0.33891015965491533,\ + 0.19653097167611122,0.58555728476494551,0.25593801774084568,0.91902069095522165,\ + 0.53554199635982513,0.900706990621984,\ +0.23678414756432176,0.27918082987889647,0.70614896761253476,0.39219759730622172,\ + 0.27255953708663583,0.42041230341419578,0.06706167431548238,0.46035157097503543,\ + 0.43117330456152558,0.80943161016330123,\ +0.70153435599058867,0.95451109297573566,0.67878311965614557,0.46815521270036697,\ + 0.34376550372689962,0.42775720171630383,0.76511315722018480,0.29926850274205208,\ + 0.61453847866505384,0.02519542910158634} + +#define ZRMATRIX_RESULT {1.13334136062879454,1.00204710284162091,-0.36268445209785111,0.44135219666801256,\ + -0.28889550886983612,-0.83933700493692454,0.02619582683916769,-0.03686600548096228,\ + -0.3105979269805872,-0.41314497983816856,\ +-1.35807279244359291,-0.95351719301170645,0.24508427491574258,-0.29038757219777517,\ + 0.37390577835866062,1.1835902691419622,-0.05725271188164360,-0.45507733751420543,\ + 0.89349083196709700,0.22599186865989143,\ +0.04475841273073522,0.65452526617183937,-0.45264724847008608,1.48730985056287901,\ + -0.62424039568072809,-0.07013705727696817,0.66279285096827567,-0.49314454581179629,\ + -0.75846179749076570,0.03847068162421585,\ +-0.28834686632766587,-0.12621821344664338,0.66167042153468991,-0.30750952923310820,\ + -0.38799028698820520,-0.06244610332663336,-0.16699468178690519,-0.25703548004808097,\ + 1.05027930016160997,0.31201179786307248,\ +3.09851038226275932,0.68543010150986716,0.67201299485007393,-1.36595464827487545,\ + -0.97056467795873491,-2.43637154663396904,-0.44698290573897426,0.25335968244039719,\ + 0.52656196888052886,0.8186504936893056,\ +1.61532430192389009,0.61052036715893920,0.37049911672435160,-0.89240571480272601,\ + -0.10120030002332725,-0.89781867625900547,-0.69692694811392220,1.15675538992405480,\ + -0.60391534256305657,-0.22021828342698485,\ +-0.3741129583278592,-0.04777966095669883,-0.71234429260192467,0.67967568250401755,\ + 0.25551727122371526,-0.21501817490214456,0.33990052672394827,0.26217278721004078,\ + -0.62229775428125067,0.12867275098729825,\ +-1.29410590757942501,-0.90500447621878899,-0.02669409932542677,-0.65737384875432148,\ + 1.06680350537307067,1.0309312701659521,-0.17448425396711695,0.10358425160515741,\ + 0.48518012284543799,-0.12380980760248197,\ +-1.74148559631895505,-0.80563620794306168,0.09831541569063014,0.29858001971458137,\ + 0.71315790168444038,1.51589578494898358,0.26752178758245609,-0.07814488857312252,\ + -0.33226019516643074,-0.25594588429781640,\ +-0.55157638336116810,-0.32553554473562663,0.18945085905693287,-0.49018398019943904,\ + 0.22032383413091419,0.80929284051108974,-0.26930477901947342,0.01565276572275408,\ + 0.50897245662655299,-0.2000796589321248} + +#define ZIMATRIX_RESULT {-0.72071682835421724,-0.27956750077582515,-0.12213482023956473,0.66199681493358187,\ + 0.19294748584842841,0.71511499705121806,-0.07262892107788382,0.16934235088255833,\ + -0.28481834522168847,-0.4356262417043216,\ +0.89322305892893428,-0.47480723687179577,0.74313808566553685,-0.47801173363000360,\ + 0.13877492668810687,-0.24397029588270253,-0.56410605487977428,0.13174383488792796,\ + -0.11275208753659083,-0.02853860897251614,\ +-2.35574562422712885,-0.66252937112300103,0.41163350762074485,0.21189678704881354,\ + 0.57210153384651341,1.59871861336304111,0.24013928122080053,0.1908634439410304,\ + 0.04233444329438218,-0.74974593479018292,\ +0.21852271998327827,0.46641793006923571,-0.50775725878230649,0.36932403849454087,\ + -0.97035140329820424,-0.59905481375287661,0.47057866052210873,-0.27484558236611223,\ + 0.14983776443256616,0.65314738162484509,\ +1.21784046668363755,0.89544041489161419,-0.55385999040744260,2.3960585010456512,\ + -1.08813967734866801,-1.76566044616615891,1.01831164014477937,-0.39749297613335716,\ + -1.42421433146953369,0.1681331405197976,\ +1.2139424005771302,1.25657353572343178,-0.00767306183273730,0.23949549471191356,\ + -0.93651648982768132,-0.892557290343648,-0.31803824197434533,-0.30269705651930523,\ + 0.06480270543120303,0.04863444130781940,\ +-0.4833117651305104,0.0427206592410736,-0.32334126501314669,-0.77563551313076551,\ + 0.77531171370204577,0.4186703610529936,0.06140053814127502,0.40102788900264252,\ + 0.23384530409440230,-0.64994440926481989,\ +1.96328712223105617,0.26113952707794202,0.7924550400337056,-0.65512478202793500,\ + -0.18012047754401772,-1.54644464183129848,-0.24103692367484025,0.06994604293168416,\ + -0.14071021436989639,0.02396061029170871,\ +-0.38634718234016863,-0.79360643330422442,-0.24953759611467596,-1.18124389108964234,\ + 0.36517943778230522,0.69540420551183901,-0.15267947346137922,0.23673803504827576,\ + 0.58370191145957184,0.41325242999322420,\ +0.27463944706760368,-0.07374243215114486,-0.23939703640616677,-0.68898202198243763,\ + 0.18544512532830235,-0.26697093307764330,-0.38327334858322648,-0.29893133575699177,\ + 0.40729781218472505,0.82660964787147106} + + +static void sinvermaTest (void) +{ + int i ; + + float in[] = SMATRIX_IN ; + + float result[] = SMATRIX_TEST ; + + float out[LEADDIM*LEADDIM]; + + + sinverma (in, out, LEADDIM); + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-4 ) ; + } + + + +} + +static void dinvermaTest (void) +{ + int i ; + + double in[] = DMATRIX_IN ; + + double result[] = DMATRIX_TEST ; + + double out[LEADDIM*LEADDIM]; + + + dinverma (in, out, LEADDIM); + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-14 ) ; + } + + + +} + +static void cinvermaTest (void) +{ + int i = 0 ; + + float tRealIn [] = CRMATRIX_IN ; + float tImagIn [] = CIMATRIX_IN ; + + + + float tRealResult [] = CRMATRIX_RESULT ; + float tImagResult [] = CIMATRIX_RESULT ; + + floatComplex out[LEADDIM*LEADDIM ] ; + + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + + cinverma( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t +%e\t * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-6 && creals (Result[i]) < 1e-6 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-5 ); + + + if ( cimags(out[i]) < 1e-6 && cimags (Result[i]) < 1e-6 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-5) ; + + } +} + + +static void zinvermaTest (void) +{ + int i = 0 ; + + double tRealIn [] = ZRMATRIX_IN ; + double tImagIn [] = ZIMATRIX_IN ; + + + + double tRealResult [] = ZRMATRIX_RESULT ; + double tImagResult [] = ZIMATRIX_RESULT ; + + doubleComplex out[LEADDIM*LEADDIM ] ; + + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + + zinverma( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t +%e\t * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-13 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-13 ) ; + + } +} + +static void mytest (void ){ + double in1[16] = { 1 , 5 , 9 ,13 , + 2 , 6 , 10 , 14 , + 3 , 7 , 11 , 15 , + 4 , 8 , 12 , 16 } ; + + double out[16] = { 0 } ; + + int i = 0 ; + + dinverma ( in1 , out , 4 ); + + for ( i = 0 ; i <16; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + +static int testMatrixInversion(void) { + + printf("\n\n\n\t>>> MY TEST Tests\n"); + mytest () ; + + + printf("\n>>>> Matrix Inversion Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dinvermaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sinvermaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cinvermaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zinvermaTest(); + + return 0; +} + + + +int main(void) { + + assert(testMatrixInversion() == 0); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj new file mode 100644 index 00000000..e874edfc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{44D3EFB8-A861-41C4-BBCD-18470FA0D5AC}</ProjectGuid>
+ <RootNamespace>testMatrixInversion</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testMatrixInversion.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters new file mode 100644 index 00000000..8daf0ce4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testMatrixInversion.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/inversion/zinverma.c b/2.3-1/src/c/matrixOperations/inversion/zinverma.c new file mode 100644 index 00000000..7948445e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/zinverma.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include <stdlib.h> +#include "matrixInversion.h" +#include "lapack.h" + +void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ) +{ + int info = 0 ; + int* vectPivot = (int*) malloc ( sizeof(int) * (unsigned int)( leadDimIn) ); + doubleComplex* work = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (leadDimIn*leadDimIn) ); + + int i = 0 ; + + for ( i = 0 ; i < leadDimIn*leadDimIn ; i ++) + { + out[i] = in[i] ; + } + + zgetrf_ ( &leadDimIn, &leadDimIn, out, &leadDimIn, vectPivot, &info ); + zgetri_ ( &leadDimIn, out, &leadDimIn , vectPivot, work , &leadDimIn , &info ); + + free(vectPivot); + free(work); +} + |