Re: diagonal matrix

Janusz opechowski <[email protected]> Wed, 9 Jun 2004 05:22:39 +0100 (BST)
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
Hello!

How about :

// make it templated if wish so...
struct DDMATRIXConstructor
{

typedef matrix<double,  diagonal<>, dense<>,
 row_major>::type DDMATRIX;

DDMATRIX operator()(int rows,int cols){
return DDMATRIX(rows,cols,0,0);
}

};




DDMATRIXConstructor::DDMATRIX Matrix=
DDMATRIXConstructor(rows, cols);

// polish up detalils if needed


cheers
Janusz




 --- "Yasser H. Abdel-Haleem" <[email protected]>
wrote: > Hi,
>  
> I have a question, I am not able to a construct
> diagonal matrix without
> passing four parameters to the matrix
>  
> typedef matrix<double,  diagonal<>, dense<>,
> row_major>::type
> DDMATRIX;
>  
> DDMATRIX Matrix= DDMATRIX(rows, cols,0,0);
>  
> If I do not add the last two parameters the compiler
> VC++ 6 does not
> compile. I just like to use the first two parameters
> to keep the code
> consistent if possible, any suggestions?
>  
>  
> Yasser
>  
> > _______________________________________________
> This list is archived at
http://www.osl.iu.edu/MailArchives/mtl-devel/ 

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/