|
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE (Scalar_, AmbientDim_==Dynamic ? Dynamic :AmbientDim_+1) enum |
|
EIGEN_DEVICE_FUNC | Hyperplane () |
|
template<int OtherOptions> |
EIGEN_DEVICE_FUNC | Hyperplane (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other) |
|
EIGEN_DEVICE_FUNC | Hyperplane (Index _dim) |
|
EIGEN_DEVICE_FUNC | Hyperplane (const VectorType &n, const VectorType &e) |
|
EIGEN_DEVICE_FUNC | Hyperplane (const VectorType &n, const Scalar &d) |
|
EIGEN_DEVICE_FUNC | Hyperplane (const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized) |
|
EIGEN_DEVICE_FUNC | ~Hyperplane () |
|
EIGEN_DEVICE_FUNC Index | dim () const |
|
EIGEN_DEVICE_FUNC void | normalize (void) |
|
EIGEN_DEVICE_FUNC Scalar | signedDistance (const VectorType &p) const |
|
EIGEN_DEVICE_FUNC Scalar | absDistance (const VectorType &p) const |
|
EIGEN_DEVICE_FUNC VectorType | projection (const VectorType &p) const |
|
EIGEN_DEVICE_FUNC ConstNormalReturnType | normal () const |
|
EIGEN_DEVICE_FUNC NormalReturnType | normal () |
|
EIGEN_DEVICE_FUNC const Scalar & | offset () const |
|
EIGEN_DEVICE_FUNC Scalar & | offset () |
|
EIGEN_DEVICE_FUNC const Coefficients & | coeffs () const |
|
EIGEN_DEVICE_FUNC Coefficients & | coeffs () |
|
EIGEN_DEVICE_FUNC VectorType | intersection (const Hyperplane &other) const |
|
template<typename XprType > |
EIGEN_DEVICE_FUNC Hyperplane & | transform (const MatrixBase< XprType > &mat, TransformTraits traits=Affine) |
|
template<int TrOptions> |
EIGEN_DEVICE_FUNC Hyperplane & | transform (const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &t, TransformTraits traits=Affine) |
|
template<typename NewScalarType > |
EIGEN_DEVICE_FUNC internal::cast_return_type< Hyperplane, Hyperplane< NewScalarType, AmbientDimAtCompileTime, Options > >::type | cast () const |
|
template<typename OtherScalarType , int OtherOptions> |
EIGEN_DEVICE_FUNC | Hyperplane (const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other) |
|
template<int OtherOptions> |
EIGEN_DEVICE_FUNC bool | isApprox (const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const |
|
template<typename Scalar_, int AmbientDim_, int Options_>
class Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >
A hyperplane.
\geometry_module
A hyperplane is an affine subspace of dimension n-1 in a space of dimension n. For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.
- Template Parameters
-
Scalar_ | the scalar type, i.e., the type of the coefficients |
AmbientDim_ | the dimension of the ambient space, can be a compile time value or Dynamic. Notice that the dimension of the hyperplane is AmbientDim_-1. |
This class represents an hyperplane as the zero set of the implicit equation \( n \cdot x + d = 0 \) where \( n \) is a unit normal vector of the plane (linear part) and \( d \) is the distance (offset) to the origin.
template<typename Scalar_ , int AmbientDim_, int Options_>
Constructs a hyperplane passing through the parametrized line parametrized. If the dimension of the ambient space is greater than 2, then there isn't uniqueness, so an arbitrary choice is made.
116 normal() = parametrized.direction().unitOrthogonal();
References Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::direction(), Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::normal(), Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::offset(), and Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::origin().
template<typename Scalar_ , int AmbientDim_, int Options_>
template<typename Scalar_ , int AmbientDim_, int Options_>
Constructs a hyperplane passing through the three points. The dimension of the ambient space is required to be exactly 3.
100 Matrix<Scalar, 2, 3>
m;
101 m << v0.transpose(),
v1.transpose();
103 result.normal() =
svd.matrixV().col(2);
105 result.normal() /= norm;
106 result.offset() = -
p0.dot(result.normal());
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf, ComputeThinU|ComputeThinV > svd(m)
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
@ ComputeFullV
Definition: Constants.h:393
int * m
Definition: level2_cplx_impl.h:294
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43
void cross(const Vector< double > &A, const Vector< double > &B, Vector< double > &C)
Definition: oomph-lib/src/generic/Vector.h:319
References Eigen::ComputeFullV, EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE, m, Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::normal(), Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::offset(), p0, p1, svd(), and v1().
template<typename Scalar_ , int AmbientDim_, int Options_>
template<typename XprType >
Applies the transformation matrix mat to *this
and returns a reference to *this
.
- Parameters
-
mat | the Dim x Dim transformation matrix |
traits | specifies whether the matrix mat represents an Isometry or a more generic Affine transformation. The default is Affine. |
214 eigen_assert(0 &&
"invalid traits value in Hyperplane::transform()");
#define eigen_assert(x)
Definition: Macros.h:910
TransposeReturnType transpose()
Definition: SparseMatrixBase.h:358
@ Affine
Definition: Constants.h:458
@ Isometry
Definition: Constants.h:455
References Eigen::Affine, eigen_assert, Eigen::Isometry, Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::m_coeffs, Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::normal(), and Eigen::SparseMatrixBase< Derived >::transpose().
Referenced by Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::transform().
template<typename Scalar_ , int AmbientDim_, int Options_>
template<int TrOptions>
Applies the transformation t to *this
and returns a reference to *this
.
- Parameters
-
t | the transformation of dimension Dim |
traits | specifies whether the transformation t represents an Isometry or a more generic Affine transformation. The default is Affine. Other kind of transformations are not supported. |
EIGEN_DEVICE_FUNC Hyperplane & transform(const MatrixBase< XprType > &mat, TransformTraits traits=Affine)
Definition: Hyperplane.h:207
t
Definition: plotPSD.py:36
References Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::normal(), Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::offset(), plotPSD::t, and Eigen::Hyperplane< Scalar_, AmbientDim_, Options_ >::transform().