From f334af7d7863e3e4bb09c86c927f082de6d830d6 Mon Sep 17 00:00:00 2001 From: barendgehrels Date: Wed, 4 Jan 2017 15:38:43 +0100 Subject: [PATCH] [transform] rename ublas_transformer to matrix_transformer --- example/06_b_transformation_example.cpp | 2 +- .../transform/inverse_transformer.hpp | 2 +- .../strategies/transform/map_transformer.hpp | 2 +- .../transform/matrix_transformers.hpp | 50 +++++++++---------- include/boost/geometry/util/math.hpp | 2 +- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/example/06_b_transformation_example.cpp b/example/06_b_transformation_example.cpp index f3f79819f..ad7f75b33 100644 --- a/example/06_b_transformation_example.cpp +++ b/example/06_b_transformation_example.cpp @@ -144,7 +144,7 @@ int main() // Compose matrix for the two transformation // Create transformer attached to the transformation matrix - ublas_transformer combined(rotate.matrix() * translate.matrix()); + matrix_transformer combined(rotate.matrix() * translate.matrix()); // Apply transformation to subject geometry point-by-point model::polygon g4; diff --git a/include/boost/geometry/strategies/transform/inverse_transformer.hpp b/include/boost/geometry/strategies/transform/inverse_transformer.hpp index 2a7abe1da..5213bce47 100644 --- a/include/boost/geometry/strategies/transform/inverse_transformer.hpp +++ b/include/boost/geometry/strategies/transform/inverse_transformer.hpp @@ -37,7 +37,7 @@ template std::size_t Dimension2 > class inverse_transformer - : public ublas_transformer + : public matrix_transformer { public : template diff --git a/include/boost/geometry/strategies/transform/map_transformer.hpp b/include/boost/geometry/strategies/transform/map_transformer.hpp index 9381d86d2..01ea6168c 100644 --- a/include/boost/geometry/strategies/transform/map_transformer.hpp +++ b/include/boost/geometry/strategies/transform/map_transformer.hpp @@ -46,7 +46,7 @@ template bool SameScale = true > class map_transformer - : public ublas_transformer + : public matrix_transformer { typedef boost::qvm::mat M; typedef boost::qvm::mat matrix33; diff --git a/include/boost/geometry/strategies/transform/matrix_transformers.hpp b/include/boost/geometry/strategies/transform/matrix_transformers.hpp index a09249761..a5dd4c7b5 100644 --- a/include/boost/geometry/strategies/transform/matrix_transformers.hpp +++ b/include/boost/geometry/strategies/transform/matrix_transformers.hpp @@ -56,13 +56,13 @@ template std::size_t Dimension1, std::size_t Dimension2 > -class ublas_transformer +class matrix_transformer { }; template -class ublas_transformer +class matrix_transformer { protected : typedef CalculationType ct; @@ -71,7 +71,7 @@ protected : public : - inline ublas_transformer( + inline matrix_transformer( ct const& m_0_0, ct const& m_0_1, ct const& m_0_2, ct const& m_1_0, ct const& m_1_1, ct const& m_1_2, ct const& m_2_0, ct const& m_2_1, ct const& m_2_2) @@ -81,12 +81,12 @@ public : qvm::A<2,0>(m_matrix) = m_2_0; qvm::A<2,1>(m_matrix) = m_2_1; qvm::A<2,2>(m_matrix) = m_2_2; } - inline ublas_transformer(matrix_type const& matrix) + inline matrix_transformer(matrix_type const& matrix) : m_matrix(matrix) {} - inline ublas_transformer() {} + inline matrix_transformer() {} template inline bool apply(P1 const& p1, P2& p2) const @@ -113,29 +113,29 @@ public : // It IS possible to go from 3 to 2 coordinates template -class ublas_transformer : public ublas_transformer +class matrix_transformer : public matrix_transformer { typedef CalculationType ct; public : - inline ublas_transformer( + inline matrix_transformer( ct const& m_0_0, ct const& m_0_1, ct const& m_0_2, ct const& m_1_0, ct const& m_1_1, ct const& m_1_2, ct const& m_2_0, ct const& m_2_1, ct const& m_2_2) - : ublas_transformer( + : matrix_transformer( m_0_0, m_0_1, m_0_2, m_1_0, m_1_1, m_1_2, m_2_0, m_2_1, m_2_2) {} - inline ublas_transformer() - : ublas_transformer() + inline matrix_transformer() + : matrix_transformer() {} }; template -class ublas_transformer +class matrix_transformer { protected : typedef CalculationType ct; @@ -143,7 +143,7 @@ protected : matrix_type m_matrix; public : - inline ublas_transformer( + inline matrix_transformer( ct const& m_0_0, ct const& m_0_1, ct const& m_0_2, ct const& m_0_3, ct const& m_1_0, ct const& m_1_1, ct const& m_1_2, ct const& m_1_3, ct const& m_2_0, ct const& m_2_1, ct const& m_2_2, ct const& m_2_3, @@ -156,7 +156,7 @@ public : qvm::A<3,0>(m_matrix) = m_3_0; qvm::A<3,1>(m_matrix) = m_3_1; qvm::A<3,2>(m_matrix) = m_3_2; qvm::A<3,3>(m_matrix) = m_3_3; } - inline ublas_transformer() {} + inline matrix_transformer() {} template inline bool apply(P1 const& p1, P2& p2) const @@ -201,7 +201,7 @@ class translate_transformer template -class translate_transformer : public ublas_transformer +class translate_transformer : public matrix_transformer { public : // To have translate transformers compatible for 2/3 dimensions, the @@ -209,7 +209,7 @@ public : inline translate_transformer(CalculationType const& translate_x, CalculationType const& translate_y, CalculationType const& = 0) - : ublas_transformer( + : matrix_transformer( 1, 0, translate_x, 0, 1, translate_y, 0, 0, 1) @@ -218,13 +218,13 @@ public : template -class translate_transformer : public ublas_transformer +class translate_transformer : public matrix_transformer { public : inline translate_transformer(CalculationType const& translate_x, CalculationType const& translate_y, CalculationType const& translate_z) - : ublas_transformer( + : matrix_transformer( 1, 0, 0, translate_x, 0, 1, 0, translate_y, 0, 0, 1, translate_z, @@ -254,14 +254,14 @@ class scale_transformer template -class scale_transformer : public ublas_transformer +class scale_transformer : public matrix_transformer { public : inline scale_transformer(CalculationType const& scale_x, CalculationType const& scale_y, CalculationType const& = 0) - : ublas_transformer( + : matrix_transformer( scale_x, 0, 0, 0, scale_y, 0, 0, 0, 1) @@ -269,7 +269,7 @@ public : inline scale_transformer(CalculationType const& scale) - : ublas_transformer( + : matrix_transformer( scale, 0, 0, 0, scale, 0, 0, 0, 1) @@ -278,13 +278,13 @@ public : template -class scale_transformer : public ublas_transformer +class scale_transformer : public matrix_transformer { public : inline scale_transformer(CalculationType const& scale_x, CalculationType const& scale_y, CalculationType const& scale_z) - : ublas_transformer( + : matrix_transformer( scale_x, 0, 0, 0, 0, scale_y, 0, 0, 0, 0, scale_z, 0, @@ -293,7 +293,7 @@ public : inline scale_transformer(CalculationType const& scale) - : ublas_transformer( + : matrix_transformer( scale, 0, 0, 0, 0, scale, 0, 0, 0, 0, scale, 0, @@ -342,11 +342,11 @@ template std::size_t Dimension2 > class rad_rotate_transformer - : public ublas_transformer + : public matrix_transformer { public : inline rad_rotate_transformer(CalculationType const& angle) - : ublas_transformer( + : matrix_transformer( cos(angle), sin(angle), 0, -sin(angle), cos(angle), 0, 0, 0, 1) diff --git a/include/boost/geometry/util/math.hpp b/include/boost/geometry/util/math.hpp index 234cfa1ed..1874fe76a 100644 --- a/include/boost/geometry/util/math.hpp +++ b/include/boost/geometry/util/math.hpp @@ -518,7 +518,7 @@ inline T scaled_epsilon(T const& value) } -// Maybe replace this by boost equals or boost ublas numeric equals or so +// Maybe replace this by boost equals or so /*! \brief returns true if both arguments are equal.