Text archives Help
- From: thiago@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1828 - trunk/Core/Geometry
- Date: Tue, 6 Nov 2007 16:56:37 -0700 (MST)
Author: thiago
Date: Tue Nov 6 16:56:37 2007
New Revision: 1828
Modified:
trunk/Core/Geometry/VectorT.cc
trunk/Core/Geometry/VectorT.h
Log:
Geometry/VectorT.cc:
-added support for outputing 3 element long double VectorTs.
Geometry/VectorT.h:
-added != operator like in Vector.h.
Modified: trunk/Core/Geometry/VectorT.cc
==============================================================================
--- trunk/Core/Geometry/VectorT.cc (original)
+++ trunk/Core/Geometry/VectorT.cc Tue Nov 6 16:56:37 2007
@@ -51,6 +51,7 @@
// Explicit instantiations for ostream operators
// 3D Vectors
+ template std::ostream& operator<<(std::ostream& os, const VectorT<long
double, 3>&);
template std::ostream& operator<<(std::ostream& os, const VectorT<double,
3>&);
template std::ostream& operator<<(std::ostream& os, const VectorT<float,
3>&);
template std::ostream& operator<<(std::ostream& os, const VectorT<int,
3>&);
Modified: trunk/Core/Geometry/VectorT.h
==============================================================================
--- trunk/Core/Geometry/VectorT.h (original)
+++ trunk/Core/Geometry/VectorT.h Tue Nov 6 16:56:37 2007
@@ -297,6 +297,13 @@
return true;
}
+ bool operator!=(const VectorT<T, Dim>& right) const {
+ for (int i = 0; i < Dim; ++i)
+ if(data[i] != right.data[i])
+ return true;
+ return false;
+ }
+
T length() const {
T sum = 0;
for(int i=0;i<Dim;i++)
- [Manta] r1828 - trunk/Core/Geometry, thiago, 11/06/2007
Archive powered by MHonArc 2.6.16.