Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59234 - sandbox/numeric_bindings/boost/numeric/bindings
From: rutger_at_[hidden]
Date: 2010-01-23 02:52:05


Author: rutger
Date: 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
New Revision: 59234
URL: http://svn.boost.org/trac/boost/changeset/59234

Log:
Merged the different index functions into one header

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/index.hpp (contents, props changed)
Removed:
   sandbox/numeric_bindings/boost/numeric/bindings/index_major.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/index_minor.hpp
   sandbox/numeric_bindings/boost/numeric/bindings/index_trans.hpp
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp | 4 +---
   sandbox/numeric_bindings/boost/numeric/bindings/size.hpp | 4 +---
   2 files changed, 2 insertions(+), 6 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/bandwidth.hpp 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
@@ -12,9 +12,7 @@
 #include <boost/numeric/bindings/detail/generate_functions.hpp>
 #include <boost/numeric/bindings/detail/get.hpp>
 #include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/index_major.hpp>
-#include <boost/numeric/bindings/index_minor.hpp>
-#include <boost/numeric/bindings/index_trans.hpp>
+#include <boost/numeric/bindings/index.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/min.hpp>
 #include <boost/mpl/greater.hpp>

Added: sandbox/numeric_bindings/boost/numeric/bindings/index.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/index.hpp 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
@@ -0,0 +1,72 @@
+//
+// Copyright (c) 2009 by Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_INDEX_HPP
+#define BOOST_NUMERIC_BINDINGS_INDEX_HPP
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/max.hpp>
+#include <boost/numeric/bindings/rank.hpp>
+#include <boost/numeric/bindings/is_column_major.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+
+template< typename T >
+struct index_minor:
+ mpl::if_<
+ is_column_major< T >,
+ tag::index<1>,
+ tag::index<
+ mpl::max< tag::matrix, rank< T > >::type::value
+ >
+ >::type {};
+
+template< typename T >
+struct index_major:
+ mpl::if_<
+ is_column_major< T >,
+ tag::index<
+ mpl::max< tag::matrix, rank< T > >::type::value
+ >,
+ tag::index<1>
+ >::type {};
+
+
+template< typename Index, typename TransTag >
+struct index_trans {
+ typedef Index type;
+};
+
+template<>
+struct index_trans< tag::index<1>, tag::transpose > {
+ typedef tag::index<2> type;
+};
+
+template<>
+struct index_trans< tag::index<1>, tag::conjugate > {
+ typedef tag::index<2> type;
+};
+
+template<>
+struct index_trans< tag::index<2>, tag::transpose > {
+ typedef tag::index<1> type;
+};
+
+template<>
+struct index_trans< tag::index<2>, tag::conjugate > {
+ typedef tag::index<1> type;
+};
+
+
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/index_major.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/index_major.hpp 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
+++ (empty file)
@@ -1,35 +0,0 @@
-//
-// Copyright (c) 2009 by Rutger ter Borg
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_NUMERIC_BINDINGS_INDEX_MAJOR_HPP
-#define BOOST_NUMERIC_BINDINGS_INDEX_MAJOR_HPP
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/max.hpp>
-#include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/is_column_major.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-
-template< typename T >
-struct index_major:
- mpl::if_<
- is_column_major< T >,
- tag::index<
- mpl::max< tag::matrix, rank< T > >::type::value
- >,
- tag::index<1>
- >::type {};
-
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/index_minor.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/index_minor.hpp 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
+++ (empty file)
@@ -1,35 +0,0 @@
-//
-// Copyright (c) 2009 by Rutger ter Borg
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_NUMERIC_BINDINGS_INDEX_MINOR_HPP
-#define BOOST_NUMERIC_BINDINGS_INDEX_MINOR_HPP
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/max.hpp>
-#include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/is_column_major.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-
-template< typename T >
-struct index_minor:
- mpl::if_<
- is_column_major< T >,
- tag::index<1>,
- tag::index<
- mpl::max< tag::matrix, rank< T > >::type::value
- >
- >::type {};
-
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Deleted: sandbox/numeric_bindings/boost/numeric/bindings/index_trans.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/index_trans.hpp 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
+++ (empty file)
@@ -1,46 +0,0 @@
-// Copyright (c) 2009 by Rutger ter Borg
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_NUMERIC_BINDINGS_INDEX_TRANS_HPP
-#define BOOST_NUMERIC_BINDINGS_INDEX_TRANS_HPP
-
-#include <boost/numeric/bindings/tag.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-
-template< typename Index, typename TransTag >
-struct index_trans {
- typedef Index type;
-};
-
-template<>
-struct index_trans< tag::index<1>, tag::transpose > {
- typedef tag::index<2> type;
-};
-
-template<>
-struct index_trans< tag::index<1>, tag::conjugate > {
- typedef tag::index<2> type;
-};
-
-template<>
-struct index_trans< tag::index<2>, tag::transpose > {
- typedef tag::index<1> type;
-};
-
-template<>
-struct index_trans< tag::index<2>, tag::conjugate > {
- typedef tag::index<1> type;
-};
-
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif

Modified: sandbox/numeric_bindings/boost/numeric/bindings/size.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/size.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/size.hpp 2010-01-23 02:52:03 EST (Sat, 23 Jan 2010)
@@ -12,9 +12,7 @@
 #include <boost/numeric/bindings/detail/generate_functions.hpp>
 #include <boost/numeric/bindings/detail/get.hpp>
 #include <boost/numeric/bindings/rank.hpp>
-#include <boost/numeric/bindings/index_major.hpp>
-#include <boost/numeric/bindings/index_minor.hpp>
-#include <boost/numeric/bindings/index_trans.hpp>
+#include <boost/numeric/bindings/index.hpp>
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/min.hpp>
 #include <boost/mpl/greater.hpp>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk