2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-20 15:12:16 +00:00

Minor bugfixes.

[SVN r15445]
This commit is contained in:
Jörg Walter
2002-09-19 07:36:07 +00:00
parent f6a7bb8023
commit 9407675e2f
4 changed files with 27 additions and 13 deletions

View File

@@ -232,21 +232,21 @@ Here's how: </p>
<pre> cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost login
(password is empty)
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost checkout -r matrix_development boost/boost/numeric/ublas
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost checkout -r matrix_development boost/libs/numeric/ublas</pre>
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost checkout boost/boost/numeric/ublas
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost checkout boost/libs/numeric/ublas</pre>
<p>If you have gzip installed on your system, you can speed up
the transfer using</p>
<pre> cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost -z9 checkout -r matrix_development boost/boost/numeric/ublas
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost -z9 checkout -r matrix_development boost/libs/numeric/ublas</pre>
<pre> cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost -z9 checkout boost/boost/numeric/ublas
cvs -d:pserver:anonymous@cvs.boost.sourceforge.net:/cvsroot/boost -z9 checkout boost/libs/numeric/ublas</pre>
<p>You can also <a
href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost">view</a>
the CVS archive. You may find the library <a
href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/boost/numeric/ublas/?only_with_tag=matrix_development">here</a>.
href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/boost/numeric/ublas/">here</a>.
Documentation and test programs reside <a
href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/libs/numeric/ublas/?only_with_tag=matrix_development">here</a>.</p>
href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/libs/numeric/ublas/">here</a>.</p>
<h2>Mailing lists</h2>

View File

@@ -164,8 +164,6 @@
#define BOOST_UBLAS_ENABLE_SPECIALIZED_ASSIGN
#define BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS
#endif

View File

@@ -156,7 +156,7 @@ namespace boost { namespace numeric { namespace ublas {
// public std::exception {
public std::domain_error {
BOOST_UBLAS_EXPLICIT
non_real (const std::string &s = "exception: non real"):
non_real (const std::string &s = "exception: non real"):
std::domain_error (s) {}
// virtual const char *what () const throw () {
// return "exception: non real";
@@ -184,6 +184,9 @@ namespace boost { namespace numeric { namespace ublas {
// if (! expression)
// e.raise ();
// }
// Dan Muller reported problems with COMO in GUI applications
// So we need a new preprocessor symbol:
#ifndef BOOST_UBLAS_NO_STD_CERR
#define BOOST_UBLAS_CHECK(expression, e) \
if (! (expression)) { \
std::cerr << "Assertion failed in file " << __FILE__ << " at line " << __LINE__ << ":" << std::endl; \
@@ -197,6 +200,16 @@ namespace boost { namespace numeric { namespace ublas {
e.raise (); \
}
#else
#define BOOST_UBLAS_CHECK(expression, e) \
if (! (expression)) { \
e.raise (); \
}
#define BOOST_UBLAS_CHECK_EX(expression, file, line, e) \
if (! (expression)) { \
e.raise (); \
}
#endif
#else
// FIXME: for performance reasons we better use macros
// template<class E>
// BOOST_UBLAS_INLINE

View File

@@ -44,7 +44,10 @@ namespace boost { namespace numeric { namespace ublas {
// #define BOOST_UBLAS_SAME(size1, size2) same_impl ((size1), (size2))
template<class T>
BOOST_UBLAS_INLINE
const T &same_impl_ex (const T &size1, const T &size2, const char *file, int line) {
// Kresimir Fresl and Dan Muller reported problems with COMO.
// We better change the signature instead of libcomo ;-)
// const T &same_impl_ex (const T &size1, const T &size2, const char *file, int line) {
T same_impl_ex (const T &size1, const T &size2, const char *file, int line) {
BOOST_UBLAS_CHECK_EX (size1 == size2, file, line, bad_argument ());
return std::min (size1, size2);
}
@@ -58,12 +61,12 @@ namespace boost { namespace numeric { namespace ublas {
// }
// #define BOOST_UBLAS_SAME(size1, size2) same_impl ((size1), (size2))
#define BOOST_UBLAS_SAME(size1, size2) (size1)
#endif
#endif
// Unbounded array
// Unbounded array
template<class T>
class unbounded_array {
public:
public:
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T value_type;