diff options
Diffstat (limited to '2.3-1/src/c/statisticsFunctions/mean')
20 files changed, 2577 insertions, 0 deletions
diff --git a/2.3-1/src/c/statisticsFunctions/mean/Makefile.am b/2.3-1/src/c/statisticsFunctions/mean/Makefile.am new file mode 100644 index 00000000..2969a734 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/Makefile.am @@ -0,0 +1,69 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## 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 +## +## + +libMean_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMean.la + +libMean_la_SOURCES = $(HEAD) $(SRC) + +SRC = smeana.c \ + srowmeana.c \ + scolumnmeana.c \ + dmeana.c \ + drowmeana.c \ + dcolumnmeana.c \ + cmeana.c \ + crowmeana.c \ + ccolumnmeana.c \ + zmeana.c \ + zrowmeana.c \ + zcolumnmeana.c + +HEAD = ../includes/mean.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatMean testDoubleMean + +TESTS = testFloatMean testDoubleMean + +# +# -*- Mean Tests -*- +# +testFloatMean_SOURCES = testFloatMean.c +testFloatMean_CFLAGS = $(check_INCLUDES) +testFloatMean_LDADD = $(check_LDADD) + +testDoubleMean_SOURCES =testDoubleMean.c +testDoubleMean_CFLAGS = $(check_INCLUDES) +testDoubleMean_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/mean/Makefile.in b/2.3-1/src/c/statisticsFunctions/mean/Makefile.in new file mode 100644 index 00000000..0a057450 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/Makefile.in @@ -0,0 +1,839 @@ +# 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 = testFloatMean$(EXEEXT) testDoubleMean$(EXEEXT) +TESTS = testFloatMean$(EXEEXT) testDoubleMean$(EXEEXT) +subdir = src/c/statisticsFunctions/mean +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) +libMean_la_LIBADD = +am__objects_1 = +am__objects_2 = libMean_la-smeana.lo libMean_la-srowmeana.lo \ + libMean_la-scolumnmeana.lo libMean_la-dmeana.lo \ + libMean_la-drowmeana.lo libMean_la-dcolumnmeana.lo \ + libMean_la-cmeana.lo libMean_la-crowmeana.lo \ + libMean_la-ccolumnmeana.lo libMean_la-zmeana.lo \ + libMean_la-zrowmeana.lo libMean_la-zcolumnmeana.lo +am_libMean_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libMean_la_OBJECTS = $(am_libMean_la_OBJECTS) +libMean_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMean_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMean_OBJECTS = testDoubleMean-testDoubleMean.$(OBJEXT) +testDoubleMean_OBJECTS = $(am_testDoubleMean_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la +testDoubleMean_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleMean_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleMean_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMean_OBJECTS = testFloatMean-testFloatMean.$(OBJEXT) +testFloatMean_OBJECTS = $(am_testFloatMean_OBJECTS) +testFloatMean_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatMean_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatMean_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 = $(libMean_la_SOURCES) $(testDoubleMean_SOURCES) \ + $(testFloatMean_SOURCES) +DIST_SOURCES = $(libMean_la_SOURCES) $(testDoubleMean_SOURCES) \ + $(testFloatMean_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@ +libMean_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMean.la +libMean_la_SOURCES = $(HEAD) $(SRC) +SRC = smeana.c \ + srowmeana.c \ + scolumnmeana.c \ + dmeana.c \ + drowmeana.c \ + dcolumnmeana.c \ + cmeana.c \ + crowmeana.c \ + ccolumnmeana.c \ + zmeana.c \ + zrowmeana.c \ + zcolumnmeana.c + +HEAD = ../includes/mean.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + + +# +# -*- Mean Tests -*- +# +testFloatMean_SOURCES = testFloatMean.c +testFloatMean_CFLAGS = $(check_INCLUDES) +testFloatMean_LDADD = $(check_LDADD) +testDoubleMean_SOURCES = testDoubleMean.c +testDoubleMean_CFLAGS = $(check_INCLUDES) +testDoubleMean_LDADD = $(check_LDADD) +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/statisticsFunctions/mean/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/mean/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 +libMean.la: $(libMean_la_OBJECTS) $(libMean_la_DEPENDENCIES) + $(libMean_la_LINK) -rpath $(pkglibdir) $(libMean_la_OBJECTS) $(libMean_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 +testDoubleMean$(EXEEXT): $(testDoubleMean_OBJECTS) $(testDoubleMean_DEPENDENCIES) + @rm -f testDoubleMean$(EXEEXT) + $(testDoubleMean_LINK) $(testDoubleMean_OBJECTS) $(testDoubleMean_LDADD) $(LIBS) +testFloatMean$(EXEEXT): $(testFloatMean_OBJECTS) $(testFloatMean_DEPENDENCIES) + @rm -f testFloatMean$(EXEEXT) + $(testFloatMean_LINK) $(testFloatMean_OBJECTS) $(testFloatMean_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-ccolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-cmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-crowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-dcolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-dmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-drowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-scolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-smeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-srowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-zcolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-zmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-zrowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMean-testDoubleMean.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMean-testFloatMean.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 $@ $< + +libMean_la-smeana.lo: smeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-smeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-smeana.Tpo -c -o libMean_la-smeana.lo `test -f 'smeana.c' || echo '$(srcdir)/'`smeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-smeana.Tpo $(DEPDIR)/libMean_la-smeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smeana.c' object='libMean_la-smeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-smeana.lo `test -f 'smeana.c' || echo '$(srcdir)/'`smeana.c + +libMean_la-srowmeana.lo: srowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-srowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-srowmeana.Tpo -c -o libMean_la-srowmeana.lo `test -f 'srowmeana.c' || echo '$(srcdir)/'`srowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-srowmeana.Tpo $(DEPDIR)/libMean_la-srowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowmeana.c' object='libMean_la-srowmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-srowmeana.lo `test -f 'srowmeana.c' || echo '$(srcdir)/'`srowmeana.c + +libMean_la-scolumnmeana.lo: scolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-scolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-scolumnmeana.Tpo -c -o libMean_la-scolumnmeana.lo `test -f 'scolumnmeana.c' || echo '$(srcdir)/'`scolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-scolumnmeana.Tpo $(DEPDIR)/libMean_la-scolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnmeana.c' object='libMean_la-scolumnmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-scolumnmeana.lo `test -f 'scolumnmeana.c' || echo '$(srcdir)/'`scolumnmeana.c + +libMean_la-dmeana.lo: dmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-dmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-dmeana.Tpo -c -o libMean_la-dmeana.lo `test -f 'dmeana.c' || echo '$(srcdir)/'`dmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-dmeana.Tpo $(DEPDIR)/libMean_la-dmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmeana.c' object='libMean_la-dmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-dmeana.lo `test -f 'dmeana.c' || echo '$(srcdir)/'`dmeana.c + +libMean_la-drowmeana.lo: drowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-drowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-drowmeana.Tpo -c -o libMean_la-drowmeana.lo `test -f 'drowmeana.c' || echo '$(srcdir)/'`drowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-drowmeana.Tpo $(DEPDIR)/libMean_la-drowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowmeana.c' object='libMean_la-drowmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-drowmeana.lo `test -f 'drowmeana.c' || echo '$(srcdir)/'`drowmeana.c + +libMean_la-dcolumnmeana.lo: dcolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-dcolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-dcolumnmeana.Tpo -c -o libMean_la-dcolumnmeana.lo `test -f 'dcolumnmeana.c' || echo '$(srcdir)/'`dcolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-dcolumnmeana.Tpo $(DEPDIR)/libMean_la-dcolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnmeana.c' object='libMean_la-dcolumnmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-dcolumnmeana.lo `test -f 'dcolumnmeana.c' || echo '$(srcdir)/'`dcolumnmeana.c + +libMean_la-cmeana.lo: cmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-cmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-cmeana.Tpo -c -o libMean_la-cmeana.lo `test -f 'cmeana.c' || echo '$(srcdir)/'`cmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-cmeana.Tpo $(DEPDIR)/libMean_la-cmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmeana.c' object='libMean_la-cmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-cmeana.lo `test -f 'cmeana.c' || echo '$(srcdir)/'`cmeana.c + +libMean_la-crowmeana.lo: crowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-crowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-crowmeana.Tpo -c -o libMean_la-crowmeana.lo `test -f 'crowmeana.c' || echo '$(srcdir)/'`crowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-crowmeana.Tpo $(DEPDIR)/libMean_la-crowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowmeana.c' object='libMean_la-crowmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-crowmeana.lo `test -f 'crowmeana.c' || echo '$(srcdir)/'`crowmeana.c + +libMean_la-ccolumnmeana.lo: ccolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-ccolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-ccolumnmeana.Tpo -c -o libMean_la-ccolumnmeana.lo `test -f 'ccolumnmeana.c' || echo '$(srcdir)/'`ccolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-ccolumnmeana.Tpo $(DEPDIR)/libMean_la-ccolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnmeana.c' object='libMean_la-ccolumnmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-ccolumnmeana.lo `test -f 'ccolumnmeana.c' || echo '$(srcdir)/'`ccolumnmeana.c + +libMean_la-zmeana.lo: zmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-zmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-zmeana.Tpo -c -o libMean_la-zmeana.lo `test -f 'zmeana.c' || echo '$(srcdir)/'`zmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-zmeana.Tpo $(DEPDIR)/libMean_la-zmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmeana.c' object='libMean_la-zmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-zmeana.lo `test -f 'zmeana.c' || echo '$(srcdir)/'`zmeana.c + +libMean_la-zrowmeana.lo: zrowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-zrowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-zrowmeana.Tpo -c -o libMean_la-zrowmeana.lo `test -f 'zrowmeana.c' || echo '$(srcdir)/'`zrowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-zrowmeana.Tpo $(DEPDIR)/libMean_la-zrowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowmeana.c' object='libMean_la-zrowmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-zrowmeana.lo `test -f 'zrowmeana.c' || echo '$(srcdir)/'`zrowmeana.c + +libMean_la-zcolumnmeana.lo: zcolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-zcolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-zcolumnmeana.Tpo -c -o libMean_la-zcolumnmeana.lo `test -f 'zcolumnmeana.c' || echo '$(srcdir)/'`zcolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-zcolumnmeana.Tpo $(DEPDIR)/libMean_la-zcolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnmeana.c' object='libMean_la-zcolumnmeana.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) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-zcolumnmeana.lo `test -f 'zcolumnmeana.c' || echo '$(srcdir)/'`zcolumnmeana.c + +testDoubleMean-testDoubleMean.o: testDoubleMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMean_CFLAGS) $(CFLAGS) -MT testDoubleMean-testDoubleMean.o -MD -MP -MF $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo -c -o testDoubleMean-testDoubleMean.o `test -f 'testDoubleMean.c' || echo '$(srcdir)/'`testDoubleMean.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo $(DEPDIR)/testDoubleMean-testDoubleMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMean.c' object='testDoubleMean-testDoubleMean.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) $(testDoubleMean_CFLAGS) $(CFLAGS) -c -o testDoubleMean-testDoubleMean.o `test -f 'testDoubleMean.c' || echo '$(srcdir)/'`testDoubleMean.c + +testDoubleMean-testDoubleMean.obj: testDoubleMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMean_CFLAGS) $(CFLAGS) -MT testDoubleMean-testDoubleMean.obj -MD -MP -MF $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo -c -o testDoubleMean-testDoubleMean.obj `if test -f 'testDoubleMean.c'; then $(CYGPATH_W) 'testDoubleMean.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMean.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo $(DEPDIR)/testDoubleMean-testDoubleMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMean.c' object='testDoubleMean-testDoubleMean.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) $(testDoubleMean_CFLAGS) $(CFLAGS) -c -o testDoubleMean-testDoubleMean.obj `if test -f 'testDoubleMean.c'; then $(CYGPATH_W) 'testDoubleMean.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMean.c'; fi` + +testFloatMean-testFloatMean.o: testFloatMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMean_CFLAGS) $(CFLAGS) -MT testFloatMean-testFloatMean.o -MD -MP -MF $(DEPDIR)/testFloatMean-testFloatMean.Tpo -c -o testFloatMean-testFloatMean.o `test -f 'testFloatMean.c' || echo '$(srcdir)/'`testFloatMean.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMean-testFloatMean.Tpo $(DEPDIR)/testFloatMean-testFloatMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMean.c' object='testFloatMean-testFloatMean.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) $(testFloatMean_CFLAGS) $(CFLAGS) -c -o testFloatMean-testFloatMean.o `test -f 'testFloatMean.c' || echo '$(srcdir)/'`testFloatMean.c + +testFloatMean-testFloatMean.obj: testFloatMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMean_CFLAGS) $(CFLAGS) -MT testFloatMean-testFloatMean.obj -MD -MP -MF $(DEPDIR)/testFloatMean-testFloatMean.Tpo -c -o testFloatMean-testFloatMean.obj `if test -f 'testFloatMean.c'; then $(CYGPATH_W) 'testFloatMean.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMean.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMean-testFloatMean.Tpo $(DEPDIR)/testFloatMean-testFloatMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMean.c' object='testFloatMean-testFloatMean.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) $(testFloatMean_CFLAGS) $(CFLAGS) -c -o testFloatMean-testFloatMean.obj `if test -f 'testFloatMean.c'; then $(CYGPATH_W) 'testFloatMean.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMean.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/statisticsFunctions/mean/ccolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/ccolumnmeana.c new file mode 100644 index 00000000..c0254c44 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/ccolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void ccolumnmeana(floatComplex *in, int lines, int columns, floatComplex *out) { + int i = 0; + + ccolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] = crdivs(out[i] , FloatComplex((float) columns, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/cmeana.c b/2.3-1/src/c/statisticsFunctions/mean/cmeana.c new file mode 100644 index 00000000..ad2a66fc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/cmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" + +floatComplex cmeana(floatComplex *in, int size) { + floatComplex accumulate = FloatComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = cadds(accumulate, in[i]); + } + return FloatComplex(creals(accumulate) / (float) size, cimags(accumulate) / (float) size); +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/crowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/crowmeana.c new file mode 100644 index 00000000..0b073c41 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/crowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void crowmeana(floatComplex *in, int lines, int columns, floatComplex *out) { + int i = 0; + + crowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] = crdivs(out[i], FloatComplex((float)lines, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c new file mode 100644 index 00000000..90d7863b --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void dcolumnmeana(double *in, int lines, int columns, double *out) { + int i = 0; + + dcolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] /= (double) columns; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/dmeana.c b/2.3-1/src/c/statisticsFunctions/mean/dmeana.c new file mode 100644 index 00000000..db11766a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/dmeana.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" + +double dmeana(double *in, int size) { + double accumulate = 0.0; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate / (double) size; + +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/drowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/drowmeana.c new file mode 100644 index 00000000..aec1b31a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/drowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void drowmeana(double *in, int lines, int columns, double *out) { + int i = 0; + + drowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] /= (double) lines; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c new file mode 100644 index 00000000..59985d5e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void scolumnmeana(float *in, int lines, int columns, float *out) { + int i = 0; + + scolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] /= (float) columns; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/smeana.c b/2.3-1/src/c/statisticsFunctions/mean/smeana.c new file mode 100644 index 00000000..f4b1cd10 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/smeana.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" + +float smeana(float *in, int size) { + float accumulate = 0.0f; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate / (float) size; + +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/srowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/srowmeana.c new file mode 100644 index 00000000..3fb799f0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/srowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void srowmeana(float *in, int lines, int columns, float *out) { + int i = 0; + + srowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] /= (float) lines; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c b/2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c new file mode 100644 index 00000000..b0eeffca --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c @@ -0,0 +1,498 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 <assert.h> +#include <stdio.h> +#include <math.h> +#include "mean.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dmeansTest(void) { + double value1 = 3.0; + double value2 = 1.123456789; + + printf("\n>>>> Mean Double Scalar Test\n"); + assert( ( fabs(dmeans(value1) ) - ( 3.0 ) ) / fabs ( dmeans(value1) ) < 3e-16 ); + assert( ( fabs(dmeans(value2) ) - ( 1.123456789 ) ) / fabs ( dmeans(value2) ) < 3e-16 ); + + return 0; +} + +static int dmeanaTest(void) { + double table1[3] = {3.0, 3.0, 3.0}; + double table2[5] = {9.186784563, + 9.186784563, + 9.186784563, + 9.186784563, + 9.186784563}; + + printf("\n>>>> Mean Double Array Test\n"); + assert( ( fabs(dmeana(table1, 3) ) - ( 9.0 / 3.0 ) ) / fabs ( dmeana(table1, 3) ) < 3e-16 ); + assert(( ( fabs(dmeana(table2, 5) ) - ( (9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563) / 5.0) ) ) / fabs ( dmeana(table2, 5) ) < 3e-16 ); + return 0; +} + +static int dcolumnmeanaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double columnMeanmedTable1_3_3[3] = {0}; + double columnMeanmedTable1_1_9[1] = {0}; + double columnMeanmedTable1_9_1[9] = {0}; + double columnMeanmedTable2_2_5[2] = {0}; + double columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Mean Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + dcolumnmeana(table1, 3, 3,columnMeanmedTable1_3_3); + assert( ( fabs(columnMeanmedTable1_3_3[0] ) - ( 6.0 / 3.0 ) ) / fabs ( columnMeanmedTable1_3_3[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable1_3_3[1] ) - ( 15.0 / 3.0 ) ) / fabs ( columnMeanmedTable1_3_3[1] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable1_3_3[2] ) - ( 24.0 / 3.0 ) ) / fabs ( columnMeanmedTable1_3_3[2] ) < 3e-16 ); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + dcolumnmeana(table1, 1, 9,columnMeanmedTable1_1_9); + assert( ( fabs(columnMeanmedTable1_1_9[0] ) - ( 45.0 / 9.0 ) ) / fabs ( columnMeanmedTable1_1_9[0] ) < 3e-16 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + dcolumnmeana(table1, 9, 1,columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + dcolumnmeana(table2, 2, 5,columnMeanmedTable2_2_5); + assert( ( fabs(columnMeanmedTable2_2_5[0] ) - ( 25.0 / 5.0 ) ) / fabs ( columnMeanmedTable2_2_5[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_2_5[1] ) - ( 30.0 / 5.0 ) ) / fabs ( columnMeanmedTable2_2_5[1] ) < 3e-16 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + dcolumnmeana(table2, 5, 2,columnMeanmedTable2_5_2); + assert( ( fabs(columnMeanmedTable2_5_2[0] ) - ( 7.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[1] ) - ( 9.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[1] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[2] ) - ( 11.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[2] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[3] ) - ( 13.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[3] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[4] ) - ( 15.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[4] ) < 3e-16 ); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int drowmeanaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double rowMeanmedTable1_3_3[3] = {0}; + double rowMeanmedTable1_1_9[9] = {0}; + double rowMeanmedTable1_9_1[1] = {0}; + double rowMeanmedTable2_2_5[5] = {0}; + double rowMeanmedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Mean Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + drowmeana(table1, 3, 3,rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert( ( fabs(rowMeanmedTable1_3_3[0] ) - ( 12.0 / 3.0 ) ) / fabs ( rowMeanmedTable1_3_3[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable1_3_3[1] ) - ( 15.0 / 3.0 ) ) / fabs ( rowMeanmedTable1_3_3[1] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable1_3_3[2] ) - ( 18.0 / 3.0 ) ) / fabs ( rowMeanmedTable1_3_3[2] ) < 3e-16 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + drowmeana(table1, 1, 9,rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + drowmeana(table1, 9, 1,rowMeanmedTable1_9_1); + assert( ( fabs(rowMeanmedTable1_9_1[0] ) - ( 45.0 / 9.0 ) ) / fabs ( rowMeanmedTable1_9_1[0] ) < 3e-16 ); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + drowmeana(table2, 2, 5,rowMeanmedTable2_2_5); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + assert( ( fabs(rowMeanmedTable2_2_5[0] ) - ( 3.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[1] ) - ( 7.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[1] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[2] ) - ( 11.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[2] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[3] ) - ( 15.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[3] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[4] ) - ( 19.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[4] ) < 3e-16 ); + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + drowmeana(table2, 5, 2,rowMeanmedTable2_5_2); + assert( ( fabs(rowMeanmedTable2_5_2[0] ) - ( 15.0 / 5.0 ) ) / fabs ( rowMeanmedTable2_5_2[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_5_2[1] ) - ( 40.0 / 5.0 ) ) / fabs ( rowMeanmedTable2_5_2[1] ) < 3e-16 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedTable2_5_2[%d] = %e\n", i, rowMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int zmeansTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex value2 = DoubleComplex(1.123456789, 1.123456789); + + printf("\n>>>> Mean Double Complex Scalar Test\n"); + assert( ( fabs(zreals(zmeans(value1)) ) - ( 3.0 ) ) / fabs ( zreals(zmeans(value1)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeans(value1)) ) - ( 3.0 ) ) / fabs ( zimags(zmeans(value1)) ) < 3e-16 ); + assert( ( fabs(zreals(zmeans(value2)) ) - ( 1.123456789 ) ) / fabs ( zreals(zmeans(value2)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeans(value2)) ) - ( 1.123456789 ) ) / fabs ( zimags(zmeans(value2)) ) < 3e-16 ); + return 0; +} + +static int zmeanaTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex table1[3]; + doubleComplex value2 = DoubleComplex(9.186784563,9.186784563); + doubleComplex table2[5]; + + printf("\n>>>> Mean Double Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", zimags(zmeana(table1, 3))); + printf("%e\n", zreals(zmeana(table2, 5))); + printf("%e\n", zimags(zmeana(table2, 5))); + printf("%e\n", zreals(zmeana(table2, 5))); + printf("%e\n", zimags(zmeana(table2, 5))); + printf("--------\n"); +#endif + assert( ( fabs(zreals(zmeana(table1, 3)) ) - ( 9.0 / 3.0 ) ) / fabs ( zreals(zmeana(table1, 3)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeana(table1, 3)) ) - ( 9.0 / 3.0 ) ) / fabs ( zimags(zmeana(table1, 3)) ) < 3e-16 ); + assert( ( fabs(zreals(zmeana(table2, 5)) ) - ( (9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563) / 5.0 ) ) / fabs ( zreals(zmeana(table2, 5)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeana(table2, 5)) ) - ( (9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563) / 5.0 ) ) / fabs ( zimags(zmeana(table2, 5)) ) < 3e-16 ); + + return 0; +} + +static int zrowmeanaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex rowMeanmedIn_4_3[3]; + doubleComplex rowMeanmedIn_3_4[4]; + doubleComplex rowMeanmedIn_6_2[2]; + doubleComplex rowMeanmedIn_2_6[6]; + doubleComplex rowMeanmedIn_1_12[12]; + doubleComplex rowMeanmedIn_12_1[1]; + + printf("\n>>>> Row Mean Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zrowmeana(in, 4, 3, rowMeanmedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedIn_4_3[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_4_3[i]), zimags(rowMeanmedIn_4_3[i])); + } + assert(fabs(zreals(rowMeanmedIn_4_3[0]) - 0.6 / 4.0) < 1e-16); + assert( ( fabs(zimags(rowMeanmedIn_4_3[0]) ) - ( 3.8 / 4.0 ) ) / fabs ( zimags(rowMeanmedIn_4_3[0]) ) < 3e-16 ); + assert( ( fabs(zreals(rowMeanmedIn_4_3[1]) ) - ( 2.2 / 4.0 ) ) / fabs ( zreals(rowMeanmedIn_4_3[1]) ) < 3e-16 ); + assert(fabs(zimags(rowMeanmedIn_4_3[1]) - 2.2 / 4.0) < 3e-16); + assert(fabs(zreals(rowMeanmedIn_4_3[2]) - 3.8 / 4.0) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_4_3[2]) ) - ( 0.6 / 4.0 ) ) / fabs ( zimags(rowMeanmedIn_4_3[2]) ) < 3e-16 ); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zrowmeana(in, 3, 4, rowMeanmedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowMeanmedIn_3_4[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_3_4[i]), zimags(rowMeanmedIn_3_4[i])); + } + assert(fabs(zreals(rowMeanmedIn_3_4[0]) - 0.3 / 3.0) < 1e-16); + assert( ( fabs(zimags(rowMeanmedIn_3_4[0]) ) - ( 3.0 / 3.0 ) ) / fabs ( zimags(rowMeanmedIn_3_4[0]) ) < 3e-16 ); + assert(zreals(rowMeanmedIn_3_4[1]) == 1.2 / 3.0 && zimags(rowMeanmedIn_3_4[1]) == 2.1 / 3.0); + assert(fabs(zreals(rowMeanmedIn_3_4[2]) - 2.1 / 3.0) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_3_4[2]) ) - ( 1.2 / 3.0 ) ) / fabs ( zimags(rowMeanmedIn_3_4[2]) ) < 3e-16 ); + assert( ( fabs(zreals(rowMeanmedIn_3_4[3]) ) - ( 3.0 / 3.0 ) ) / fabs ( zreals(rowMeanmedIn_3_4[3]) ) < 3e-16 ); + assert(fabs(zimags(rowMeanmedIn_3_4[3]) - 0.3 / 3.0) < 1e-16); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zrowmeana(in, 6, 2, rowMeanmedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedIn_6_2[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_6_2[i]), zimags(rowMeanmedIn_6_2[i])); + } + assert(zreals(rowMeanmedIn_6_2[0]) == 1.5 / 6.0 && zimags(rowMeanmedIn_6_2[0]) == 5.1 / 6.0); + assert(zreals(rowMeanmedIn_6_2[1]) == 5.1 / 6.0 && zimags(rowMeanmedIn_6_2[1]) == 1.5 / 6.0); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + zrowmeana(in, 2, 6, rowMeanmedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowMeanmedIn_2_6[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_2_6[i]), zimags(rowMeanmedIn_2_6[i])); + } + assert(zreals(rowMeanmedIn_2_6[0]) == 0.1 / 2.0 && zimags(rowMeanmedIn_2_6[0]) == 2.1 / 2.0); + assert( ( fabs(zreals(rowMeanmedIn_2_6[1]) ) - ( 0.5 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[1])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[1]) ) - ( 1.7 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[1])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[2]) ) - ( 0.9 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[2])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[2]) ) - ( 1.3 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[2])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[3]) ) - ( 1.3 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[3])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[3]) ) - ( 0.9 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[3])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[4]) ) - ( 1.7 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[4])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[4]) ) - ( 0.5 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[4])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[5]) ) - ( 2.1 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[5])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[5]) ) - ( 0.1 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[5])) < 3e-16); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + zrowmeana(in, 1, 12, rowMeanmedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowMeanmedIn_1_12[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_1_12[i]), zimags(rowMeanmedIn_1_12[i])); + assert(zreals(rowMeanmedIn_1_12[i]) == zreals(in[i]) && zimags(rowMeanmedIn_1_12[i]) == zimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zrowmeana(in, 12, 1, rowMeanmedIn_12_1); + printf("rowMeanmedIn_12_1[%d] = %e + %ei\n", 0, zreals(rowMeanmedIn_12_1[0]), zimags(rowMeanmedIn_12_1[0])); + assert(zreals(rowMeanmedIn_12_1[0]) == 6.6 / 12.0 && zimags(rowMeanmedIn_12_1[0]) == 6.6 / 12.0); + + return 0; +} + +static int zcolumnmeanaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex columnMeanmedIn_4_3[4]; + doubleComplex columnMeanmedIn_3_4[3]; + doubleComplex columnMeanmedIn_6_2[6]; + doubleComplex columnMeanmedIn_2_6[2]; + doubleComplex columnMeanmedIn_1_12[1]; + doubleComplex columnMeanmedIn_12_1[12]; + + printf("\n>>>> ColumnMean Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zcolumnmeana(in, 4, 3, columnMeanmedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnMeanmedIn_4_3[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_4_3[i]), zimags(columnMeanmedIn_4_3[i])); + } + assert(fabs(zreals(columnMeanmedIn_4_3[0]) - 1.2 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[0]) - 2.1 / 3.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_4_3[1]) - 1.5 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[1]) - 1.8 / 3.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_4_3[2]) - 1.8 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[2]) - 1.5 / 3.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_4_3[3]) - 2.1 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[3]) - 1.2 / 3.0) < 3e-16); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zcolumnmeana(in, 3, 4, columnMeanmedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnMeanmedIn_3_4[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_3_4[i]), zimags(columnMeanmedIn_3_4[i])); + } + assert(fabs(zreals(columnMeanmedIn_3_4[0]) - 1.8 / 4.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_3_4[0]) - 2.6 / 4.0) < 3e-16); + assert(zreals(columnMeanmedIn_3_4[1]) == 2.2 / 4.0 && zimags(columnMeanmedIn_3_4[1]) == 2.2 / 4.0); + assert(zreals(columnMeanmedIn_3_4[2]) == 2.6 / 4.0 && zimags(columnMeanmedIn_3_4[2]) == 1.8 / 4.0); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zcolumnmeana(in, 6, 2, columnMeanmedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnMeanmedIn_6_2[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_6_2[i]), zimags(columnMeanmedIn_6_2[i])); + } + assert(zreals(columnMeanmedIn_6_2[0]) == 0.6 / 2.0 && zimags(columnMeanmedIn_6_2[0]) == 1.6 / 2.0); + assert(fabs(zreals(columnMeanmedIn_6_2[1]) - 0.8 / 2.0) < 3e-16); + assert(zimags(columnMeanmedIn_6_2[1]) == 1.4 / 2.0); + assert(zreals(columnMeanmedIn_6_2[2]) == 1.0 / 2.0 && zimags(columnMeanmedIn_6_2[2]) == 1.2 / 2.0); + assert(zreals(columnMeanmedIn_6_2[3]) == 1.2 / 2.0 && zimags(columnMeanmedIn_6_2[3]) == 1.0 / 2.0); + assert(zreals(columnMeanmedIn_6_2[4]) == 1.4 / 2.0); + assert(fabs(zimags(columnMeanmedIn_6_2[4]) - 0.8 / 2.0) < 3e-16); + assert(zreals(columnMeanmedIn_6_2[5]) == 1.6 / 2.0 && zimags(columnMeanmedIn_6_2[5]) == 0.6 / 2.0); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + zcolumnmeana(in, 2, 6, columnMeanmedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedIn_2_6[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_2_6[i]), zimags(columnMeanmedIn_2_6[i])); + } + assert(fabs(zreals(columnMeanmedIn_2_6[0]) - 3.0 / 6.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_2_6[0]) - 3.6 / 6.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_2_6[1]) - 3.6 / 6.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_2_6[1]) - 3.0 / 6.0) < 3e-16); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + zcolumnmeana(in, 1, 12, columnMeanmedIn_1_12); + printf("columnMeanmedIn_1_12[%d] = %e + %ei\n", 0, zreals(columnMeanmedIn_1_12[0]), zimags(columnMeanmedIn_1_12[0])); + assert(zreals(columnMeanmedIn_1_12[0]) == 6.6 / 12.0 && zimags(columnMeanmedIn_1_12[0]) == 6.6 / 12.0); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zcolumnmeana(in, 12, 1, columnMeanmedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnMeanmedIn_12_1[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_12_1[i]), zimags(columnMeanmedIn_12_1[i])); + assert(zreals(columnMeanmedIn_12_1[i]) == zreals(in[i]) && zimags(columnMeanmedIn_12_1[i]) == zimags(in[i])); + } + + return 0; +} + +static int testMean(void) { + + dmeansTest(); + dmeanaTest(); + drowmeanaTest(); + dcolumnmeanaTest(); + zmeansTest(); + zmeanaTest(); + zrowmeanaTest(); + zcolumnmeanaTest(); + + return 0; +} + +int main(void) { + assert(testMean() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c b/2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c new file mode 100644 index 00000000..e5c6d9d8 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c @@ -0,0 +1,481 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 <assert.h> +#include <stdio.h> +#include <math.h> +#include "mean.h" + +/* #define LOCAL_DEBUG */ + +static int smeansTest(void) { + float value1 = 3.0f; + float value2 = 1.123456789f; + + printf("\n>>>> Mean Float Scalar Test\n"); + assert(smeans(value1) == 3.0f); + assert(smeans(value2) == 1.123456789f); + + return 0; +} + +static int smeanaTest(void) { + float table1[3] = {3.0f, 3.0f, 3.0f}; + float table2[5] = {9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f}; + + printf("\n>>>> Mean Float Array Test\n"); + assert(smeana(table1, 3) == 9.0f / 3.0f); + assert((smeana(table2, 5) - (9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f) / 5.0f) / smeana(table2, 5) < 1e-6); + return 0; +} + +static int scolumnmeanaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float columnMeanmedTable1_3_3[3] = {0}; + float columnMeanmedTable1_1_9[1] = {0}; + float columnMeanmedTable1_9_1[9] = {0}; + float columnMeanmedTable2_2_5[2] = {0}; + float columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Mean Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + scolumnmeana(table1, 3, 3,columnMeanmedTable1_3_3); + assert(columnMeanmedTable1_3_3[0] == 6.0f / 3.0f); + assert(columnMeanmedTable1_3_3[1] == 15.0f / 3.0f); + assert(columnMeanmedTable1_3_3[2] == 24.0f / 3.0f); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + scolumnmeana(table1, 1, 9,columnMeanmedTable1_1_9); + assert(columnMeanmedTable1_1_9[0] == 45.0f / 9.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + scolumnmeana(table1, 9, 1,columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + scolumnmeana(table2, 2, 5,columnMeanmedTable2_2_5); + assert(columnMeanmedTable2_2_5[0] == 25.0f / 5.0f); + assert(columnMeanmedTable2_2_5[1] == 30.0f / 5.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + scolumnmeana(table2, 5, 2,columnMeanmedTable2_5_2); + assert(columnMeanmedTable2_5_2[0] == 7.0f / 2.0f); + assert(columnMeanmedTable2_5_2[1] == 9.0f / 2.0f); + assert(columnMeanmedTable2_5_2[2] == 11.0f / 2.0f); + assert(columnMeanmedTable2_5_2[3] == 13.0f / 2.0f); + assert(columnMeanmedTable2_5_2[4] == 15.0f / 2.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int srowmeanaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float rowMeanmedTable1_3_3[3] = {0}; + float rowMeanmedTable1_1_9[9] = {0}; + float rowMeanmedTable1_9_1[1] = {0}; + float rowMeanmedTable2_2_5[5] = {0}; + float rowMeanmedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Mean Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + srowmeana(table1, 3, 3,rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert(rowMeanmedTable1_3_3[0] == 12.0f / 3.0f); + assert(rowMeanmedTable1_3_3[1] == 15.0f / 3.0f); + assert(rowMeanmedTable1_3_3[2] == 18.0f / 3.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + srowmeana(table1, 1, 9,rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + srowmeana(table1, 9, 1,rowMeanmedTable1_9_1); + assert(rowMeanmedTable1_9_1[0] == 45.0f / 9.0f); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + srowmeana(table2, 2, 5,rowMeanmedTable2_2_5); + assert(rowMeanmedTable2_2_5[0] == 3.0f / 2.0f); + assert(rowMeanmedTable2_2_5[1] == 7.0f / 2.0f); + assert(rowMeanmedTable2_2_5[2] == 11.0f / 2.0f); + assert(rowMeanmedTable2_2_5[3] == 15.0f / 2.0f); + assert(rowMeanmedTable2_2_5[4] == 19.0f / 2.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + srowmeana(table2, 5, 2,rowMeanmedTable2_5_2); + assert(rowMeanmedTable2_5_2[0] == 15.0f / 5.0f); + assert(rowMeanmedTable2_5_2[1] == 40.0f / 5.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedTable2_5_2[%d] = %e\n", i, rowMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int cmeansTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex value2 = FloatComplex(1.123456789f, 1.123456789f); + + printf("\n>>>> Mean Float Complex Scalar Test\n"); + assert(creals(cmeans(value1)) == 3.0f); + assert(cimags(cmeans(value1)) == 3.0f); + assert(creals(cmeans(value2)) == 1.123456789f); + assert(cimags(cmeans(value2)) == 1.123456789f); + return 0; +} + +static int cmeanaTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex table1[3]; + floatComplex value2 = FloatComplex(9.186784563f,9.186784563f); + floatComplex table2[5]; + + printf("\n>>>> Mean Float Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", cimags(cmeana(table1, 3))); + printf("%e\n", creals(cmeana(table2, 5))); + printf("%e\n", cimags(cmeana(table2, 5))); + printf("%e\n", creals(cmeana(table2, 5))); + printf("%e\n", cimags(cmeana(table2, 5))); + printf("--------\n"); +#endif + assert(creals(cmeana(table1, 3)) == 9.0f / 3.0f); + assert(cimags(cmeana(table1, 3)) == 9.0f / 3.0f); + assert(creals(cmeana(table2, 5)) == (9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f) / 5.0f); + assert(cimags(cmeana(table2, 5)) == (9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f) / 5.0f); + + return 0; +} + +static int crowmeanaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex rowMeanmedIn_4_3[3]; + floatComplex rowMeanmedIn_3_4[4]; + floatComplex rowMeanmedIn_6_2[2]; + floatComplex rowMeanmedIn_2_6[6]; + floatComplex rowMeanmedIn_1_12[12]; + floatComplex rowMeanmedIn_12_1[1]; + + printf("\n>>>> Row Mean Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + crowmeana(in, 4, 3, rowMeanmedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedIn_4_3[%d] = %e + %ei\n", i, creals(rowMeanmedIn_4_3[i]), cimags(rowMeanmedIn_4_3[i])); + } + assert(creals(rowMeanmedIn_4_3[0]) == 0.6f / 4.0f && cimags(rowMeanmedIn_4_3[0]) == 3.8f / 4.0f); + assert(creals(rowMeanmedIn_4_3[1]) == 2.2f / 4.0f && cimags(rowMeanmedIn_4_3[1]) == 2.2f / 4.0f); + assert(fabs(creals(rowMeanmedIn_4_3[2]) - 3.8f / 4.0f) < 1e-06); + assert(cimags(rowMeanmedIn_4_3[2]) == 0.6f / 4.0f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + crowmeana(in, 3, 4, rowMeanmedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowMeanmedIn_3_4[%d] = %e + %ei\n", i, creals(rowMeanmedIn_3_4[i]), cimags(rowMeanmedIn_3_4[i])); + } + assert(creals(rowMeanmedIn_3_4[0]) == 0.3f / 3.0f && cimags(rowMeanmedIn_3_4[0]) == 3.0f / 3.0f); + assert(creals(rowMeanmedIn_3_4[1]) == 1.2f / 3.0f && cimags(rowMeanmedIn_3_4[1]) == 2.1f / 3.0f); + assert(creals(rowMeanmedIn_3_4[2]) == 2.1f / 3.0f && cimags(rowMeanmedIn_3_4[2]) == 1.2f / 3.0f); + assert(creals(rowMeanmedIn_3_4[3]) == 3.0f / 3.0f && cimags(rowMeanmedIn_3_4[3]) == 0.3f / 3.0f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + crowmeana(in, 6, 2, rowMeanmedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedIn_6_2[%d] = %e + %ei\n", i, creals(rowMeanmedIn_6_2[i]), cimags(rowMeanmedIn_6_2[i])); + } + assert(creals(rowMeanmedIn_6_2[0]) == 1.5f / 6.0f && cimags(rowMeanmedIn_6_2[0]) == 5.1f / 6.0f); + assert(creals(rowMeanmedIn_6_2[1]) == 5.1f / 6.0f); + assert(fabs(cimags(rowMeanmedIn_6_2[1]) - 1.5f / 6.0f) < 1e-06); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + crowmeana(in, 2, 6, rowMeanmedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowMeanmedIn_2_6[%d] = %e + %ei\n", i, creals(rowMeanmedIn_2_6[i]), cimags(rowMeanmedIn_2_6[i])); + } + assert(creals(rowMeanmedIn_2_6[0]) == 0.1f / 2.0f && cimags(rowMeanmedIn_2_6[0]) == 2.1f / 2.0f); + assert(creals(rowMeanmedIn_2_6[1]) == 0.5f / 2.0f && cimags(rowMeanmedIn_2_6[1]) == 1.7f / 2.0f); + assert(creals(rowMeanmedIn_2_6[2]) == 0.9f / 2.0f && cimags(rowMeanmedIn_2_6[2]) == 1.3f / 2.0f); + assert(creals(rowMeanmedIn_2_6[3]) == 1.3f / 2.0f && cimags(rowMeanmedIn_2_6[3]) == 0.9f / 2.0f); + assert(creals(rowMeanmedIn_2_6[4]) == 1.7f / 2.0f && cimags(rowMeanmedIn_2_6[4]) == 0.5f / 2.0f); + assert(creals(rowMeanmedIn_2_6[5]) == 2.1f / 2.0f && cimags(rowMeanmedIn_2_6[5]) == 0.1f / 2.0f); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + crowmeana(in, 1, 12, rowMeanmedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowMeanmedIn_1_12[%d] = %e + %ei\n", i, creals(rowMeanmedIn_1_12[i]), cimags(rowMeanmedIn_1_12[i])); + assert(creals(rowMeanmedIn_1_12[i]) == creals(in[i]) && cimags(rowMeanmedIn_1_12[i]) == cimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + crowmeana(in, 12, 1, rowMeanmedIn_12_1); + printf("rowMeanmedIn_12_1[%d] = %e + %ei\n", 0, creals(rowMeanmedIn_12_1[0]), cimags(rowMeanmedIn_12_1[0])); + assert(creals(rowMeanmedIn_12_1[0]) == 6.6f / 12.0f && cimags(rowMeanmedIn_12_1[0]) == 6.6f / 12.0f); + + return 0; +} + +static int ccolumnmeanaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex columnMeanmedIn_4_3[4]; + floatComplex columnMeanmedIn_3_4[3]; + floatComplex columnMeanmedIn_6_2[6]; + floatComplex columnMeanmedIn_2_6[2]; + floatComplex columnMeanmedIn_1_12[1]; + floatComplex columnMeanmedIn_12_1[12]; + + printf("\n>>>> ColumnMean Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + ccolumnmeana(in, 4, 3, columnMeanmedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnMeanmedIn_4_3[%d] = %e + %ei\n", i, creals(columnMeanmedIn_4_3[i]), cimags(columnMeanmedIn_4_3[i])); + } + assert(creals(columnMeanmedIn_4_3[0]) == 1.2f / 3.0f && cimags(columnMeanmedIn_4_3[0]) == 2.1f / 3.0f); + assert(creals(columnMeanmedIn_4_3[1]) == 1.5f / 3.0f); + assert(fabs(cimags(columnMeanmedIn_4_3[1]) - 1.8f / 3.0f) < 1e-06); + assert(creals(columnMeanmedIn_4_3[2]) == 1.8f / 3.0f && cimags(columnMeanmedIn_4_3[2]) == 1.5f / 3.0f); + assert(creals(columnMeanmedIn_4_3[3]) == 2.1f / 3.0f && cimags(columnMeanmedIn_4_3[3]) == 1.2f / 3.0f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + ccolumnmeana(in, 3, 4, columnMeanmedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnMeanmedIn_3_4[%d] = %e + %ei\n", i, creals(columnMeanmedIn_3_4[i]), cimags(columnMeanmedIn_3_4[i])); + } + assert(creals(columnMeanmedIn_3_4[0]) == 1.8f / 4.0f); + assert(fabs(cimags(columnMeanmedIn_3_4[0]) - 2.6f / 4.0f) < 1e-06); + assert(creals(columnMeanmedIn_3_4[1]) == 2.2f / 4.0f && cimags(columnMeanmedIn_3_4[1]) == 2.2f / 4.0f); + assert(creals(columnMeanmedIn_3_4[2]) == 2.6f / 4.0f && cimags(columnMeanmedIn_3_4[2]) == 1.8f / 4.0f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + ccolumnmeana(in, 6, 2, columnMeanmedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnMeanmedIn_6_2[%d] = %e + %ei\n", i, creals(columnMeanmedIn_6_2[i]), cimags(columnMeanmedIn_6_2[i])); + } + assert(creals(columnMeanmedIn_6_2[0]) == 0.6f / 2.0f && cimags(columnMeanmedIn_6_2[0]) == 1.6f / 2.0f); + assert(creals(columnMeanmedIn_6_2[1]) == 0.8f / 2.0f && cimags(columnMeanmedIn_6_2[1]) == 1.4f / 2.0f); + assert(creals(columnMeanmedIn_6_2[2]) == 1.0f / 2.0f && cimags(columnMeanmedIn_6_2[2]) == 1.2f / 2.0f); + assert(creals(columnMeanmedIn_6_2[3]) == 1.2f / 2.0f && cimags(columnMeanmedIn_6_2[3]) == 1.0f / 2.0f); + assert(creals(columnMeanmedIn_6_2[4]) == 1.4f / 2.0f && cimags(columnMeanmedIn_6_2[4]) == 0.8f / 2.0f); + assert(creals(columnMeanmedIn_6_2[5]) == 1.6f / 2.0f && cimags(columnMeanmedIn_6_2[5]) == 0.6f / 2.0f); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + ccolumnmeana(in, 2, 6, columnMeanmedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedIn_2_6[%d] = %e + %ei\n", i, creals(columnMeanmedIn_2_6[i]), cimags(columnMeanmedIn_2_6[i])); + } + assert(creals(columnMeanmedIn_2_6[0]) == 3.0f / 6.0f && cimags(columnMeanmedIn_2_6[0]) == 3.6f / 6.0f); + assert(creals(columnMeanmedIn_2_6[1]) == 3.6f / 6.0f); + assert(fabs(cimags(columnMeanmedIn_2_6[1]) -3.0f / 6.0f) < 1e-06); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + ccolumnmeana(in, 1, 12, columnMeanmedIn_1_12); + printf("columnMeanmedIn_1_12[%d] = %e + %ei\n", 0, creals(columnMeanmedIn_1_12[0]), cimags(columnMeanmedIn_1_12[0])); + assert(creals(columnMeanmedIn_1_12[0]) == 6.6f / 12.0f && cimags(columnMeanmedIn_1_12[0]) == 6.6f / 12.0f); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + ccolumnmeana(in, 12, 1, columnMeanmedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnMeanmedIn_12_1[%d] = %e + %ei\n", i, creals(columnMeanmedIn_12_1[i]), cimags(columnMeanmedIn_12_1[i])); + assert(creals(columnMeanmedIn_12_1[i]) == creals(in[i]) && cimags(columnMeanmedIn_12_1[i]) == cimags(in[i])); + } + + return 0; +} + +static int testMean(void) { + + smeansTest(); + smeanaTest(); + srowmeanaTest(); + scolumnmeanaTest(); + cmeansTest(); + cmeanaTest(); + crowmeanaTest(); + ccolumnmeanaTest(); + + return 0; +} + +int main(void) { + assert(testMean() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj new file mode 100644 index 00000000..161eef21 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.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>{3C4D1EB3-7D2A-4AAE-9B4C-3A0C18CBA156}</ProjectGuid>
+ <RootNamespace>testDoubleMean</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;../../../operations/includes;../../../type;../../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;../../../operations/includes;../../../type;../../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;../../../operations/includes;../../../type;../../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;../../../operations/includes;../../../type;../../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="..\testDoubleMean.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="..\..\statisticsFunctions.vcxproj">
+ <Project>{e11ed064-3bf2-4f70-b66e-3223c737ec60}</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/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj.filters new file mode 100644 index 00000000..fba0c339 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.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="..\testDoubleMean.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj new file mode 100644 index 00000000..b4c331c4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.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>{ACF6BDB6-C931-400D-A1ED-0B053A19F7EE}</ProjectGuid>
+ <RootNamespace>testFloatMean</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;../../../operations/includes;../../../type;../../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;../../../operations/includes;../../../type;../../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;../../../operations/includes;../../../type;../../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;../../../operations/includes;../../../type;../../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="..\testFloatMean.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="..\..\statisticsFunctions.vcxproj">
+ <Project>{e11ed064-3bf2-4f70-b66e-3223c737ec60}</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/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj.filters new file mode 100644 index 00000000..91061adc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.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="..\testFloatMean.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c new file mode 100644 index 00000000..8cc38fc7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void zcolumnmeana(doubleComplex *in, int lines, int columns, doubleComplex *out) { + int i = 0; + + zcolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] = zrdivs(out[i] , DoubleComplex((double) columns, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/zmeana.c b/2.3-1/src/c/statisticsFunctions/mean/zmeana.c new file mode 100644 index 00000000..aae80ffc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/zmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" + +doubleComplex zmeana(doubleComplex *in, int size) { + doubleComplex accumulate = DoubleComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = zadds(accumulate, in[i]); + } + return DoubleComplex(zreals(accumulate) / (double) size, zimags(accumulate) / (double) size); +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c new file mode 100644 index 00000000..8e19bf9e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * 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 "mean.h" +#include "sum.h" + +void zrowmeana(doubleComplex *in, int lines, int columns, doubleComplex *out) { + int i = 0; + + zrowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] = zrdivs(out[i], DoubleComplex((double)lines, 0.0f)); + } +} |