This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 1009
Collapse All | Expand All

(-)a/Eigen/src/Core/DenseCoeffsBase.h (+5 lines)
Lines 133-148 class DenseCoeffsBase<Derived,ReadOnlyAc Link Here
133
      *
133
      *
134
      * \sa operator[](Index) const, coeffRef(Index), coeff(Index,Index) const
134
      * \sa operator[](Index) const, coeffRef(Index), coeff(Index,Index) const
135
      */
135
      */
136
136
137
    EIGEN_DEVICE_FUNC
137
    EIGEN_DEVICE_FUNC
138
    EIGEN_STRONG_INLINE CoeffReturnType
138
    EIGEN_STRONG_INLINE CoeffReturnType
139
    coeff(Index index) const
139
    coeff(Index index) const
140
    {
140
    {
141
      EIGEN_STATIC_ASSERT(Derived::Flags & LinearAccessBit,
142
                    THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
143
141
      eigen_internal_assert(index >= 0 && index < size());
144
      eigen_internal_assert(index >= 0 && index < size());
142
      return typename internal::evaluator<Derived>::type(derived()).coeff(index);
145
      return typename internal::evaluator<Derived>::type(derived()).coeff(index);
143
    }
146
    }
144
147
145
148
146
    /** \returns the coefficient at given index.
149
    /** \returns the coefficient at given index.
147
      *
150
      *
148
      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.
151
      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.
Lines 363-378 class DenseCoeffsBase<Derived, WriteAcce Link Here
363
      *
366
      *
364
      * \sa operator[](Index), coeff(Index) const, coeffRef(Index,Index)
367
      * \sa operator[](Index), coeff(Index) const, coeffRef(Index,Index)
365
      */
368
      */
366
369
367
    EIGEN_DEVICE_FUNC
370
    EIGEN_DEVICE_FUNC
368
    EIGEN_STRONG_INLINE Scalar&
371
    EIGEN_STRONG_INLINE Scalar&
369
    coeffRef(Index index)
372
    coeffRef(Index index)
370
    {
373
    {
374
      EIGEN_STATIC_ASSERT(Derived::Flags & LinearAccessBit,
375
                          THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
371
      eigen_internal_assert(index >= 0 && index < size());
376
      eigen_internal_assert(index >= 0 && index < size());
372
      return typename internal::evaluator<Derived>::type(derived()).coeffRef(index);
377
      return typename internal::evaluator<Derived>::type(derived()).coeffRef(index);
373
    }
378
    }
374
379
375
    /** \returns a reference to the coefficient at given index.
380
    /** \returns a reference to the coefficient at given index.
376
      *
381
      *
377
      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.
382
      * This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.
378
      *
383
      *
(-)a/Eigen/src/Core/util/StaticAssert.h (-1 / +2 lines)
Lines 88-104 Link Here
88
        THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL,
88
        THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL,
89
        THIS_METHOD_IS_ONLY_FOR_ARRAYS_NOT_MATRICES,
89
        THIS_METHOD_IS_ONLY_FOR_ARRAYS_NOT_MATRICES,
90
        YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED,
90
        YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED,
91
        YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED,
91
        YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED,
92
        THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE,
92
        THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE,
93
        THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH,
93
        THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH,
94
        OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG,
94
        OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG,
95
        IMPLICIT_CONVERSION_TO_SCALAR_IS_FOR_INNER_PRODUCT_ONLY,
95
        IMPLICIT_CONVERSION_TO_SCALAR_IS_FOR_INNER_PRODUCT_ONLY,
96
        STORAGE_LAYOUT_DOES_NOT_MATCH
96
        STORAGE_LAYOUT_DOES_NOT_MATCH,
97
        THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS
97
      };
98
      };
98
    };
99
    };
99
100
100
    } // end namespace internal
101
    } // end namespace internal
101
102
102
    } // end namespace Eigen
103
    } // end namespace Eigen
103
104
104
    // Specialized implementation for MSVC to avoid "conditional
105
    // Specialized implementation for MSVC to avoid "conditional

Return to bug 1009