46 #ifndef EIGEN_ALIGNEDBOX_H
47 #define EIGEN_ALIGNEDBOX_H
68 template <
typename Scalar_,
int AmbientDim_>
118 template <
typename OtherVectorType1,
typename OtherVectorType2>
123 template <
typename Derived>
227 template <
typename Derived>
230 return (
m_min.array() <= p_n.array()).all() && (p_n.array() <=
m_max.array()).
all();
235 return (
m_min.array() <= (
b.min)().array()).all() && ((
b.max)().array() <=
m_max.array()).
all();
241 return (
m_min.array() <= (
b.max)().array()).all() && ((
b.min)().array() <=
m_max.array()).
all();
246 template <
typename Derived>
286 template <
typename Derived>
295 template <
typename Derived>
306 template <
typename Derived>
319 template <
typename Derived>
335 template <
int Mode,
int Options>
347 template <
int Mode,
int Options>
351 THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS);
364 this->
m_max = (rotated_center_2 + rotated_extent_2) /
Scalar(2);
365 this->
m_min = (rotated_center_2 - rotated_extent_2) /
Scalar(2);
372 template <
int Mode,
int Options>
385 template <
typename NewScalarType>
394 template <
typename OtherScalarType>
396 m_min = (other.
min)().template cast<Scalar>();
397 m_max = (other.
max)().template cast<Scalar>();
405 const RealScalar& prec = ScalarTraits::dummy_precision())
const {
413 template <
typename Scalar,
int AmbientDim>
414 template <
typename Derived>
421 if (m_min[
k] >
p[
k]) {
422 aux = m_min[
k] -
p[
k];
424 }
else if (
p[
k] > m_max[
k]) {
425 aux =
p[
k] - m_max[
k];
432 template <
typename Scalar,
int AmbientDim>
437 if (m_min[
k] >
b.m_max[
k]) {
438 aux = m_min[
k] -
b.m_max[
k];
440 }
else if (
b.m_min[
k] > m_max[
k]) {
441 aux =
b.m_min[
k] - m_max[
k];
465 #define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \
467 typedef AlignedBox<Type, Size> AlignedBox##SizeSuffix##TypeSuffix;
469 #define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix) \
470 EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 1, 1) \
471 EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 2, 2) \
472 EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 3, 3) \
473 EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, 4, 4) \
474 EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Dynamic, X)
480 #undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES
481 #undef EIGEN_MAKE_TYPEDEFS
#define EIGEN_MAKE_TYPEDEFS_ALL_SIZES(Type, TypeSuffix)
Definition: AlignedBox.h:469
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_CONST_CONDITIONAL(cond)
Definition: Macros.h:1060
#define EIGEN_USING_STD(FUNC)
Definition: Macros.h:1090
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)
Definition: Memory.h:880
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
float * p
Definition: Tutorial_Map_using.cpp:9
Scalar * b
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
An axis aligned box.
Definition: AlignedBox.h:69
EIGEN_DEVICE_FUNC NonInteger exteriorDistance(const AlignedBox &b) const
Definition: AlignedBox.h:328
Scalar_ Scalar
Definition: AlignedBox.h:73
EIGEN_DEVICE_FUNC const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(VectorTypeSum, RealScalar, quotient) center() const
Definition: AlignedBox.h:160
EIGEN_DEVICE_FUNC AlignedBox(const AlignedBox< OtherScalarType, AmbientDimAtCompileTime > &other)
Definition: AlignedBox.h:395
EIGEN_DEVICE_FUNC AlignedBox merged(const AlignedBox &b) const
Definition: AlignedBox.h:281
EIGEN_DEVICE_FUNC AlignedBox intersection(const AlignedBox &b) const
Definition: AlignedBox.h:274
EIGEN_DEVICE_FUNC ~AlignedBox()
Definition: AlignedBox.h:126
CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const VectorType, const VectorType > VectorTypeSum
Definition: AlignedBox.h:79
EIGEN_DEVICE_FUNC bool isApprox(const AlignedBox &other, const RealScalar &prec=ScalarTraits::dummy_precision()) const
Definition: AlignedBox.h:404
EIGEN_DEVICE_FUNC void transform(const typename Transform< Scalar, AmbientDimAtCompileTime, Mode, Options >::TranslationType &translation)
Definition: AlignedBox.h:336
EIGEN_DEVICE_FUNC Index dim() const
Definition: AlignedBox.h:129
EIGEN_DEVICE_FUNC internal::cast_return_type< AlignedBox, AlignedBox< NewScalarType, AmbientDimAtCompileTime > >::type cast() const
Definition: AlignedBox.h:388
EIGEN_DEVICE_FUNC AlignedBox & extend(const AlignedBox &b)
Definition: AlignedBox.h:256
Eigen::Index Index
Definition: AlignedBox.h:75
EIGEN_DEVICE_FUNC AlignedBox()
Definition: AlignedBox.h:108
EIGEN_DEVICE_FUNC AlignedBox & extend(const MatrixBase< Derived > &p)
Definition: AlignedBox.h:247
EIGEN_DEVICE_FUNC const VectorType &() min() const
Definition: AlignedBox.h:151
EIGEN_DEVICE_FUNC VectorType sample() const
Definition: AlignedBox.h:215
Matrix< Scalar, AmbientDimAtCompileTime, 1 > VectorType
Definition: AlignedBox.h:78
ScalarTraits::NonInteger NonInteger
Definition: AlignedBox.h:77
EIGEN_DEVICE_FUNC const VectorType &() max() const
Definition: AlignedBox.h:155
EIGEN_DEVICE_FUNC void transform(const Transform< Scalar, AmbientDimAtCompileTime, Mode, Options > &transform)
Definition: AlignedBox.h:348
EIGEN_DEVICE_FUNC VectorType corner(CornerType corner) const
Definition: AlignedBox.h:197
ScalarTraits::Real RealScalar
Definition: AlignedBox.h:76
EIGEN_DEVICE_FUNC Scalar volume() const
Definition: AlignedBox.h:176
EIGEN_DEVICE_FUNC VectorType &() min()
Definition: AlignedBox.h:153
VectorType m_min
Definition: AlignedBox.h:410
EIGEN_DEVICE_FUNC bool contains(const MatrixBase< Derived > &p) const
Definition: AlignedBox.h:228
EIGEN_DEVICE_FUNC Scalar squaredExteriorDistance(const MatrixBase< Derived > &p) const
Definition: AlignedBox.h:415
@ AmbientDimAtCompileTime
Definition: AlignedBox.h:72
EIGEN_DEVICE_FUNC bool isEmpty() const
Definition: AlignedBox.h:141
NumTraits< Scalar > ScalarTraits
Definition: AlignedBox.h:74
EIGEN_DEVICE_FUNC const CwiseBinaryOp< internal::scalar_difference_op< Scalar, Scalar >, const VectorType, const VectorType > sizes() const
Definition: AlignedBox.h:171
EIGEN_DEVICE_FUNC AlignedBox transformed(const Transform< Scalar, AmbientDimAtCompileTime, Mode, Options > &transform) const
Definition: AlignedBox.h:374
EIGEN_DEVICE_FUNC void setEmpty()
Definition: AlignedBox.h:145
EIGEN_DEVICE_FUNC void setNull()
Definition: AlignedBox.h:137
EIGEN_DEVICE_FUNC AlignedBox(const OtherVectorType1 &_min, const OtherVectorType2 &_max)
Definition: AlignedBox.h:119
EIGEN_DEVICE_FUNC AlignedBox & translate(const MatrixBase< Derived > &a_t)
Definition: AlignedBox.h:287
EIGEN_DEVICE_FUNC AlignedBox(Index _dim)
Definition: AlignedBox.h:113
EIGEN_DEVICE_FUNC CwiseBinaryOp< internal::scalar_difference_op< Scalar, Scalar >, const VectorType, const VectorType > diagonal() const
Definition: AlignedBox.h:184
EIGEN_DEVICE_FUNC VectorType &() max()
Definition: AlignedBox.h:157
EIGEN_DEVICE_FUNC NonInteger exteriorDistance(const MatrixBase< Derived > &p) const
Definition: AlignedBox.h:320
EIGEN_DEVICE_FUNC AlignedBox & clamp(const AlignedBox &b)
Definition: AlignedBox.h:265
EIGEN_DEVICE_FUNC AlignedBox translated(const MatrixBase< Derived > &a_t) const
Definition: AlignedBox.h:296
EIGEN_DEVICE_FUNC bool intersects(const AlignedBox &b) const
Definition: AlignedBox.h:240
VectorType m_max
Definition: AlignedBox.h:410
EIGEN_DEVICE_FUNC bool contains(const AlignedBox &b) const
Definition: AlignedBox.h:234
CornerType
Definition: AlignedBox.h:82
@ Max
Definition: AlignedBox.h:85
@ TopLeft
Definition: AlignedBox.h:91
@ TopRight
Definition: AlignedBox.h:92
@ TopLeftFloor
Definition: AlignedBox.h:98
@ BottomRight
Definition: AlignedBox.h:90
@ Min
Definition: AlignedBox.h:84
@ TopLeftCeil
Definition: AlignedBox.h:102
@ BottomLeft
Definition: AlignedBox.h:89
@ BottomRightFloor
Definition: AlignedBox.h:97
@ TopRightFloor
Definition: AlignedBox.h:99
@ BottomLeftCeil
Definition: AlignedBox.h:100
@ BottomRightCeil
Definition: AlignedBox.h:101
@ TopRightCeil
Definition: AlignedBox.h:103
@ BottomLeftFloor
Definition: AlignedBox.h:96
EIGEN_DEVICE_FUNC bool isNull() const
Definition: AlignedBox.h:134
EIGEN_DEVICE_FUNC AlignedBox(const MatrixBase< Derived > &p)
Definition: AlignedBox.h:124
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:79
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
Definition: CwiseNullaryOp.h:365
Represents a translation transformation.
Definition: Translation.h:33
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
static constexpr Eigen::internal::all_t all
Definition: IndexedViewHelper.h:86
@ Affine
Definition: Constants.h:458
@ AffineCompact
Definition: Constants.h:460
@ Isometry
Definition: Constants.h:455
char char char int int * k
Definition: level2_impl.h:374
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int Dynamic
Definition: Constants.h:25
type
Definition: compute_granudrum_aor.py:141
t
Definition: plotPSD.py:36
@ IsInteger
Definition: NumTraits.h:174
T Real
Definition: NumTraits.h:183
Definition: XprHelper.h:583
std::conditional_t< Evaluate, PlainObject, typename ref_selector< T >::type > type
Definition: XprHelper.h:549
Definition: fft_test_shared.h:66