A line segment templated on the dimension.
Like the underlying algebra::VectorD data, is not initialized when the default constructor is used. Since it is a small class, it is designed to be allocated on the stack and to be passed by value (or const &).
The class should be named SegmentD, but it is an demostration.
The following command indicates to doxygen to mark the class as being one whose members are left uninitialized by the default constructor:
The source code is as follows: \include ExampleTemplateClass.h
Public Member Functions | |
| ExampleTemplateClassD (const IMP::algebra::VectorD< D > &a, const IMP::algebra::VectorD< D > &b) | |
| const IMP::algebra::VectorD< D > & | get_point (unsigned int i) const |
| Get one of the endpoints. | |
| void | show (std::ostream &out=std::cout) const |
| IMP::example::ExampleTemplateClassD< D >::ExampleTemplateClassD | ( | const IMP::algebra::VectorD< D > & | a, |
| const IMP::algebra::VectorD< D > & | b | ||
| ) |
Since it is a simple object, there is no reason to provide methods to change the data.
| const IMP::algebra::VectorD<D>& IMP::example::ExampleTemplateClassD< D >::get_point | ( | unsigned int | i | ) | const |
Get one of the endpoints.