question about ublas
yanyaqin wrote:
1. In ublas::vector, there's 3 constructions:
|vector ()| Allocates an uninitialized |vector| that holds zero elements. |vector (size_type size)| Allocates an uninitialized |vector| that holds |size| elements. |vector (const vector &v)|
but how can i construct a vector with the default value like std::vector( n, value )
You can't AFAICT. What you can do is ublas::vector< double > v(10) ; std::fill( v.begin(), v.end(), value ) ;
2. How to make ublas more efficiency?
I tried to comment some mac define of check in ublas/config.hpp, and found it make some sense.
I wonder if some one has more experience to share.
Most important is that you define NDEBUG to avoid all assertions. I suggest to use the ublas-dev mailing list in the future (I will CC: that list for now)
participants (2)
-
Toon Knapen
-
yanyaqin