Boost logo

Boost Users :

From: speedsnaii (speedsnaii_at_[hidden])
Date: 2003-03-05 03:24:25


>
> Either use
>
> matrix_column<matrix<double> > v (m.column (2)); // proxy[1]
>
> or
>
> vector<double> v (m.column (2)); // copy
>

Thank you so much. That seems to be exactly what I was looking for.

BTW.: It seems that "matrix_column<matrix<T> > c "can be used as a
reference to any other 'vector-like' type, as the following also
works:

c = v; // v beeing a vector;
c = m.row(2);
c = m.col(0);

There is still an interesting point: While it is possible to assign a
row to the matrix_column it is not possible to supply a row in the
constructor call. What is the rationale behind this?

If the constructor also would accept a row I could use it as a
parameter type for function calls when I want to express, that
only 'data' types are expected and 'expressions' are not wanted.
(Sorry for the sloppy formulation, I am not sure how to express this
more concise.)

> > *) Second question:
...

> matrix_column<matrix<double> >::iterator it;

This is clear to me now. I've RTFM'd ;-) and found the example using
the free column() functions.

Roland


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net