Add determinant(Vector_2, Vector_2)
Add determinant(Vector_3, Vector_3, Vector_3) And corresponding functor.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user