problem in using sub_matrix

asharam chhinpa <[email protected]>
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
Dear Sir/Madam,
              I am using the following code to get
submatrix of a given matrix.


#include <iostream>
#include <mtl.h>
using namespace mtl;
typedef matrix< double,
                rectangle<>,
               array< dense<> >,
               row_major>::type mlp2d;
int main()
{
    mlp2d a(6,6);
    mlp2d b(2,2);
    double counter=0;
    int i,j;
    for(i=0;i<6;i++)
    {
        for(j=0;j<6;j++)
        {
            a(i,j)=counter;
            counter++;
        }
    }
    b=a.sub_matrix(0,2,0,2);
    print_all_matrix(a);
	print_all_matrix(b);
    return 0;
}


and every time I get following errors........


mtl/matrix_implementation.h: In method
`mtl::row_matrix<typename
TwoDGen::submatrix_type, typename typename
IndexerGen::bind<typename
typename typename
TwoDGen::submatrix_type::type::size_type>::other>
mtl::row_matrix<TwoDGen, IndexerGen>::sub_matrix
(typename
mtl::matrix_implementation<TwoDGen,
IndexerGen>::size_type, typename
mtl::matrix_implementation<TwoDGen,
IndexerGen>::size_type, typename
mtl::matrix_implementation<TwoDGen,
IndexerGen>::size_type, typename
mtl::matrix_implementation<TwoDGen,
IndexerGen>::size_type) const [with
TwoDGen = mtl::gen_array2D<mtl::dense1D<double, 0> >,
IndexerGen =
mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t>]':
test1.cpp:27:   instantiated from here
mtl/matrix_implementation.h:660: no type named
`is_strided' in `class
mtl::array2D<mtl::dense1D<double, 0> >'
mtl/matrix_implementation.h:661: no type named
`is_strided' in `class
mtl::array2D<mtl::dense1D<double, 0> >'
test1.cpp:27:   instantiated from here
mtl/matrix_implementation.h:664: no matching function
for call to
`mtl::array2D<mtl::dense1D<double, 0> >::ld () const'
test1.cpp:27:   instantiated from here
mtl/matrix_implementation.h:664: no matching function
for call to
`mtl::array2D<mtl::dense1D<double, 0> >::data ()
const'
mtl/matrix_implementation.h:664: no matching function
for call to
`mtl::array2D<mtl::dense1D<double, 0> >::ld () const'
test1.cpp:27:   instantiated from here
mtl/matrix_implementation.h:668: no matching function
for call to
`mtl::array2D<mtl::dense1D<double, 0> >::ld () const'
test1.cpp:27:   instantiated from here
mtl/matrix_implementation.h:668: no matching function
for call to
`mtl::array2D<mtl::dense1D<double, 0> >::data ()
const'
mtl/matrix_implementation.h:668: no matching function
for call to
`mtl::array2D<mtl::dense1D<double, 0> >::ld () const'


I am using g++ compiler in red hat linux.
Can you tell me what is wrong with it?
Thanking you in anticipation.
Best Regards,
Asharam Chhinpa.

=====
Asharam ChhinpaB-60, Aravali Hostel,IIT-Delhi.

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.