Boost logo

Ublas :

Subject: Re: [ublas] returning a ublas matrix from a function
From: sanann (padalasaisandeep_at_[hidden])
Date: 2014-08-13 06:53:09


Thank you for your reply it has helped me a lot. But further down the line i
have encountered another problem. may be it is a small one or may be it is
me who is understanding it wrong.
the situation i now face is

"boost::array<BMT,8> z;
    width = 3;
    height = 3;
    z=filter(width,height);
   
    w = w2(width,height,z);"

So basically what i have is a boost::array z which contains 8 different
arrays now I want to send these eight arrays to another function which would
use these arrays to perform more manipulations.

What would be the most ideal way to do this i went through pointers but i
think i am making a mistake somewhere .

#ifndef W_H
#define W_H

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/vector.hpp>

typedef boost::numeric::ublas::matrix<double> w;

boost::array<w,8> w2(int width, int height,int z);

#endif // W_H

i used this method to define my new fucntion w. The error i end up with is
that w2 is not defined for this scope. is there any way out of this ?

--
View this message in context: http://boost.2283326.n4.nabble.com/returning-a-ublas-matrix-from-a-function-tp4666050p4666299.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.