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
or
boost::numeric::ublas::matrix_scalar<double>
I wish to generate a ray transfer matrix class by overloading (say)
matrix_array and adding member functions such as:
class rtm : boost::multi_array {
public:
void setA(double val) {
boost::multi_array::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