Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-02-20 05:14:09


On Friday 17 February 2006 10:56, Dalton, Barnaby wrote:
> How do I insert or remove rows from a ublas matrix? I have looked
> through the docs but haven't found anything. Please feel free to point
> me to the relevant URL if this is already documented somewhere.

ublas containers are designed to have a static size. Inserting a new row can
only be implemented as creating a new larger matrix an copying the data. If
you frequently need to insert/remove whole columns the std::list type may fit
much better.

It is possible to resize all ublas data types, but usually you either lose all
data or the old data is copied once.

mfg
Gunter