From: <car...@us...> - 2012-05-11 12:15:35
|
Revision: 10407 http://octave.svn.sourceforge.net/octave/?rev=10407&view=rev Author: carandraug Date: 2012-05-11 12:15:24 +0000 (Fri, 11 May 2012) Log Message: ----------- __kernel_weights: remove the .m file implementation of the function since we have a C++ implementation for more than 4 years already Modified Paths: -------------- trunk/octave-forge/main/econometrics/src/Makefile trunk/octave-forge/main/econometrics/src/__kernel_weights.cc Removed Paths: ------------- trunk/octave-forge/main/econometrics/inst/__kernel_weights.m Deleted: trunk/octave-forge/main/econometrics/inst/__kernel_weights.m =================================================================== --- trunk/octave-forge/main/econometrics/inst/__kernel_weights.m 2012-05-11 11:51:45 UTC (rev 10406) +++ trunk/octave-forge/main/econometrics/inst/__kernel_weights.m 2012-05-11 12:15:24 UTC (rev 10407) @@ -1,30 +0,0 @@ -## Copyright (C) 2006, 2007 Michael Creel <mic...@ua...> -## -## This program is free software; you can redistribute it and/or modify it under -## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 3 of the License, or (at your option) any later -## version. -## -## This program is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -## details. -## -## You should have received a copy of the GNU General Public License along with -## this program; if not, see <http://www.gnu.org/licenses/>. - -## __kernel_weights: for internal use by kernel_regression and kernel_density. There -## is also a faster .oct file version that should be be found automatically. - -function W = __kernel_weights(data, evalpoints, kernel) - - # calculate distances - nn = rows(evalpoints); - n = rows(data); - W = zeros(nn,n); - for i = 1:nn - zz = data - repmat(evalpoints(i,:), n, 1); - zz = feval(kernel, zz); - W(i,:) = zz'; - endfor -endfunction Modified: trunk/octave-forge/main/econometrics/src/Makefile =================================================================== --- trunk/octave-forge/main/econometrics/src/Makefile 2012-05-11 11:51:45 UTC (rev 10406) +++ trunk/octave-forge/main/econometrics/src/Makefile 2012-05-11 12:15:24 UTC (rev 10407) @@ -1,7 +1,11 @@ -all: __kernel_weights.oct +MKOCTFILE = mkoctfile -Wall +PROGS = $(patsubst %.cc,%.oct,$(wildcard *.cc)) + +all: $(PROGS) + %.oct: %.cc - mkoctfile -s $< + $(MKOCTFILE) $< clean: - -rm *.o core octave-core *.oct *~ + rm -f *.o octave-core core *.oct *~ Modified: trunk/octave-forge/main/econometrics/src/__kernel_weights.cc =================================================================== --- trunk/octave-forge/main/econometrics/src/__kernel_weights.cc 2012-05-11 11:51:45 UTC (rev 10406) +++ trunk/octave-forge/main/econometrics/src/__kernel_weights.cc 2012-05-11 12:15:24 UTC (rev 10407) @@ -14,6 +14,9 @@ // this program; if not, see <http://www.gnu.org/licenses/>. // __kernel_weights: for internal use by kernel density and regression functions +// This function was originally written as .m file and eventually rewritten in +// C++ for performance. the .m file was removed from the package on revision +// 10407 by carandraug #include <oct.h> #include <octave/parse.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |