Opened 13 years ago

Closed 10 years ago

#3449 closed Feature Requests (fixed)

introduce new free functions to access matrix/vector properties

Reported by: Gunter Owned by: Gunter
Milestone: Boost 1.41.0 Component: uBLAS
Version: Boost Release Branch Severity: Optimization
Keywords: Cc:

Description

introduce new functions to make the access to important matrix properties more user friendly. The required functions are:

for vector expression

size( v ); // the number of elements in the vector
size<1>( v ); // synonym of size( v )

for matrix expression

// rationale: this is the most common name in mathematics
num_rows( m );    // return number of rows
num_columns( m ); // return number of row
// rationale: size<i> gives the size of the i-th index of operator()
size<1>( m );     // synonym of num_rows( m )
size<2>( m );     // synonym of num_columns( m )

for matrix containers

size<tag::major>( m ); // return the number of elements in the outer loop
size<tag::minor>( m ); // return the number of elements in the inner loop

maybe for dense matrix proxies

// rationale: this is widely used by LAPACK and similar 
size<tag::leading>( m ); // return the leading dimension 

note: The leading dimension is the distance in memory between elements of two consecutive rows/columns which have the same colum/row index. This value must be extracted from the underlying matrix container.

Change History (12)

comment:1 by Gunter, 13 years ago

(In [56600]) see #3449: introduce new free functions to access matrix/vector properties (Incomplete)

  • move experimental traits of T[N] and T[M][N] to separate file

comment:2 by Gunter, 13 years ago

(In [56602]) see #3449: introduce new free functions to access matrix/vector properties (Incomplete)

  • added patch from Marco Guazzone implementing all requested new functions

comment:3 by Gunter, 13 years ago

Milestone: To Be DeterminedBoost 1.41.0
Status: newassigned

comment:4 by Gunter, 13 years ago

(In [56621]) see #3449: introduce new free functions to access matrix/vector properties (Incomplete)

  • added error message when BOOST_UBLAS_NO_NESTED_CLASS_RELATION is defined because the free funtions will not work here.

comment:5 by Gunter, 13 years ago

(In [56624]) see #3396 (view concepts), see #3449 (new free functions)

comment:6 by Gunter, 13 years ago

(In [56637]) see #3449: introduce new free functions to access matrix/vector properties

  • marked begin_end test as "expected fail" for msvc-7.1

comment:7 by Gunter, 13 years ago

(In [57205]) see #3449

  • merged [56637]: marked known failure of begin_end test for msvc 7.1

comment:8 by Gunter, 13 years ago

(In [57207]) see #3443:

comment:9 by Gunter, 13 years ago

(In [57209]) see #3449: introduce new free functions to access matrix/vector properties (Incomplete)

  • added short documentation to release_notes page

comment:10 by Gunter, 13 years ago

(In [57210]) see #3449:

comment:11 by Hannah Seymour, 11 years ago

Version: Boost 1.40.0Boost Release Branch

Any news about A defector's mystical disappearance?

comment:12 by Gunter, 10 years ago

Resolution: fixed
Status: assignedclosed

close this issue because it has been merged to release months ago, see http://svn.boost.org/svn/boost/branches/release/libs/numeric/ublas/test/size.cpp

Note: See TracTickets for help on using tickets.