|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58655 - sandbox/numeric_bindings/boost/numeric/bindings/ublas
From: rutger_at_[hidden]
Date: 2010-01-03 06:30:35
Author: rutger
Date: 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
New Revision: 58655
URL: http://svn.boost.org/trac/boost/changeset/58655
Log:
misc. updates to the ublas bindings
Added:
sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp (contents, props changed)
sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp
- copied, changed from r58496, /sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_matrix.hpp
sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp
- copied, changed from r58510, /sandbox/numeric_bindings/boost/numeric/bindings/ublas/unbounded_array.hpp
sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp
- copied, changed from r58496, /sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_vector.hpp
Removed:
sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_matrix.hpp
sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_vector.hpp
sandbox/numeric_bindings/boost/numeric/bindings/ublas/unbounded_array.hpp
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp | 2 +-
sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp | 4 ++--
sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp | 4 ++--
sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp | 30 ++++++++++++++++++++++++++++++
sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp | 31 +++++++++++++++++++++++++++++++
sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp | 4 ++--
6 files changed, 68 insertions(+), 7 deletions(-)
Deleted: sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_matrix.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_matrix.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
+++ (empty file)
@@ -1,58 +0,0 @@
-//
-// Copyright (c) 2009 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_UBLAS_COMPRESSED_MATRIX_HPP
-#define BOOST_NUMERIC_BINDINGS_UBLAS_COMPRESSED_MATRIX_HPP
-
-#include <boost/numeric/bindings/begin.hpp>
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <boost/numeric/bindings/ublas/detail/convert_to.hpp>
-#include <boost/numeric/ublas/matrix_sparse.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, typename F, std::size_t IB, typename IA, typename TA, typename Id, typename Enable >
-struct adaptor< ublas::compressed_matrix< T, F, IB, IA, TA >, Id, Enable > {
-
- typedef typename convert_to< tag::data_order, F >::type data_order;
- typedef mpl::map<
- mpl::pair< tag::value_type, T >,
- mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
- mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
- mpl::pair< tag::data_structure, tag::yale_sparse >,
- mpl::pair< tag::data_order, data_order >
- > property_map;
-
- static std::ptrdiff_t size1( const Id& t ) {
- return t.size1();
- }
-
- static std::ptrdiff_t size2( const Id& t ) {
- return t.size2();
- }
-/*
- static void index_data( Id& t ) {
- return t.index_data()
- }*/
-
- static value_type* begin_value( Id& t ) {
- return bindings::begin_value( t.value_data() );
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif
Deleted: sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_vector.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_vector.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
+++ (empty file)
@@ -1,52 +0,0 @@
-//
-// Copyright (c) 2009 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_UBLAS_COMPRESSED_VECTOR_HPP
-#define BOOST_NUMERIC_BINDINGS_UBLAS_COMPRESSED_VECTOR_HPP
-
-#include <boost/numeric/bindings/begin.hpp>
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <boost/numeric/ublas/vector_sparse.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, std::size_t IB, typename IA, typename TA, typename Id, typename Enable >
-struct adaptor< ublas::compressed_vector< T, IB, IA, TA >, Id, Enable > {
-
- typedef typename copy_const< Id, T >::type value_type;
- typedef mpl::map<
- mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
- mpl::pair< tag::data_structure, tag::yale_sparse >
- > property_map;
-
- static std::ptrdiff_t size1( const Id& t ) {
- return t.size();
- }
-
-// static void index_data( Id& t ) {
-// // t.index_data();
-// }
-//
-
- static value_type* begin_value( Id& t ) {
- return bindings::begin_value( t.value_data() );
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif
Added: sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/hermitian.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2009 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_UBLAS_HERMITIAN_HPP
+#define BOOST_NUMERIC_BINDINGS_UBLAS_HERMITIAN_HPP
+
+#include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/detail/adaptor.hpp>
+#include <boost/numeric/bindings/end.hpp>
+#include <boost/numeric/bindings/ublas/detail/convert_to.hpp>
+#include <boost/numeric/bindings/value.hpp>
+#include <boost/numeric/ublas/hermitian.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace detail {
+
+template< typename T, typename F1, typename F2, typename A, typename Id, typename Enable >
+struct adaptor< ublas::hermitian_matrix< T, F1, F2, A >, Id, Enable > {
+
+ typedef typename copy_const< Id, T >::type value_type;
+ typedef mpl::map<
+ mpl::pair< tag::value_type, value_type >,
+ mpl::pair< tag::entity, tag::matrix >,
+ mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
+ mpl::pair< tag::size_type<2>, std::ptrdiff_t >,
+ mpl::pair< tag::matrix_type, tag::hermitian >,
+ mpl::pair< tag::data_structure, tag::triangular_array >,
+ mpl::pair< tag::data_side, typename convert_to< tag::data_side, F1 >::type >,
+ mpl::pair< tag::data_order, typename convert_to< tag::data_order, F2 >::type >
+ > property_map;
+
+ static std::ptrdiff_t size1( const Id& t ) {
+ return t.size1();
+ }
+
+ static std::ptrdiff_t size2( const Id& t ) {
+ return t.size2();
+ }
+
+ static value_type* begin_value( Id& t ) {
+ return bindings::begin_value( t.data() );
+ }
+
+ static value_type* end_value( Id& t ) {
+ return bindings::end_value( t.data() );
+ }
+
+};
+
+template< typename T, typename F, typename Id, typename Enable >
+struct adaptor< ublas::hermitian_adaptor< T, F >, Id, Enable > {
+
+ typedef typename value< T >::type value_type;
+ typedef typename property_insert< T,
+ mpl::pair< tag::matrix_type, tag::hermitian >,
+ mpl::pair< tag::data_side, typename convert_to< tag::data_side, F >::type >
+ >::type property_map;
+
+ static std::ptrdiff_t size1( const Id& t ) {
+ return t.size1();
+ }
+
+ static std::ptrdiff_t size2( const Id& t ) {
+ return t.size2();
+ }
+
+ static value_type* begin_value( Id& t ) {
+ return bindings::begin_value( t.data() );
+ }
+
+ static value_type* end_value( Id& t ) {
+ return bindings::end_value( t.data() );
+ }
+
+};
+
+} // namespace detail
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif
Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -13,7 +13,7 @@
#include <boost/numeric/bindings/detail/adaptor.hpp>
#include <boost/numeric/bindings/detail/if_row_major.hpp>
#include <boost/numeric/bindings/ublas/detail/convert_to.hpp>
-#include <boost/numeric/bindings/ublas/unbounded_array.hpp>
+#include <boost/numeric/bindings/ublas/storage.hpp>
#include <boost/numeric/ublas/matrix.hpp>
namespace boost {
Copied: sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp (from r58496, /sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_matrix.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_matrix.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/matrix_sparse.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -6,8 +6,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_COMPRESSED_MATRIX_HPP
-#define BOOST_NUMERIC_BINDINGS_UBLAS_COMPRESSED_MATRIX_HPP
+#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_MATRIX_SPARSE_HPP
+#define BOOST_NUMERIC_BINDINGS_UBLAS_MATRIX_SPARSE_HPP
#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/detail/adaptor.hpp>
Copied: sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp (from r58510, /sandbox/numeric_bindings/boost/numeric/bindings/ublas/unbounded_array.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/ublas/unbounded_array.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -6,8 +6,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_UNBOUNDED_ARRAY_HPP
-#define BOOST_NUMERIC_BINDINGS_UBLAS_UNBOUNDED_ARRAY_HPP
+#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_STORAGE_HPP
+#define BOOST_NUMERIC_BINDINGS_UBLAS_STORAGE_HPP
#include <boost/numeric/bindings/detail/adaptor.hpp>
#include <boost/numeric/ublas/storage.hpp>
Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/symmetric.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -9,8 +9,11 @@
#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_SYMMETRIC_HPP
#define BOOST_NUMERIC_BINDINGS_UBLAS_SYMMETRIC_HPP
+#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/detail/adaptor.hpp>
+#include <boost/numeric/bindings/end.hpp>
#include <boost/numeric/bindings/ublas/detail/convert_to.hpp>
+#include <boost/numeric/bindings/value.hpp>
#include <boost/numeric/ublas/symmetric.hpp>
namespace boost {
@@ -51,6 +54,33 @@
};
+template< typename T, typename F, typename Id, typename Enable >
+struct adaptor< ublas::symmetric_adaptor< T, F >, Id, Enable > {
+
+ typedef typename value< T >::type value_type;
+ typedef typename property_insert< T,
+ mpl::pair< tag::matrix_type, tag::symmetric >,
+ mpl::pair< tag::data_side, typename convert_to< tag::data_side, F >::type >
+ >::type property_map;
+
+ static std::ptrdiff_t size1( const Id& t ) {
+ return t.size1();
+ }
+
+ static std::ptrdiff_t size2( const Id& t ) {
+ return t.size2();
+ }
+
+ static value_type* begin_value( Id& t ) {
+ return bindings::begin_value( t.data() );
+ }
+
+ static value_type* end_value( Id& t ) {
+ return bindings::end_value( t.data() );
+ }
+
+};
+
} // namespace detail
} // namespace bindings
} // namespace numeric
Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/triangular.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -9,8 +9,11 @@
#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_TRIANGULAR_HPP
#define BOOST_NUMERIC_BINDINGS_UBLAS_TRIANGULAR_HPP
+#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/detail/adaptor.hpp>
+#include <boost/numeric/bindings/end.hpp>
#include <boost/numeric/bindings/ublas/detail/convert_to.hpp>
+#include <boost/numeric/bindings/value.hpp>
#include <boost/numeric/ublas/triangular.hpp>
namespace boost {
@@ -52,6 +55,34 @@
};
+
+template< typename T, typename F, typename Id, typename Enable >
+struct adaptor< ublas::triangular_adaptor< T, F >, Id, Enable > {
+
+ typedef typename value< T >::type value_type;
+ typedef typename property_insert< T,
+ mpl::pair< tag::matrix_type, tag::triangular >,
+ mpl::pair< tag::data_side, typename convert_to< tag::data_side, F >::type >
+ >::type property_map;
+
+ static std::ptrdiff_t size1( const Id& t ) {
+ return t.size1();
+ }
+
+ static std::ptrdiff_t size2( const Id& t ) {
+ return t.size2();
+ }
+
+ static value_type* begin_value( Id& t ) {
+ return bindings::begin_value( t.data() );
+ }
+
+ static value_type* end_value( Id& t ) {
+ return bindings::end_value( t.data() );
+ }
+
+};
+
} // detail
} // bindings
} // numeric
Deleted: sandbox/numeric_bindings/boost/numeric/bindings/ublas/unbounded_array.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/unbounded_array.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
+++ (empty file)
@@ -1,51 +0,0 @@
-//
-// Copyright (c) 2009 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_UBLAS_UNBOUNDED_ARRAY_HPP
-#define BOOST_NUMERIC_BINDINGS_UBLAS_UNBOUNDED_ARRAY_HPP
-
-#include <boost/numeric/bindings/detail/adaptor.hpp>
-#include <boost/numeric/ublas/storage.hpp>
-
-namespace boost {
-namespace numeric {
-namespace bindings {
-namespace detail {
-
-template< typename T, typename Alloc, typename Id, typename Enable >
-struct adaptor< ublas::unbounded_array< T, Alloc >, Id, Enable > {
-
- typedef typename copy_const< Id, T >::type value_type;
- typedef mpl::map<
- mpl::pair< tag::value_type, value_type >,
- mpl::pair< tag::entity, tag::vector >,
- mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
- mpl::pair< tag::data_structure, tag::linear_array >,
- mpl::pair< tag::stride_type<1>, tag::contiguous >
- > property_map;
-
- static std::ptrdiff_t size1( const Id& t ) {
- return t.size();
- }
-
- static value_type* begin_value( Id& t ) {
- return t.begin();
- }
-
- static value_type* end_value( Id& t ) {
- return t.end();
- }
-
-};
-
-} // namespace detail
-} // namespace bindings
-} // namespace numeric
-} // namespace boost
-
-#endif
Copied: sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp (from r58496, /sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_vector.hpp)
==============================================================================
--- /sandbox/numeric_bindings/boost/numeric/bindings/ublas/compressed_vector.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/vector_sparse.hpp 2010-01-03 06:30:34 EST (Sun, 03 Jan 2010)
@@ -6,8 +6,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_COMPRESSED_VECTOR_HPP
-#define BOOST_NUMERIC_BINDINGS_UBLAS_COMPRESSED_VECTOR_HPP
+#ifndef BOOST_NUMERIC_BINDINGS_UBLAS_VECTOR_SPARSE_HPP
+#define BOOST_NUMERIC_BINDINGS_UBLAS_VECTOR_SPARSE_HPP
#include <boost/numeric/bindings/begin.hpp>
#include <boost/numeric/bindings/detail/adaptor.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