Add .perpendicular() function in Geometry module (adapted from Eigen1)

Documentation:
 * add an overview for each module.
 * add an example for .all() and Cwise::operator<
This commit is contained in:
Gael Guennebaud
2008-07-22 10:54:42 +00:00
parent 516db2c3b9
commit 172000aaeb
22 changed files with 189 additions and 36 deletions

View File

@@ -45,6 +45,8 @@ template<typename Scalar, bool PacketAccess = (int(ei_packet_traits<Scalar>::siz
* It is the return type of MatrixBase::cwise()
* and most of the time this is the only way it is used.
*
* Note that some methods are defined in the \ref Array module.
*
* \sa MatrixBase::cwise()
*/
template<typename ExpressionType> class Cwise

View File

@@ -31,7 +31,9 @@
*
* This class is the base that is inherited by all matrix, vector, and expression
* types. Most of the Eigen API is contained in this class. Other important classes for
* the Eigen API are Matrix, Cwise, and Part.
* the Eigen API are Matrix, Cwise, and PartialRedux.
*
* Note that some methods are defined in the \ref Array module.
*
* \param Derived is the derived type, e.g. a matrix type, or an expression, etc.
*
@@ -48,7 +50,6 @@
}
* \endcode
*
* \nosubgrouping
*/
template<typename Derived> class MatrixBase
{
@@ -549,7 +550,7 @@ template<typename Derived> class MatrixBase
template<typename OtherDerived>
typename ei_eval<Derived>::type
cross(const MatrixBase<OtherDerived>& other) const;
typename ei_eval<Derived>::type perpendicular(void) const;
};
#endif // EIGEN_MATRIXBASE_H

View File

@@ -61,7 +61,7 @@ template<> inline __m128i ei_pmul(const __m128i& a, const __m128i& b)
template<> inline __m128 ei_pdiv(const __m128& a, const __m128& b) { return _mm_div_ps(a,b); }
template<> inline __m128d ei_pdiv(const __m128d& a, const __m128d& b) { return _mm_div_pd(a,b); }
template<> inline __m128i ei_pdiv(const __m128i& a, const __m128i& b)
template<> inline __m128i ei_pdiv(const __m128i& /*a*/, const __m128i& /*b*/)
{ ei_assert(false && "packet integer division are not supported by SSE"); }
// for some weird raisons, it has to be overloaded for packet integer