2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-21 03:22:14 +00:00

Minor changes in doxygen doc

This commit is contained in:
nasos
2014-04-12 10:34:28 -04:00
parent 89287b13b2
commit 6ae25cfc67
3 changed files with 75 additions and 93 deletions

View File

@@ -1098,17 +1098,17 @@ namespace boost { namespace numeric {
#ifdef BOOST_UBLAS_CPP11
/** \brief A fixed size dense matrix of values of type \c T. Equivalent to a c-style 2 dimensional array.
*
* For a \f$(m \times n)\f$-dimensional matrix and \f$ 0 \leq i < m, 0 \leq j < n\f$, every element \f$ m_{i,j} \f$ is mapped to
* For a \f$(m \times n)\f$-dimensional fixed_matrix and \f$ 0 \leq i < m, 0 \leq j < n\f$, every element \f$ m_{i,j} \f$ is mapped to
* the \f$(i.n + j)\f$-th element of the container for row major orientation or the \f$ (i + j.m) \f$-th element of
* the container for column major orientation. In a dense matrix all elements are represented in memory in a
* contiguous chunk of memory by definition.
*
* Orientation and storage can also be specified, otherwise a \c row_major and \c std::array are used. It is \b not
* required by the storage to initialize elements of the matrix.
* Orientation and storage can also be specified, otherwise \c row_major and \c std::array are used. It is \b not
* required by the storage container to initialize elements of the matrix.
*
* \tparam T the type of object stored in the matrix (like double, float, complex, etc...)
* \tparam T the type of object stored in the matrix (like double, float, std::complex<double>, etc...)
* \tparam L the storage organization. It can be either \c row_major or \c column_major. Default is \c row_major
* \tparam A the type of Storage array. Default is \c std::array
* \tparam A the type of Storage array. Default is \c std::array<T, M*N>
*/
template<class T, std::size_t M, std::size_t N, class L, class A>
class fixed_matrix:
@@ -1139,23 +1139,21 @@ namespace boost { namespace numeric {
// Construction and destruction
/// Default dense fixed_matrix constructor. Make a dense fixed_matrix of size (N,M)
/// Default dense fixed_matrix constructor. Make a dense fixed_matrix of size M x N
BOOST_UBLAS_INLINE
fixed_matrix ():
matrix_container<self_type> (),
data_ () {}
/// \brief Construct a fixed_matrix from a list of values
/// The list should be included in curly braces. Typical syntax is:
/// The list may be included in curly braces. Typical syntax is choices are :
/// fixed_matrix<double, 2,2> v = { 1, 2, 3, 4 } or fixed_matrix<double,4> v( {1, 2, 3, 4} ) or fixed_matrix<double,2,2> v( 1, 2, 3, 4 )
template <typename... Types>
fixed_matrix(value_type v0, Types... vrest) :
matrix_container<self_type> (),
data_{ { v0, vrest... } } {}
/** Dense matrix constructor with defined size a initial value for all the matrix elements
* \param size1 number of rows
* \param size2 number of columns
/** Dense fixed_matrix constructor with defined initial value for all the matrix elements
* \param init initial value assigned to all elements
*/
fixed_matrix (const value_type &init):
@@ -1164,9 +1162,7 @@ namespace boost { namespace numeric {
data_.fill(init);
}
/** Dense matrix constructor with defined size and an initial data array
* \param size1 number of rows
* \param size2 number of columns
/** Dense matrix constructor with defined initial data array
* \param data array to copy into the matrix. Must have the same dimension as the matrix
*/
BOOST_UBLAS_INLINE
@@ -1195,7 +1191,7 @@ namespace boost { namespace numeric {
// Accessors
/** Return the number of rows of the fixed_matrix
* You can also use the free size<>() function in operation/size.hpp as size<1>(m) where m is a matrix
* You can also use the free size<>() function in operation/size.hpp as size<1>(m) where m is a fixed_matrix
*/
BOOST_UBLAS_INLINE
constexpr size_type size1 () const {
@@ -1203,7 +1199,7 @@ namespace boost { namespace numeric {
}
/** Return the number of colums of the fixed_matrix
* You can also use the free size<>() function in operation/size.hpp as size<2>(m) where m is a matrix
* You can also use the free size<>() function in operation/size.hpp as size<2>(m) where m is a fixed_matrix
*/
BOOST_UBLAS_INLINE
constexpr size_type size2 () const {
@@ -1218,8 +1214,8 @@ namespace boost { namespace numeric {
const array_type &data () const {
return data_;
}
/** Return a reference to the internal storage of a dense matrix, i.e. the raw data
* It's type depends on the type used by the matrix to store its data
/** Return a reference to the internal storage of a dense fixed_matrix, i.e. the raw data
* It's type depends on the type used by the fixed_matrix to store its data
*/
BOOST_UBLAS_INLINE
array_type &data () {
@@ -1236,7 +1232,7 @@ namespace boost { namespace numeric {
*/
BOOST_UBLAS_INLINE
const_reference operator () (size_type i, size_type j) const {
return data () [layout_type::element (i, M, j, N)];
return data () [layout_type::element (i, M, j, N)]; // Fixme: add static lookup for element(...) i.e.: element<M, N>(i,j)
}
/** Access a fixed_matrix element. Here we return a reference
@@ -1249,7 +1245,7 @@ namespace boost { namespace numeric {
return data () [layout_type::element (i, M, j, N)];
}
/** Access a matrix element. Here we return a reference
/** Access a fixed_matrix element. Here we return a reference
* \param i the first coordinate of the element. By default it's the row
* \param j the second coordinate of the element. By default it's the column
* \return a reference to the element
@@ -1261,7 +1257,7 @@ namespace boost { namespace numeric {
// Element assignment
/** Change the value of a matrix element. Return back a reference to it
/** Change the value of a fixed_matrix element. Return back a reference to it
* \param i the first coordinate of the element. By default it's the row
* \param j the second coordinate of the element. By default it's the column
* \param t the new value of the element
@@ -1284,7 +1280,7 @@ namespace boost { namespace numeric {
}
// Zeroing
/** Erase all elements in the matrix
/** Erase all elements in the fixed_matrix
* For most types (int, double, etc...) it means writing 0 (zero) everywhere.
* For user-defined types, it could be another value if you decided it. Your type in that case must
* contain a default null value.

View File

@@ -37,33 +37,19 @@ namespace {
// we'll find either std::sqrt or else another version via ADL:
return sqrt (t);
}
// template<class T> T boost_numeric_ublas_abs (const T& t) {
// using namespace std;
// we'll find either std::abs or else another version via ADL:
// return abs (t);
// }
template<typename T>
typename boost::disable_if<
inline typename boost::disable_if<
boost::is_unsigned<T>, T >::type
inline boost_numeric_ublas_abs (const T &t ) {
using namespace std;
boost_numeric_ublas_abs (const T &t ) {
using namespace std;
return abs( t );
}
// unsigned types are always non-negative
//template<> inline unsigned int boost_numeric_ublas_abs (const unsigned int& t) {
// return t;
//}
// unsigned types are always non-negative
//template<> inline unsigned long boost_numeric_ublas_abs (const unsigned long& t) {
// return t;
//}
template<typename T>
typename boost::enable_if<
inline typename boost::enable_if<
boost::is_unsigned<T>, T >::type
inline boost_numeric_ublas_abs (const T &t ) {
boost_numeric_ublas_abs (const T &t ) {
return t;
}
}

View File

@@ -840,14 +840,14 @@ namespace boost { namespace numeric { namespace ublas {
data_ () {}
/// \brief Constructor of a fixed_vector by copying from another container
/// This type has the generic name \c array_typ within the vector definition.
/// This type uses the generic name \c array_type within the vector definition.
/// \param data container of type \c A
BOOST_UBLAS_INLINE
fixed_vector (const array_type &data):
vector_container<self_type> (),
data_ (data) {}
/// \brief Constructor of a fixed_vector with a predefined size and a unique initial value
/// \brief Constructor of a fixed_vector with a unique initial value
/// \param init value to assign to each element of the vector
BOOST_UBLAS_INLINE
fixed_vector (const value_type &init):
@@ -865,7 +865,7 @@ namespace boost { namespace numeric { namespace ublas {
/// \brief Copy-constructor of a vector from a vector_expression
/// Depending on the vector_expression, this constructor can have the cost of the computations
/// of the expression (trivial to say it, but it is to take into account in your complexity calculations).
/// of the expression (trivial to say it, but take it must be taken into account in your complexity calculations).
/// \param ae the vector_expression which values will be duplicated into the vector
template<class AE>
BOOST_UBLAS_INLINE
@@ -876,7 +876,7 @@ namespace boost { namespace numeric { namespace ublas {
}
/// \brief Construct a fixed_vector from a list of values
/// The list should be included in curly braces. Typical syntax is:
/// This constructor enables initialization by using any of:
/// fixed_vector<double, 3> v = { 1, 2, 3 } or fixed_vector<double,3> v( {1, 2, 3} ) or fixed_vector<double,3> v( 1, 2, 3 )
template <typename... Types>
fixed_vector(value_type v0, Types... vrest) :
@@ -1031,9 +1031,9 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
#else
/// \brief Assign a full vector (\e RHS-vector) to the current vector (\e LHS-vector)
/// \param v is the source vector
/// \return a reference to a vector (i.e. the destination vector)
/// \brief Assign a full fixed_vector (\e RHS-vector) to the current fixed_vector (\e LHS-vector)
/// \param v is the source fixed_vector
/// \return a reference to a fixed_vector (i.e. the destination vector)
BOOST_UBLAS_INLINE
fixed_vector &operator = (const fixed_vector &v) {
data () = v.data ();
@@ -1041,7 +1041,7 @@ namespace boost { namespace numeric { namespace ublas {
}
#endif
/// \brief Assign a full fixed_vector (\e RHS-vector) to the current fixed_vector (\e LHS-vector)
/// \brief Assign a full vector (\e RHS-vector) to the current fixed_vector (\e LHS-vector)
/// Assign a full vector (\e RHS-vector) to the current fixed_vector (\e LHS-vector). This method does not create any temporary.
/// \param v is the source vector container
/// \return a reference to a vector (i.e. the destination vector)
@@ -1052,20 +1052,20 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
/// \brief Assign a full vector (\e RHS-vector) to the current vector (\e LHS-vector)
/// \param v is the source vector
/// \return a reference to a vector (i.e. the destination vector)
/// \brief Assign a full fixed_vector (\e RHS-vector) to the current fixed_vector (\e LHS-vector)
/// \param v is the source fixed_vector
/// \return a reference to a fixed_vector (i.e. the destination fixed_vector)
BOOST_UBLAS_INLINE
fixed_vector &assign_temporary (fixed_vector &v) {
swap ( v );
return *this;
}
/// \brief Assign the result of a vector_expression to the vector
/// \brief Assign the result of a vector_expression to the fixed_vector
/// Assign the result of a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
/// \return a reference to the resulting vector
/// \return a reference to the resulting fixed_vector
template<class AE>
BOOST_UBLAS_INLINE
fixed_vector &operator = (const vector_expression<AE> &ae) {
@@ -1073,11 +1073,11 @@ namespace boost { namespace numeric { namespace ublas {
return assign_temporary (temporary);
}
/// \brief Assign the result of a vector_expression to the vector
/// \brief Assign the result of a vector_expression to the fixed_vector
/// Assign the result of a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
/// \return a reference to the resulting vector
/// \return a reference to the resulting fixed_vector
template<class AE>
BOOST_UBLAS_INLINE
fixed_vector &assign (const vector_expression<AE> &ae) {
@@ -1089,12 +1089,12 @@ namespace boost { namespace numeric { namespace ublas {
// Computed assignment
// -------------------
/// \brief Assign the sum of the vector and a vector_expression to the vector
/// Assign the sum of the vector and a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// \brief Assign the sum of the fixed_vector and a vector_expression to the fixed_vector
/// Assign the sum of the fixed_vector and a vector_expression to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// A temporary is created for the computations.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
/// \return a reference to the resulting vector
/// \return a reference to the resulting fixed_vector
template<class AE>
BOOST_UBLAS_INLINE
fixed_vector &operator += (const vector_expression<AE> &ae) {
@@ -1102,8 +1102,8 @@ namespace boost { namespace numeric { namespace ublas {
return assign_temporary (temporary);
}
/// \brief Assign the sum of the vector and a vector_expression to the vector
/// Assign the sum of the vector and a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// \brief Assign the sum of the fixed_vector and a vector_expression to the fixed_vector
/// Assign the sum of the fixed_vector and a vector_expression to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting vector.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
@@ -1115,9 +1115,9 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
/// \brief Assign the sum of the vector and a vector_expression to the vector
/// Assign the sum of the vector and a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting vector.
/// \brief Assign the sum of the fixed_vector and a vector_expression to the fixed_vector
/// Assign the sum of the fixed_vector and a vector_expression to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting fixed_vector.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
/// \return a reference to the resulting vector
@@ -1128,8 +1128,8 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
/// \brief Assign the difference of the vector and a vector_expression to the vector
/// Assign the difference of the vector and a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// \brief Assign the difference of the fixed_vector and a vector_expression to the fixed_vector
/// Assign the difference of the fixed_vector and a vector_expression to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// A temporary is created for the computations.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
@@ -1140,9 +1140,9 @@ namespace boost { namespace numeric { namespace ublas {
return assign_temporary (temporary);
}
/// \brief Assign the difference of the vector and a vector_expression to the vector
/// Assign the difference of the vector and a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting vector.
/// \brief Assign the difference of the fixed_vector and a vector_expression to the fixed_vector
/// Assign the difference of the fixed_vector and a vector_expression to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting fixed_vector.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
/// \return a reference to the resulting vector
@@ -1153,12 +1153,12 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
/// \brief Assign the difference of the vector and a vector_expression to the vector
/// Assign the difference of the vector and a vector_expression to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting vector.
/// \brief Assign the difference of the fixed_vector and a vector_expression to the fixed_vector
/// Assign the difference of the fixed_vector and a vector_expression to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting fixed_vector.
/// \tparam AE is the type of the vector_expression
/// \param ae is a const reference to the vector_expression
/// \return a reference to the resulting vector
/// \return a reference to the resulting fixed_vector
template<class AE>
BOOST_UBLAS_INLINE
fixed_vector &minus_assign (const vector_expression<AE> &ae) {
@@ -1166,12 +1166,12 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
/// \brief Assign the product of the vector and a scalar to the vector
/// Assign the product of the vector and a scalar to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting vector.
/// \brief Assign the product of the fixed_vector and a scalar to the fixed_vector
/// Assign the product of the fixed_vector and a scalar to the fixed_vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting fixed_vector.
/// \tparam AE is the type of the vector_expression
/// \param at is a const reference to the scalar
/// \return a reference to the resulting vector
/// \return a reference to the resulting fixed_vector
template<class AT>
BOOST_UBLAS_INLINE
fixed_vector &operator *= (const AT &at) {
@@ -1179,12 +1179,12 @@ namespace boost { namespace numeric { namespace ublas {
return *this;
}
/// \brief Assign the division of the vector by a scalar to the vector
/// Assign the division of the vector by a scalar to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// \brief Assign the division of the fixed_vector by a scalar to the fixed_vector
/// Assign the division of the fixed_vector by a scalar to the vector. This is lazy-compiled and will be optimized out by the compiler on any type of expression.
/// No temporary is created. Computations are done and stored directly into the resulting vector.
/// \tparam AE is the type of the vector_expression
/// \param at is a const reference to the scalar
/// \return a reference to the resulting vector
/// \return a reference to the resulting fixed_vector
template<class AT>
BOOST_UBLAS_INLINE
fixed_vector &operator /= (const AT &at) {
@@ -1196,8 +1196,8 @@ namespace boost { namespace numeric { namespace ublas {
// Swapping
// --------
/// \brief Swap the content of the vector with another vector
/// \param v is the vector to be swapped with
/// \brief Swap the content of the fixed_vector with another vector
/// \param v is the fixed_vector to be swapped with
BOOST_UBLAS_INLINE
void swap (fixed_vector &v) {
if (this != &v) {
@@ -1205,9 +1205,9 @@ namespace boost { namespace numeric { namespace ublas {
}
}
/// \brief Swap the content of two vectors
/// \param v1 is the first vector. It takes values from v2
/// \param v2 is the second vector It takes values from v1
/// \brief Swap the content of two fixed_vectors
/// \param v1 is the first fixed_vector. It takes values from v2
/// \param v2 is the second fixed_vector It takes values from v1
BOOST_UBLAS_INLINE
friend void swap (fixed_vector &v1, fixed_vector &v2) {
v1.swap (v2);
@@ -1383,13 +1383,13 @@ namespace boost { namespace numeric { namespace ublas {
};
#endif
/// \brief return an iterator on the first element of the vector
/// \brief return an iterator on the first element of the fixed_vector
BOOST_UBLAS_INLINE
const_iterator begin () const {
return find (0);
}
/// \brief return an iterator after the last element of the vector
/// \brief return an iterator after the last element of the fixed_vector
BOOST_UBLAS_INLINE
const_iterator end () const {
return find (data_.size ());
@@ -1487,13 +1487,13 @@ namespace boost { namespace numeric { namespace ublas {
};
#endif
/// \brief Return an iterator on the first element of the vector
/// \brief Return an iterator on the first element of the fixed_vector
BOOST_UBLAS_INLINE
iterator begin () {
return find (0);
}
/// \brief Return an iterator at the end of the vector
/// \brief Return an iterator at the end of the fixed_vector
BOOST_UBLAS_INLINE
iterator end () {
return find (data_.size ());
@@ -1503,25 +1503,25 @@ namespace boost { namespace numeric { namespace ublas {
typedef reverse_iterator_base<const_iterator> const_reverse_iterator;
typedef reverse_iterator_base<iterator> reverse_iterator;
/// \brief Return a const reverse iterator before the first element of the reversed vector (i.e. end() of normal vector)
/// \brief Return a const reverse iterator before the first element of the reversed fixed_vector (i.e. end() of normal fixed_vector)
BOOST_UBLAS_INLINE
const_reverse_iterator rbegin () const {
return const_reverse_iterator (end ());
}
/// \brief Return a const reverse iterator on the end of the reverse vector (i.e. first element of the normal vector)
/// \brief Return a const reverse iterator on the end of the reverse fixed_vector (i.e. first element of the normal fixed_vector)
BOOST_UBLAS_INLINE
const_reverse_iterator rend () const {
return const_reverse_iterator (begin ());
}
/// \brief Return a const reverse iterator before the first element of the reversed vector (i.e. end() of normal vector)
/// \brief Return a const reverse iterator before the first element of the reversed fixed_vector (i.e. end() of normal fixed_vector)
BOOST_UBLAS_INLINE
reverse_iterator rbegin () {
return reverse_iterator (end ());
}
/// \brief Return a const reverse iterator on the end of the reverse vector (i.e. first element of the normal vector)
/// \brief Return a const reverse iterator on the end of the reverse fixed_vector (i.e. first element of the normal fixed_vector)
BOOST_UBLAS_INLINE
reverse_iterator rend () {
return reverse_iterator (begin ());
@@ -1531,7 +1531,7 @@ namespace boost { namespace numeric { namespace ublas {
// Serialization
// -------------
/// Serialize a vector into and archive as defined in Boost
/// Serialize a fixed_vector into and archive as defined in Boost
/// \param ar Archive object. Can be a flat file, an XML file or any other stream
/// \param file_version Optional file version (not yet used)
template<class Archive>