|
Boost Users : |
From: Edward Grace (ej.grace_at_[hidden])
Date: 2005-09-12 06:59:47
Dear all,
I am evaluating aspects of the boost library. I wish to generate a simple
implementation of ray transfer (ABCD) matricies,
http://en.wikipedia.org/wiki/ABCD_matrix
Since these matricies are 2x2 and will need multiplication, trace and other
similar matrix like operations it makes sense to use:
matrix_array<double,2>
or
boost::numeric::ublas::matrix_scalar<double>
I wish to generate a ray transfer matrix class by overloading (say)
matrix_array<double,2> and adding member functions such as:
class rtm : boost::multi_array<double,2> {
public:
void setA(double val) {
boost::multi_array<double,2>::operator()(0,0) = val;
}
};
Now, this is wrong... Essentially I just want to know something very
simple....
When I inherit multi_array or any other class that I want to use the [] or
(x,x) notation to access elements (subscript operators) how on earth do I do
it?
Your help will be greatly appreciated, this is driving me crazy!
-ed
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