Add determinant(Vector_2, Vector_2)

Add determinant(Vector_3, Vector_3, Vector_3)
And corresponding functor.
This commit is contained in:
Sylvain Pion
2006-08-02 18:57:40 +00:00
parent 540406f767
commit 6ee4e656e7
25 changed files with 203 additions and 15 deletions
@@ -804,6 +804,40 @@ namespace CartesianKernelFunctors {
{ return t.area(); }
};
template <typename K>
class Compute_determinant_2
{
typedef typename K::FT FT;
typedef typename K::Vector_2 Vector_2;
public:
typedef FT result_type;
typedef Arity_tag< 2 > Arity;
result_type
operator()(const Vector_2& v, const Vector_2& w) const
{
return det2x2_by_formula(v.x(), v.y(), w.x(), w.y());
}
};
template <typename K>
class Compute_determinant_3
{
typedef typename K::FT FT;
typedef typename K::Vector_3 Vector_3;
public:
typedef FT result_type;
typedef Arity_tag< 3 > Arity;
result_type
operator()(const Vector_3& v, const Vector_3& w, const Vector_3& t) const
{
return det3x3_by_formula(v.x(), v.y(), v.z(),
w.x(), w.y(), w.z(),
t.x(), t.y(), t.z());
}
};
template <typename K>
class Compute_scalar_product_2
{