Mercurial > octave
changeset 27180:269d71efaf04
delete unused file functor.h
* CColVector.cc, CMatrix.cc, CNDArray.cc, CRowVector.cc, CSparse.cc,
dColVector.cc, dMatrix.cc, dNDArray.cc, dRowVector.cc, dSparse.cc,
fCColVector.cc, fCMatrix.cc, fCNDArray.cc, fCRowVector.cc,
fColVector.cc, fMatrix.cc, fNDArray.cc, fRowVector.cc:
Don't include functor.h. No definitions from it were used.
* functor.h: Delete unused file.
* liboctave/util/module.mk: Update.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 12 Jun 2019 16:55:22 -0500 |
parents | d68968a1277c |
children | 5754e8d8199a |
files | liboctave/array/CColVector.cc liboctave/array/CMatrix.cc liboctave/array/CNDArray.cc liboctave/array/CRowVector.cc liboctave/array/CSparse.cc liboctave/array/dColVector.cc liboctave/array/dMatrix.cc liboctave/array/dNDArray.cc liboctave/array/dRowVector.cc liboctave/array/dSparse.cc liboctave/array/fCColVector.cc liboctave/array/fCMatrix.cc liboctave/array/fCNDArray.cc liboctave/array/fCRowVector.cc liboctave/array/fColVector.cc liboctave/array/fMatrix.cc liboctave/array/fNDArray.cc liboctave/array/fRowVector.cc liboctave/util/functor.h liboctave/util/module.mk |
diffstat | 20 files changed, 0 insertions(+), 103 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/CColVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/CColVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -29,7 +29,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/CMatrix.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/CMatrix.cc Wed Jun 12 16:55:22 2019 -0500 @@ -44,7 +44,6 @@ #include "dDiagMatrix.h" #include "dMatrix.h" #include "dRowVector.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "lo-ieee.h"
--- a/liboctave/array/CNDArray.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/CNDArray.cc Wed Jun 12 16:55:22 2019 -0500 @@ -32,7 +32,6 @@ #include "Array-util.h" #include "CNDArray.h" #include "f77-fcn.h" -#include "functor.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "mx-base.h"
--- a/liboctave/array/CRowVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/CRowVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -28,7 +28,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/CSparse.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/CSparse.cc Wed Jun 12 16:55:22 2019 -0500 @@ -49,7 +49,6 @@ #include "CSparse.h" #include "boolSparse.h" #include "dSparse.h" -#include "functor.h" #include "oct-spparms.h" #include "sparse-lu.h" #include "oct-sparse.h"
--- a/liboctave/array/dColVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/dColVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -29,7 +29,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/dMatrix.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/dMatrix.cc Wed Jun 12 16:55:22 2019 -0500 @@ -44,7 +44,6 @@ #include "dDiagMatrix.h" #include "dMatrix.h" #include "dRowVector.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "lo-ieee.h"
--- a/liboctave/array/dNDArray.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/dNDArray.cc Wed Jun 12 16:55:22 2019 -0500 @@ -32,7 +32,6 @@ #include "Array-util.h" #include "dNDArray.h" #include "f77-fcn.h" -#include "functor.h" #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h"
--- a/liboctave/array/dRowVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/dRowVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -28,7 +28,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/dSparse.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/dSparse.cc Wed Jun 12 16:55:22 2019 -0500 @@ -40,7 +40,6 @@ #include "CSparse.h" #include "boolSparse.h" #include "dSparse.h" -#include "functor.h" #include "oct-spparms.h" #include "sparse-lu.h" #include "MatrixType.h"
--- a/liboctave/array/fCColVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fCColVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -29,7 +29,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/fCMatrix.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fCMatrix.cc Wed Jun 12 16:55:22 2019 -0500 @@ -42,7 +42,6 @@ #include "fCMatrix.h" #include "fCNDArray.h" #include "fCRowVector.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "lo-ieee.h"
--- a/liboctave/array/fCNDArray.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fCNDArray.cc Wed Jun 12 16:55:22 2019 -0500 @@ -32,7 +32,6 @@ #include "Array-util.h" #include "f77-fcn.h" #include "fCNDArray.h" -#include "functor.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "mx-base.h"
--- a/liboctave/array/fCRowVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fCRowVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -28,7 +28,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/fColVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fColVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -29,7 +29,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/array/fMatrix.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fMatrix.cc Wed Jun 12 16:55:22 2019 -0500 @@ -46,7 +46,6 @@ #include "fMatrix.h" #include "fNDArray.h" #include "fRowVector.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "lo-ieee.h"
--- a/liboctave/array/fNDArray.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fNDArray.cc Wed Jun 12 16:55:22 2019 -0500 @@ -32,7 +32,6 @@ #include "Array-util.h" #include "f77-fcn.h" #include "fNDArray.h" -#include "functor.h" #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h"
--- a/liboctave/array/fRowVector.cc Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/array/fRowVector.cc Wed Jun 12 16:55:22 2019 -0500 @@ -28,7 +28,6 @@ #include <ostream> #include "Array-util.h" -#include "functor.h" #include "lo-blas-proto.h" #include "lo-error.h" #include "mx-base.h"
--- a/liboctave/util/functor.h Wed Jun 12 10:04:34 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* - -Copyright (C) 2008-2019 John W. Eaton - -This file is part of Octave. - -Octave 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. - -Octave 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 Octave; see the file COPYING. If not, see -<https://www.gnu.org/licenses/>. - -*/ - -#if ! defined (octave_functor_h) -#define octave_functor_h 1 - -#include "octave-config.h" - -// FIXME: could we use std::function objects instead? - -template <typename RT, typename PT> -class fcn_ptr -{ -public: - - typedef RT (*TYPE) (PT); -}; - -template <typename RT, typename PT> -class functor -{ -private: - - typedef typename fcn_ptr<RT, PT>::TYPE fcn_ptr_type; - - fcn_ptr_type m_fptr; - -public: - - functor (fcn_ptr_type p) : m_fptr (p) { } - - RT operator () (PT arg) { return m_fptr (arg); } -}; - -template <typename CT, typename RT, typename PT> -class functor_with_conversion -{ -private: - - typedef typename fcn_ptr<RT, PT>::TYPE fcn_ptr_type; - - fcn_ptr_type m_fptr; - -public: - - functor_with_conversion (fcn_ptr_type p) : m_fptr (p) { } - - CT operator () (PT arg) { return CT (m_fptr (arg)); } -}; - -template <typename RT, typename PT> -functor<RT, PT> -func_ptr (RT (*f) (PT)) -{ - return functor<RT, PT> (f); -} - -template <typename CT, typename RT, typename PT> -functor_with_conversion<CT, RT, PT> -func_ptr_with_conversion (RT (*f) (PT)) -{ - return functor_with_conversion<CT, RT, PT> (f); -} - -#endif
--- a/liboctave/util/module.mk Wed Jun 12 10:04:34 2019 -0700 +++ b/liboctave/util/module.mk Wed Jun 12 16:55:22 2019 -0500 @@ -7,7 +7,6 @@ %reldir%/cmd-hist.h \ %reldir%/data-conv.h \ %reldir%/file-info.h \ - %reldir%/functor.h \ %reldir%/glob-match.h \ %reldir%/lo-array-errwarn.h \ %reldir%/lo-cutils.h \