std::transform container => std::abs(container)438 (12/5/2004 2:09:42 AM) comp.lang.c++ This code works for dividing each element of a boost::array inline boost::array& operator/=( boost::array& lhs, const T& rhs ) { std::transform( lhs.begin() , lhs.end() ... Steven
class types as proxies to an array418 (11/11/2004 6:13:02 PM) comp.lang.c++ I'm in a situation where I want to be sure all my data is organized in a specific pattern in memory. The array is vertex data which I want to represent as individual vectors per vertex, and per vertex type. T... Steven
Essential Mathematics for Games and Interactive Applications028 (11/11/2004 2:53:28 AM) comp.lang.c++ If you are into 3d programming, you may be interested in this book: _Essential Mathematics for Games and Interactive Applications_ http://tinyurl.com/4wrl6 I just bought it on a lark. After looking it over, I... Steven
Retaining a handle on a std::indirect_array<>227 (11/10/2004 8:31:26 AM) comp.lang.c++ I believe the answer is that the language doesn't support the ability to retain a reference to a std::indirect_array class IA{ indirect_array& ia_; public: IA(indirect_array& ia_):_ia(ia_){} } This co... Steven
using declarations and operator overloading?326 (11/10/2004 4:10:13 AM) comp.lang.c++ Suppose I overload an operator in namespace A. How can I introduce it into another namespace B? The following fails with the error shown subsequently: #include #include #include namespace A { namespace... Steven
Best way to boost::array<T,n> a,b; a += b;428 (11/10/2004 2:59:54 AM) comp.lang.c++ What's a good STL way of performing compound assignments using the elements of one STL-like collection as the rhs and the correspondingly indexed elements of another collection as the lhs? IOW: template boost... Steven
The real issue with accessors and mutators1031 (11/9/2004 9:38:23 PM) comp.lang.c++ The reason Stroustrup warns against using set and get functions is that an object of class type should be designed in such a way as to maintain some invariant. All operations on the class should be such that t... Steven
Accelerated C++: [1,rows] Not so fast2922 (11/8/2004 2:20:14 AM) comp.lang.c++ I've finally gotten around to reading Accelerated C++ by Andrew Koenig and Barbara Moo. There's a lot of good stuff in what I've read so far. Even though it is _very_ basic, they present some concepts I have ... Steven
Snipe hunting in C++2330 (11/5/2004 12:19:35 AM) comp.lang.c++ I just spent the better part of two hours trying to find a problem with my code. The error messages had virtually nothing to do with the actual problem. The problem, as it turned out, was a missing "}" to clo... Steven
MathCode C++146 (10/31/2004 1:27:45 PM) comp.lang.c++ I just started looking at this. I have yet to determine if it would be useful to me. http://www.mathcore.com/products/mathcode/index.shtml "The performance between the three forms of execution are compared ... Steven
Snipe hunting in C++2330 (11/5/2004 12:19:35 AM) comp.lang.c++ I just spent the better part of two hours trying to find a problem with my code. The error messages had virtually nothing to do with the actual problem. The problem, as it turned out, was a missing "}" to clo... susudata(549)
Accelerated C++: [1,rows] Not so fast2922 (11/8/2004 2:20:14 AM) comp.lang.c++ I've finally gotten around to reading Accelerated C++ by Andrew Koenig and Barbara Moo. There's a lot of good stuff in what I've read so far. Even though it is _very_ basic, they present some concepts I have ... susudata(549)
Design question: N-dimensional tensors727 (11/9/2004 3:07:57 PM) comp.lang.c++ I want to create a templated class (templated over the number of dimensions) of N-dimensional tensors. With N=1 you get a vector, N=2 you get an ordinary matrix, N=3 you get a 3D tensor, etc. Is there a goo... Martin
The real issue with accessors and mutators1031 (11/9/2004 9:38:23 PM) comp.lang.c++ The reason Stroustrup warns against using set and get functions is that an object of class type should be designed in such a way as to maintain some invariant. All operations on the class should be such that t... susudata(549)
Best way to boost::array<T,n> a,b; a += b;428 (11/10/2004 2:59:54 AM) comp.lang.c++ What's a good STL way of performing compound assignments using the elements of one STL-like collection as the rhs and the correspondingly indexed elements of another collection as the lhs? IOW: template boost... susudata(549)
using declarations and operator overloading?326 (11/10/2004 4:10:13 AM) comp.lang.c++ Suppose I overload an operator in namespace A. How can I introduce it into another namespace B? The following fails with the error shown subsequently: #include #include #include namespace A { namespace... susudata(549)
class types as proxies to an array418 (11/11/2004 6:13:02 PM) comp.lang.c++ I'm in a situation where I want to be sure all my data is organized in a specific pattern in memory. The array is vertex data which I want to represent as individual vectors per vertex, and per vertex type. T... susudata(549)
External linkage with anonymous namespaces428 (11/19/2004 11:22:44 PM) comp.lang.c++ I have read that anonymous namespaces are preferred in C++ over declaring global statics because the namespace can hide information from other translation units and at the same time provide external linkage all... tron.thomas(80)
Is there "reflect" solution in C++?416 (11/22/2004 2:01:21 AM) comp.lang.c++ I just swtiched my working language from java to C++. In java, there is one mechanism called reflect which enable us to have knowledge of internals of a given class at run-time. That's one basic mechanism use... mo.cheng2(25)