Thank you very much for your advice, Tim. Best Regards, Yujie
On Mon, Jun 14, 2010 at 3:27 AM, Tim Kroeger <[email protected]> wrote: > On Fri, 11 Jun 2010, Roy Stogner wrote: > >> On Fri, 11 Jun 2010, Yujie wrote: >> >>> However, from DenseSubMatrix class, I must initialize subA1[i], >>> subA2[i] using A(i). Before that, I want to "new" subA1 and subA2 >>> array with N dimension. It looks there is not corresponding >>> constructor function for it to my understanding. Therefore, I can't do >>> it. >> >> There's no default constructor for DenseSubMatrix; it expects to be >> constructed with a DenseMatrix target. If you want a vector of >> submatrices, store it as a vector of pointers or of smart pointers. > > Another way might be to create an empty vector of DenseSubMatrix and then to > construct the members you need successively and push_back() them to the > vector. As far as I know, this requires DenseSubMatrix to have a copy > constructor and an assignment operator. I don't know whether it has these, > but I currently don't see any reason why it shouldn't. > > Best Regards, > > Tim > > -- > Dr. Tim Kroeger > [email protected] Phone +49-421-218-7710 > [email protected] Fax +49-421-218-4236 > www.mevis.fraunhofer.de/~tim > > Fraunhofer MEVIS, Institute for Medical Image Computing > Universitaetsallee 29, 28359 Bremen, Germany > > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
